Package

org.clustering4ever.scala

umap

Permalink

package umap

Visibility
  1. Public
  2. All

Type Members

  1. case class CustomInit(matrix: DenseMatrix[Double]) extends UMAPInitialization with Product with Serializable

    Permalink
  2. trait Distance extends AnyRef

    Permalink
  3. final case class Euclidean() extends Distance with Product with Serializable

    Permalink
  4. final case class EuclideanRPSplit(data: Array[Array[Double]], indices: ArrayBuffer[Int], rngState: Array[Long] = Array(2, 1, 1)) extends RPSplit with Product with Serializable

    Permalink

    Given a set of indices for data points from data, create a random hyperplane to split the data, returning two arrays indices that fall on either side of the hyperplane.

    Given a set of indices for data points from data, 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

    indices

    The indices of the elements in the data array that are to be split in the current operation.

  5. final case class FlatTree(rp: RPTree, leafSize: Int) extends Product with Serializable

    Permalink

    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.

    rp

    The RPTree to transform.

    leafSize

    The size of the flat tree's leaves.

  6. final case class Forest(data: Array[Array[Double]], nbNeighbors: Int, nbTrees: Int, state: Array[Long], angular: Boolean = false) extends Product with Serializable

    Permalink

    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.

    data

    The data we want to transform.

    nbNeighbors

    The size of a leaf (ignored if < 10).

    nbTrees

    The amount of trees to create in the forest.

    state

    The initialization array for random.

    angular

    Whether the trees must be angular or not.

  7. final case class Hamming() extends Distance with Product with Serializable

    Permalink
  8. final case class Heap(nPoints: Int, size: Int) extends Product with Serializable

    Permalink
  9. final case class Minkowski(p: Int) extends Distance with Product with Serializable

    Permalink
  10. final case class RPLeaf(indices: ArrayBuffer[Int], leafSize: Int) extends RPTree with Product with Serializable

    Permalink
  11. final case class RPNode(hyperplane: DenseVector[Double], offset: Double, left: RPTree, right: RPTree, leafSize: Int) extends RPTree with Product with Serializable

    Permalink
  12. trait RPSplit extends Serializable

    Permalink

    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

  13. sealed trait RPTree extends Serializable

    Permalink
  14. final case class UMAP(nNeighborsIn: Int = 15, nComponents: Int = 2, metric: Distance = new Euclidean, nEpochs: Option[Int] = None, learningRate: Double = 1.0, init: UMAPInitialization = RandomInit, minDist: Double = 0.1, spread: Double = 1.0, setOPMixRatio: Double = 1.0, localConnectivity: Double = 1.0, repulsionStrength: Double = 1.0, negativeSampleRate: Int = 5, transformQueueSize: Double = 4.0, a: Option[Double] = None, b: Option[Double] = None, angularRPForest: Boolean = false, targetNNeighbors: Int = 1, targetMetric: Option[Distance] = None, targetWeight: Double = 0.5, transformSeed: Int = 42, verbose: Boolean = false) extends Product with Serializable

    Permalink

    Uniform Manifold Approximation and Projection

    Uniform Manifold Approximation and Projection

    Finds a low dimensional embedding of the data that approximates an underlying manifold.

    nComponents

    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.

    metric

    function (optional, default 'euclidean') The metric to use to compute distances in high dimensional space.

    nEpochs

    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).

    learningRate

    double (optional, default 1.0) The initial learning rate for the embedding optimization.

    init

    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.

    minDist

    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 spread 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 min_dist this determines how clustered/clumped the embedded points are.

    setOPMixRatio

    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.

    localConnectivity

    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.

    repulsionStrength

    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.

    negativeSampleRate

    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.

    transformQueueSize

    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.

    a

    double (optional, default None) More specific parameters controlling the embedding. If None these values are set automatically as determined by min_dist and spread.

    b

    double (optional, default None) More specific parameters controlling the embedding. If None these values are set automatically as determined by min_dist and spread.

    angularRPForest

    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.

    transformSeed

    int (optional, default 42) Random seed used for the stochastic aspects of the transform operation. This ensures consistency in transform operations.

    verbose

    bool (optional, default False) Controls verbosity of logging.

  15. sealed trait UMAPInitialization extends Serializable

    Permalink
  16. case class UMAPModel(learnedData: Array[Array[Double]], embedding: Array[Array[Double]], nNeighbors: Int, knnIndices: DenseMatrix[Int], knnDists: DenseMatrix[Double], rpForest: Forest, graphX: DenseMatrix[Double], searchGraph: DenseMatrix[Int], a: Double, b: Double, nEpochs: Option[Int], repulsionStrength: Double, negativeSampleRate: Int, metric: Distance, localConnectivity: Double, transformQueueSize: Double, transformSeed: Int, initialAlpha: Double) extends Product with Serializable

    Permalink

Value Members

  1. object NNDescent

    Permalink

  2. object RPTree extends Serializable

    Permalink

  3. object RandomInit extends UMAPInitialization with Product with Serializable

    Permalink
  4. object Sparse extends Serializable

    Permalink

  5. object SpectralInit extends UMAPInitialization with Product with Serializable

    Permalink
  6. object UMAP extends Serializable

    Permalink
  7. object Utils extends Serializable

    Permalink

Ungrouped