jsat.datatransform.visualization
Class Isomap
- java.lang.Object
-
- jsat.datatransform.visualization.Isomap
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, VisualizationTransform
public class Isomap extends java.lang.Object implements VisualizationTransform
Isomap is an extension ofMDS. It uses a geodesic distance made from a nearest neighbor search of all the points in the data set. This implementation also includes the extensionC-Isomap, which further weights distances by density.
Note, that Isomap normally will fail on some datasets when two or more regions can not be connected in the induced neighbor graph. While increasing the number of neighbors considered will eventually resolve this problem, the separated groups may be desirable in practice. This implementation includes a non-standard addition that will forcibly connect such isolated regions with very large values, hoping to preserve the farther distances in the given dataset while maintaining local structure.
See:
- Tenenbaum, J. B., Silva, V. De, & Langford, J. C. (2000). A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science, 290, 2319–2323. doi:10.1126/science.290.5500.2319
- De Silva, V., & Tenenbaum, J. B. (2003). Global Versus Local Methods in Nonlinear Dimensionality Reduction. In Advances in Neural Information Processing Systems 15 (pp. 705–712). MIT Press. Retrieved from here
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Isomap()Isomap(int searchNeighbors)Isomap(int searchNeighbors, boolean c_isomap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetNeighbors()intgetTargetDimension()booleanisCIsomap()voidsetCIsomap(boolean c_isomap)Controls whether the C-Isomap extension is used.voidsetNeighbors(int searchNeighbors)Set the number of neighbors to consider for the initial graph in IsomapbooleansetTargetDimension(int target)Sets the target dimension to embed new dataset to.<Type extends DataSet>
Typetransform(DataSet<Type> d, boolean parallel)Transforms the given data set, returning a dataset of the same type.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.datatransform.visualization.VisualizationTransform
transform
-
-
-
-
Constructor Detail
-
Isomap
public Isomap()
-
Isomap
public Isomap(int searchNeighbors)
- Parameters:
searchNeighbors- the number of nearest neighbors to consider
-
Isomap
public Isomap(int searchNeighbors, boolean c_isomap)- Parameters:
searchNeighbors- the number of nearest neighbors to considerc_isomap-trueto use the C-Isomap extension,falsefor normal Isomap.
-
-
Method Detail
-
setNeighbors
public void setNeighbors(int searchNeighbors)
Set the number of neighbors to consider for the initial graph in Isomap- Parameters:
searchNeighbors- the number of nearest neighbors to consider
-
getNeighbors
public int getNeighbors()
- Returns:
- the number of neighbors used when creating the initial graph
-
setCIsomap
public void setCIsomap(boolean c_isomap)
Controls whether the C-Isomap extension is used. If set true, the initial distances will also be scaled based on the density of the region between the points. If false, normal Isomap will be used.- Parameters:
c_isomap-trueto use the C-Isomap extension,falsefor normal Isomap.
-
isCIsomap
public boolean isCIsomap()
- Returns:
trueif the C-Isomap extension is in use,falsefor normal Isomap.
-
transform
public <Type extends DataSet> Type transform(DataSet<Type> d, boolean parallel)
Description copied from interface:VisualizationTransformTransforms the given data set, returning a dataset of the same type.- Specified by:
transformin interfaceVisualizationTransform- Type Parameters:
Type- the dataset type- Parameters:
d- the data set to transformparallel-trueif transform should be done in parallel, orfalseif it should use a single thread.- Returns:
- the lower dimension dataset for visualization.
-
getTargetDimension
public int getTargetDimension()
- Specified by:
getTargetDimensionin interfaceVisualizationTransform- Returns:
- the number of dimensions that a dataset will be embedded down to
-
setTargetDimension
public boolean setTargetDimension(int target)
Description copied from interface:VisualizationTransformSets the target dimension to embed new dataset to. Many visualization methods may only support a target of 2 or 3 dimensions, or only one of those options. For that reason a boolean value will be returned indicating if the target size was acceptable. If not, no change to the object will occur.- Specified by:
setTargetDimensionin interfaceVisualizationTransform- Parameters:
target- the new target dimension size whenVisualizationTransform.transform(jsat.DataSet)is called.- Returns:
trueif this transform supports that dimension and it was set,falseif the target dimension is unsupported and the previous value will be used instead.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG