Class/Object

org.clustering4ever.scala.umap

UMAP

Related Docs: object UMAP | package umap

Permalink

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

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.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UMAP
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var a: Option[Double]

    Permalink

    double (optional, default None) More specific parameters controlling the embedding.

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

  5. val angularRPForest: Boolean

    Permalink

    bool (optional, default False) Whether to use an angular random projection forest to initialise the approximate nearest neighbor search.

    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.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. var b: Option[Double]

    Permalink

    double (optional, default None) More specific parameters controlling the embedding.

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

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def fit(xData: Array[Array[Double]], y: Option[Array[Double]] = None): Option[UMAPModel]

    Permalink
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  12. val init: UMAPInitialization

    Permalink

    string (optional, default 'random') How to initialize the low dimensional embedding.

    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.

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val learningRate: Double

    Permalink

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

  15. val localConnectivity: Double

    Permalink

    int (optional, default 1) The local connectivity required -- i.e.

    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.

  16. val metric: Distance

    Permalink

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

  17. val minDist: Double

    Permalink

    double (optional, default 0.1) The effective minimum distance between embedded points.

    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.

  18. val nComponents: Int

    Permalink

    int (optional, default 2) The dimension of the space to embed into.

    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.

  19. val nEpochs: Option[Int]

    Permalink

    int (optional, default None) The number of training epochs to be used in optimizing the low dimensional embedding.

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

  20. val nNeighborsIn: Int

    Permalink
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. val negativeSampleRate: Int

    Permalink

    int (optional, default 5) The number of negative samples to select per positive sample in the optimization process.

    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.

  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  25. val repulsionStrength: Double

    Permalink

    double (optional, default 1.0) Weighting applied to negative samples in low dimensional embedding optimization.

    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.

  26. val setOPMixRatio: Double

    Permalink

    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.

    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.

  27. val spread: Double

    Permalink

    double (optional, default 1.0) The effective scale of embedded points.

    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.

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. val targetMetric: Option[Distance]

    Permalink
  30. val targetNNeighbors: Int

    Permalink
  31. val targetWeight: Double

    Permalink
  32. val transformQueueSize: Double

    Permalink

    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.

    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.

  33. val transformSeed: Int

    Permalink

    int (optional, default 42) Random seed used for the stochastic aspects of the transform operation.

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

  34. val verbose: Boolean

    Permalink

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

  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped