Given a set of
for data points from indices
, create
a random hyperplane to split the data, returning two arrays indices
that fall on either side of the hyperplane.data
A FlatTree is a flat form for an RPTree.
A FlatTree is a flat form for an RPTree. It is made to improve searching time through the tree.
The RPTree to transform.
The size of the flat tree's leaves.
A Forest is a group of FlatTrees.
A Forest is a group of FlatTrees. It is used to concatenate a certain amount of tree leaves.
The data we want to transform.
The size of a leaf (ignored if < 10).
The amount of trees to create in the forest.
The initialization array for random.
Whether the trees must be angular or not.
Representation of a Random Projection Split.
Representation of a Random Projection Split. This projection can be defined either by an Euclidean or an Angular metric
Uniform Manifold Approximation and Projection
Uniform Manifold Approximation and Projection
Finds a low dimensional embedding of the data that approximates an underlying manifold.
int (optional, default 2) The dimension of the space to embed into. This defaults to 2 to provide easy visualization, but can reasonably be set to any integer value in the range 2 to 100.
function (optional, default 'euclidean') The metric to use to compute distances in high dimensional space.
int (optional, default None) The number of training epochs to be used in optimizing the low dimensional embedding. Larger values result in more accurate embeddings. If None is specified a value will be selected based on the size of the input dataset (200 for large datasets, 500 for small).
double (optional, default 1.0) The initial learning rate for the embedding optimization.
string (optional, default 'random') How to initialize the low dimensional embedding. Options are: * 'spectral': use a spectral embedding of the fuzzy 1-skeleton * 'random': assign initial embedding positions at random. * A numpy array of initial embedding positions.
double (optional, default 0.1)
The effective minimum distance between embedded points. Smaller values
will result in a more clustered/clumped embedding where nearby points
on the manifold are drawn closer together, while larger values will
result on a more even dispersal of points. The value should be set
relative to the
value, which determines the scale at which
embedded points will be spread out.spread
double (optional, default 1.0)
The effective scale of embedded points. In combination with
this determines how clustered/clumped the embedded points are.min_dist
double (optional, default 1.0) Interpolate between (fuzzy) union and intersection as the set operation used to combine local fuzzy simplicial sets to obtain a global fuzzy simplicial sets. Both fuzzy set operations use the product t-norm. The value of this parameter should be between 0.0 and 1.0; a value of 1.0 will use a pure fuzzy union, while 0.0 will use a pure fuzzy intersection.
int (optional, default 1) The local connectivity required -- i.e. the number of nearest neighbors that should be assumed to be connected at a local level. The higher this value the more connected the manifold becomes locally. In practice this should be not more than the local intrinsic dimension of the manifold.
double (optional, default 1.0) Weighting applied to negative samples in low dimensional embedding optimization. Values higher than one will result in greater weight being given to negative samples.
int (optional, default 5) The number of negative samples to select per positive sample in the optimization process. Increasing this value will result in greater repulsive force being applied, greater optimization cost, but slightly more accuracy.
double (optional, default 4.0) For transform operations (embedding new points using a trained model_ this will control how aggressively to search for nearest neighbors. Larger values will result in slower performance but more accurate nearest neighbor evaluation.
double (optional, default None)
More specific parameters controlling the embedding. If None these
values are set automatically as determined by
and
min_dist
.spread
double (optional, default None)
More specific parameters controlling the embedding. If None these
values are set automatically as determined by
and
min_dist
.spread
bool (optional, default False) Whether to use an angular random projection forest to initialise the approximate nearest neighbor search. This can be faster, but is mostly on useful for metric that use an angular style distance such as cosine, correlation etc. In the case of those metrics angular forests will be chosen automatically.
int (optional, default 42) Random seed used for the stochastic aspects of the transform operation. This ensures consistency in transform operations.
bool (optional, default False) Controls verbosity of logging.
Given a set of
for data points fromindices
, create a random hyperplane to split the data, returning two arrays indices that fall on either side of the hyperplane. This is the basis for a random projection tree, which simply uses this splitting recursively. This particular split uses euclidean distance to determine the hyperplane and which side each data sample falls on.data
The original data to be split
The indices of the elements in the
array that are to be split in the current operation.data