Class FilteredSparseInstance

  • All Implemented Interfaces:
    Instance, MultiLabelInstance, Serializable

    public class FilteredSparseInstance
    extends SparseInstance
    The Class FilteredSparseInstance. This class is an extension to the original SparseInstance. It has been created to be used with feature selection algorithms for data streams. In contrast to SparseInstance objects, missing values are represented as NaNs instead of 0s (zeros). This allows learners to skip features with missing values.
    Author:
    Jean Paul Barddal
    See Also:
    Serialized Form
    • Constructor Detail

      • FilteredSparseInstance

        public FilteredSparseInstance​(double d,
                                      double[] res)
        Instantiates a new sparse instance.
        Parameters:
        d - the d
        res - the res
      • FilteredSparseInstance

        public FilteredSparseInstance​(InstanceImpl inst)
        Instantiates a new sparse instance.
        Parameters:
        inst - the inst
      • FilteredSparseInstance

        public FilteredSparseInstance​(double numberAttributes)
        Instantiates a new sparse instance.
        Parameters:
        numberAttributes - the number attributes
      • FilteredSparseInstance

        public FilteredSparseInstance​(double weight,
                                      double[] attributeValues,
                                      int[] indexValues,
                                      int numberAttributes)
        Instantiates a new sparse instance.
        Parameters:
        weight - the weight
        attributeValues - the attribute values
        indexValues - the index values
        numberAttributes - the number attributes