Class DyadMinMaxScaler
- java.lang.Object
-
- ai.libs.jaicore.ml.ranking.dyad.learner.util.AbstractDyadScaler
-
- ai.libs.jaicore.ml.ranking.dyad.learner.util.DyadMinMaxScaler
-
- All Implemented Interfaces:
java.io.Serializable
public class DyadMinMaxScaler extends AbstractDyadScaler
A scaler that can be fit to a certain dataset and then be used to normalize dyad datasets, i.e. transform the data such that the values of each feature lie between 0 and 1. For feature x: x = x - x_min / (x_max - x_min)- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class ai.libs.jaicore.ml.ranking.dyad.learner.util.AbstractDyadScaler
statsX, statsY
-
-
Constructor Summary
Constructors Constructor Description DyadMinMaxScaler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPrettyMaximaString()Returns a String the maxima of all features this scaler has been fit to.java.lang.StringgetPrettyMinimaString()Returns a String for the minima of all features this scaler has been fit to.voidtransformAlternatives(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, java.util.List<java.lang.Integer> ignoredIndices)Transforms only the alternatives of each dyad according to the mean and standard deviation of the data the scaler has been fit to.voidtransformInstaceVector(org.api4.java.common.math.IVector vector, java.util.List<java.lang.Integer> ignoredIndices)Transforms an instance feature vector.voidtransformInstances(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, java.util.List<java.lang.Integer> ignoredIndices)Transforms only the instances of each dyad according to the mean and standard deviation of the data the scaler has been fit to.voiduntransform(DyadRankingDataset dataset)voiduntransformAlternative(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad)Undoes the transformation on the alternative of a single dyad.voiduntransformAlternative(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, int decimals)Undoes the transformation on the alternative of a single dyad.voiduntransformAlternatives(DyadRankingDataset dataset)Undoes the transformation of the alternatives of each dyad.voiduntransformAlternatives(DyadRankingDataset dataset, int decimals)Undoes the transformation of the alternatives of each dyad.voiduntransformInstance(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad)Undoes the transformation of the instance of a single dyad.voiduntransformInstance(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, int decimals)Undoes the transformation of the instance of a single dyad.voiduntransformInstances(DyadRankingDataset dataset)Undoes the transformation of the instances of each dyad.voiduntransformInstances(DyadRankingDataset dataset, int decimals)Undoes the transformation of the instances of each dyad.-
Methods inherited from class ai.libs.jaicore.ml.ranking.dyad.learner.util.AbstractDyadScaler
fit, fitTransform, getPrettyMeansString, getPrettySTDString, getStatsX, getStatsY, transform, transformAlternatives, transformAlternatives, transformAlternatives, transformInstances, transformInstances, transformInstances, transformInstances
-
-
-
-
Method Detail
-
untransform
public void untransform(DyadRankingDataset dataset)
-
untransformInstances
public void untransformInstances(DyadRankingDataset dataset)
Undoes the transformation of the instances of each dyad.- Parameters:
dataset-
-
untransformInstances
public void untransformInstances(DyadRankingDataset dataset, int decimals)
Undoes the transformation of the instances of each dyad.- Parameters:
dataset-decimals- number of decimal places for rounding
-
untransformInstance
public void untransformInstance(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad)
Undoes the transformation of the instance of a single dyad.- Parameters:
dyad-
-
untransformInstance
public void untransformInstance(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, int decimals)Undoes the transformation of the instance of a single dyad.- Parameters:
dyad-decimals- number of decimal places for rounding
-
untransformAlternatives
public void untransformAlternatives(DyadRankingDataset dataset)
Undoes the transformation of the alternatives of each dyad.- Parameters:
dataset-
-
untransformAlternatives
public void untransformAlternatives(DyadRankingDataset dataset, int decimals)
Undoes the transformation of the alternatives of each dyad.- Parameters:
dataset-decimals- number of de
-
untransformAlternative
public void untransformAlternative(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad)
Undoes the transformation on the alternative of a single dyad.- Parameters:
dyad-
-
untransformAlternative
public void untransformAlternative(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, int decimals)Undoes the transformation on the alternative of a single dyad.- Parameters:
dyad-
-
getPrettyMaximaString
public java.lang.String getPrettyMaximaString()
Returns a String the maxima of all features this scaler has been fit to.
-
getPrettyMinimaString
public java.lang.String getPrettyMinimaString()
Returns a String for the minima of all features this scaler has been fit to.
-
transformInstances
public void transformInstances(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, java.util.List<java.lang.Integer> ignoredIndices)Description copied from class:AbstractDyadScalerTransforms only the instances of each dyad according to the mean and standard deviation of the data the scaler has been fit to. The attributes with indices contained in ignoredIndices are not transformed. {- Specified by:
transformInstancesin classAbstractDyadScalerignoredIndices- TheListof indices that are been ignored by the scaler.
-
transformAlternatives
public void transformAlternatives(org.api4.java.ai.ml.ranking.dyad.dataset.IDyad dyad, java.util.List<java.lang.Integer> ignoredIndices)Description copied from class:AbstractDyadScalerTransforms only the alternatives of each dyad according to the mean and standard deviation of the data the scaler has been fit to.- Specified by:
transformAlternativesin classAbstractDyadScalerignoredIndices- TheListof indices that are been ignored by the scaler.
-
transformInstaceVector
public void transformInstaceVector(org.api4.java.common.math.IVector vector, java.util.List<java.lang.Integer> ignoredIndices)Description copied from class:AbstractDyadScalerTransforms an instance feature vector.- Specified by:
transformInstaceVectorin classAbstractDyadScaler
-
-