jsat.datatransform.visualization
Interface VisualizationTransform
-
- All Superinterfaces:
- java.lang.Cloneable, java.io.Serializable
public interface VisualizationTransform extends java.lang.Cloneable, java.io.SerializableVisualization Transform is similar to theDataTransforminterface, except it can not necessarily be applied to new datapoints. Classes implementing this interface are intended to create 2D or 3D versions of a dataset that can be visualized easily.
By default, all implementations will create a 2D projection of the data if supported.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method and Description intgetTargetDimension()booleansetTargetDimension(int target)Sets the target dimension to embed new dataset to.default <Type extends DataSet>
Typetransform(DataSet<Type> d)Transforms the given data set, returning a dataset of the same type.<Type extends DataSet>
Typetransform(DataSet<Type> d, boolean parallel)Transforms the given data set, returning a dataset of the same type.
-
-
-
Method Detail
-
getTargetDimension
int getTargetDimension()
- Returns:
- the number of dimensions that a dataset will be embedded down to
-
setTargetDimension
boolean setTargetDimension(int target)
Sets 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.- Parameters:
target- the new target dimension size whentransform(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.
-
transform
default <Type extends DataSet> Type transform(DataSet<Type> d)
Transforms the given data set, returning a dataset of the same type.- Type Parameters:
Type- the dataset type- Parameters:
d- the data set to transform- Returns:
- the lower dimension dataset for visualization.
-
transform
<Type extends DataSet> Type transform(DataSet<Type> d, boolean parallel)
Transforms the given data set, returning a dataset of the same type.- 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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG