Description Usage Arguments Value Examples
Calculates the weights for every neighbour of x_i.
1 | find_weights(nns, X, m, reg = 2, ss = FALSE, p = 0.5, id = FALSE, v = 0.99)
|
nns |
matrix of nearest neighbours using |
X |
matrix object containing the input data. |
m |
intrinsic dimension of the data. See |
reg |
regularisation method. See |
ss |
a logical values indicating wheather to perform subset selection. See |
p |
amount of data remaining after subset selection. See |
id |
a logical values indicating wheather to calculate the intrinsic dimension. See |
v |
threshold parameter for intrinsic dimension. See details. |
A list containing the following variables:
X |
input data, can change if subset selection is applied |
weights |
weight matrix. If x_i is neighbour of x_j then -1<weights[i,j]<1, else zero. |
choise |
index vector of kept data while subset selection |
id |
additionally to the (optional) printed intrinsic dimension, the vector of intrinsic dimension for every data point is returned by the function, so that the vector can easily be ploted manually. |
1 2 3 4 | data( lle_scurve_data )
X <- lle_scurve_data
nns <- find_nn_k( X, 5 )
weights <- find_weights( nns, X, 2, 2 )
|
Loading required package: scatterplot3d
Loading required package: MASS
Loading required package: snowfall
Loading required package: snow
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.