Documentation of 'jsat.datatransform.RemoveAttributeTransform' Java class
RemoveAttributeTransform
jsat.datatransform

Class RemoveAttributeTransform

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, DataTransform
    Direct Known Subclasses:
    MutualInfoFS, ReliefF, SBS


    public class RemoveAttributeTransform
    extends java.lang.Object
    implements DataTransform
    This Data Transform allows the complete removal of specific features from the data set.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      RemoveAttributeTransform(DataSet dataSet, java.util.Set<java.lang.Integer> categoricalToRemove, java.util.Set<java.lang.Integer> numericalToRemove)
      Creates a new transform for removing specified features from a data set
      RemoveAttributeTransform(java.util.Set<java.lang.Integer> categoricalToRemove, java.util.Set<java.lang.Integer> numericalToRemove)
      Creates a new transform for removing specified features from a data set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      RemoveAttributeTransform clone() 
      void consolidate(RemoveAttributeTransform preceding)
      A serious of Remove Attribute Transforms may be learned and applied sequentially to a single data set.
      void fit(DataSet data)
      Fits this transform to the given dataset.
      java.util.List<java.lang.Integer> getKeptNominal()
      Returns an unmodifiable list of the original indices of the nominal attributes that will be kept when this transform is applied.
      java.util.List<java.lang.Integer> getKeptNumeric()
      Returns an unmodifiable list of the original indices of the numeric attributes that will be kept when this transform is applied.
      java.util.Map<java.lang.Integer,java.lang.Integer> getReverseNominalMap()
      Returns a mapping from the nominal indices in the transformed space back to their original indices
      java.util.Map<java.lang.Integer,java.lang.Integer> getReverseNumericMap()
      Returns a mapping from the numeric indices in the transformed space back to their original indices
      DataPoint transform(DataPoint dp)
      Returns a new data point that is a transformation of the original data point.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RemoveAttributeTransform

        public RemoveAttributeTransform(java.util.Set<java.lang.Integer> categoricalToRemove,
                                        java.util.Set<java.lang.Integer> numericalToRemove)
        Creates a new transform for removing specified features from a data set. Needs to still call fit(jsat.DataSet) before ready to be used.
        Parameters:
        categoricalToRemove - the set of categorical attributes to remove, in the rage of [0, DataSet.getNumCategoricalVars()).
        numericalToRemove - the set of numerical attributes to remove, in the rage of [0, DataSet.getNumNumericalVars()).
      • RemoveAttributeTransform

        public RemoveAttributeTransform(DataSet dataSet,
                                        java.util.Set<java.lang.Integer> categoricalToRemove,
                                        java.util.Set<java.lang.Integer> numericalToRemove)
        Creates a new transform for removing specified features from a data set
        Parameters:
        dataSet - the data set that this transform is meant for
        categoricalToRemove - the set of categorical attributes to remove, in the rage of [0, DataSet.getNumCategoricalVars()).
        numericalToRemove - the set of numerical attributes to remove, in the rage of [0, DataSet.getNumNumericalVars()).
    • Method Detail

      • getKeptNumeric

        public java.util.List<java.lang.Integer> getKeptNumeric()
        Returns an unmodifiable list of the original indices of the numeric attributes that will be kept when this transform is applied.
        Returns:
        the numeric indices that are not removed by this transform
      • getReverseNumericMap

        public java.util.Map<java.lang.Integer,java.lang.Integer> getReverseNumericMap()
        Returns a mapping from the numeric indices in the transformed space back to their original indices
        Returns:
        a mapping from the transformed numeric space to the original one
      • getKeptNominal

        public java.util.List<java.lang.Integer> getKeptNominal()
        Returns an unmodifiable list of the original indices of the nominal attributes that will be kept when this transform is applied.
        Returns:
        the nominal indices that are not removed by this transform
      • getReverseNominalMap

        public java.util.Map<java.lang.Integer,java.lang.Integer> getReverseNominalMap()
        Returns a mapping from the nominal indices in the transformed space back to their original indices
        Returns:
        a mapping from the transformed nominal space to the original one
      • fit

        public void fit(DataSet data)
        Description copied from interface: DataTransform
        Fits this transform to the given dataset. Some transforms can only be learned from classification or regression datasets. If an incompatible dataset type is given, a FailedToFitException exception may be thrown.
        Specified by:
        fit in interface DataTransform
        Parameters:
        data - the dataset to fir this transform to
      • consolidate

        public void consolidate(RemoveAttributeTransform preceding)
        A serious of Remove Attribute Transforms may be learned and applied sequentially to a single data set. Instead of keeping all the transforms around indefinitely, a sequential series of Remove Attribute Transforms can be consolidated into a single transform object.
        This method mutates the this transform by providing it with the transform that would have been applied before this current object. Once complete, this transform can be used two perform both removals in one step.

        Example:
        An initial set of features A is transformed into A' by transform t1
        A' is transformed into A'' by transform t2
        Instead, you can invoke t2.consolidate(t1). You can then transform A into A'' by using only transform t2
        Parameters:
        preceding - the DataTransform that immediately precedes this one in a sequential list of transforms
      • transform

        public DataPoint transform(DataPoint dp)
        Description copied from interface: DataTransform
        Returns a new data point that is a transformation of the original data point. This new data point is a different object, but may contain the same references as the original data point. It is not guaranteed that you can mutate the transformed point without having a side effect on the original point.
        Specified by:
        transform in interface DataTransform
        Parameters:
        dp - the data point to apply a transformation to
        Returns:
        a transformed data point

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.