@@ -71,15 +71,19 @@ limitations under the License.
7171 * [ ` outlier ` -Function] ( #outlier-function )
7272 * [ ` pnmf ` -Function] ( #pnmf-function )
7373 * [ ` scale ` -Function] ( #scale-function )
74+ * [ ` setdiff ` -Function] ( #setdiff-function )
7475 * [ ` sherlock ` -Function] ( #sherlock-function )
7576 * [ ` sherlockPredict ` -Function] ( #sherlockPredict-function )
7677 * [ ` sigmoid ` -Function] ( #sigmoid-function )
7778 * [ ` slicefinder ` -Function] ( #slicefinder-function )
7879 * [ ` smote ` -Function] ( #smote-function )
7980 * [ ` steplm ` -Function] ( #steplm-function )
81+ * [ ` symmetricDifference ` -Function] ( #symmetricdifference-function )
8082 * [ ` tomekLink ` -Function] ( #tomekLink-function )
8183 * [ ` toOneHot ` -Function] ( #toOneHOt-function )
8284 * [ ` tSNE ` -Function] ( #tSNE-function )
85+ * [ ` union ` -Function] ( #union-function )
86+ * [ ` unique ` -Function] ( #unique-function )
8387 * [ ` winsorize ` -Function] ( #winsorize-function )
8488 * [ ` xgboost ` -Function] ( #xgboost-function )
8589
@@ -1823,6 +1827,36 @@ scale=TRUE;
18231827Y = scale(X ,center ,scale )
18241828```
18251829
1830+ ## ` setdiff ` -Function
1831+
1832+ The ` setdiff ` -function returns the values of X that are not in Y.
1833+
1834+ ### Usage
1835+
1836+ ``` r
1837+ setdiff(X , Y )
1838+ ```
1839+
1840+ ### Arguments
1841+
1842+ | Name | Type | Default | Description |
1843+ | :--- | :----- | -------- | :---------- |
1844+ | X | Matrix[ Double] | required | input vector|
1845+ | Y | Matrix[ Double] | required | input vector|
1846+
1847+ ### Returns
1848+
1849+ | Type | Description |
1850+ | :----- | :---------- |
1851+ | Matrix[ Double] | values of X that are not in Y.|
1852+
1853+ ### Example
1854+
1855+ ``` r
1856+ X = matrix (" 1 2 3 4" , rows = 4 , cols = 1 )
1857+ Y = matrix (" 2 3" , rows = 2 , cols = 1 )
1858+ R = setdiff(X = X , Y = Y )
1859+ ```
18261860
18271861## ` sherlock ` -Function
18281862
@@ -2107,6 +2141,37 @@ y = X %*% rand(rows = ncol(X), cols = 1)
21072141[C , S ] = steplm(X = X , y = y , icpt = 1 );
21082142```
21092143
2144+ ## ` symmetricDifference ` -Function
2145+
2146+ The ` symmetricDifference ` -function returns the symmetric difference of the two input vectors.
2147+ This is done by calculating the ` setdiff ` (nonsymmetric) between ` union ` and ` intersect ` of the two input vectors.
2148+
2149+ ### Usage
2150+
2151+ ``` r
2152+ symmetricDifference(X , Y )
2153+ ```
2154+
2155+ ### Arguments
2156+
2157+ | Name | Type | Default | Description |
2158+ | :--- | :----- | -------- | :---------- |
2159+ | X | Matrix[ Double] | required | input vector|
2160+ | Y | Matrix[ Double] | required | input vector|
2161+
2162+ ### Returns
2163+
2164+ | Type | Description |
2165+ | :----- | :---------- |
2166+ | Matrix[ Double] | symmetric difference of the input vectors |
2167+
2168+ ### Example
2169+
2170+ ``` r
2171+ X = matrix (" 1 2 3.1" , rows = 3 , cols = 1 )
2172+ Y = matrix (" 3.1 4" , rows = 2 , cols = 1 )
2173+ R = symmetricDifference(X = X , Y = Y )
2174+ ```
21102175
21112176## ` tomekLink ` -Function
21122177
@@ -2212,6 +2277,66 @@ X = rand(rows = 100, cols = 10, min = -10, max = 10))
22122277Y = tSNE(X )
22132278```
22142279
2280+ ## ` union ` -Function
2281+
2282+ The ` union ` -function combines all rows from both input vectors and removes all duplicate rows by calling ` unique ` on the resulting vector.
2283+
2284+ ### Usage
2285+
2286+ ``` r
2287+ union(X , Y )
2288+ ```
2289+
2290+ ### Arguments
2291+
2292+ | Name | Type | Default | Description |
2293+ | :--- | :----- | -------- | :---------- |
2294+ | X | Matrix[ Double] | required | input vector|
2295+ | Y | Matrix[ Double] | required | input vector|
2296+
2297+ ### Returns
2298+
2299+ | Type | Description |
2300+ | :----- | :---------- |
2301+ | Matrix[ Double] | the union of both input vectors.|
2302+
2303+ ### Example
2304+
2305+ ``` r
2306+ X = matrix (" 1 2 3 4" , rows = 4 , cols = 1 )
2307+ Y = matrix (" 3 4 5 6" , rows = 4 , cols = 1 )
2308+ R = union(X = X , Y = Y )
2309+ ```
2310+
2311+ ## ` unique ` -Function
2312+
2313+ The ` unique ` -function returns a set of unique rows from a given input vector.
2314+
2315+ ### Usage
2316+
2317+ ``` r
2318+ unique(X )
2319+ ```
2320+
2321+ ### Arguments
2322+
2323+ | Name | Type | Default | Description |
2324+ | :--- | :----- | -------- | :---------- |
2325+ | X | Matrix[ Double] | required | input vector|
2326+
2327+ ### Returns
2328+
2329+ | Type | Description |
2330+ | :----- | :---------- |
2331+ | Matrix[ Double] | a set of unique values from the input vector |
2332+
2333+ ### Example
2334+
2335+ ``` r
2336+ X = matrix (" 1 3.4 7 3.4 -0.9 8 1" , rows = 7 , cols = 1 )
2337+ R = unique(X = X )
2338+ ```
2339+
22152340## ` winsorize ` -Function
22162341
22172342The ` winsorize ` -function removes outliers from the data. It does so by computing upper and lower quartile range
0 commit comments