public class MDS extends Object implements VisualizationTransform
transform(jsat.linear.Matrix, java.util.concurrent.ExecutorService)
.Constructor and Description |
---|
MDS() |
Modifier and Type | Method and Description |
---|---|
DistanceMetric |
getEmbeddingMetric() |
int |
getTargetDimension() |
double |
getTolerance() |
void |
setEmbeddingMetric(DistanceMetric embedMetric)
Sets the distance metric to use when creating the initial dissimilarity
matrix of a new dataset.
|
boolean |
setTargetDimension(int target)
Sets the target dimension to embed new dataset to.
|
void |
setTolerance(double tolerance)
Sets the tolerance parameter for determining convergence.
|
<Type extends DataSet> |
transform(DataSet<Type> d)
Transforms the given data set, returning a dataset of the same type.
|
<Type extends DataSet> |
transform(DataSet<Type> d,
ExecutorService ex)
Transforms the given data set, returning a dataset of the same type.
|
SimpleDataSet |
transform(Matrix delta) |
SimpleDataSet |
transform(Matrix delta,
ExecutorService ex) |
public void setTolerance(double tolerance)
tolerance
- the tolerance for declaring convergencepublic double getTolerance()
public void setEmbeddingMetric(DistanceMetric embedMetric)
Euclidean
distance is used, but any distance may be substituted.The chosen
distance need not be a valid metric, its only requirement is symmetry.embedMetric
- the distance metric to use when creating the
dissimilarity matrix.public DistanceMetric getEmbeddingMetric()
public <Type extends DataSet> Type transform(DataSet<Type> d)
VisualizationTransform
transform
in interface VisualizationTransform
Type
- the dataset typed
- the data set to transformpublic <Type extends DataSet> Type transform(DataSet<Type> d, ExecutorService ex)
VisualizationTransform
transform
in interface VisualizationTransform
Type
- the dataset typed
- the data set to transformex
- the source of threads for parallel computationpublic SimpleDataSet transform(Matrix delta)
public SimpleDataSet transform(Matrix delta, ExecutorService ex)
public int getTargetDimension()
getTargetDimension
in interface VisualizationTransform
public boolean setTargetDimension(int target)
VisualizationTransform
setTargetDimension
in interface VisualizationTransform
target
- the new target dimension size when VisualizationTransform.transform(jsat.DataSet)
is called.true
if this transform supports that dimension and it was
set, false
if the target dimension is unsupported and the
previous value will be used instead.Copyright © 2017. All rights reserved.