Class StandardisationFilter

  • All Implemented Interfaces:
    Configurable, Serializable, CapabilitiesHandler, MOAObject, OptionHandler, ExampleStream, StreamFilter

    public class StandardisationFilter
    extends AbstractStreamFilter
    This filter is to standardise instances in a stream. Z-SCORE is used to standardise the values of a normal distribution. For more information: https://en.wikipedia.org/wiki/Standard_score. The formula is: z=(z-μ)/σ μ is the mean of the population. σ is the standard deviation of the population, as the square root of variance. There are three algorithms for calculating variance. For more information: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Computing_shifted_data 1. Naive algorithm 2. Welford's online algorithm 3. Two-pass algorithm
    Author:
    Ethan Wang
    See Also:
    Serialized Form
    • Field Detail

      • WeightedOptionFloat

        public FloatOption WeightedOptionFloat
      • AlgorithmIndex

        protected int AlgorithmIndex
    • Constructor Detail

      • StandardisationFilter

        public StandardisationFilter()
    • Method Detail

      • restartImpl

        protected void restartImpl()
        Description copied from class: AbstractStreamFilter
        Restarts this filter. All instances that extends from AbstractStreamFilter must implement restartImpl. restart uses restartImpl in AbstractStreamFilter.
        Specified by:
        restartImpl in class AbstractStreamFilter
      • getHeader

        public InstancesHeader getHeader()
        Description copied from interface: ExampleStream
        Gets the header of this stream. This is useful to know attributes and classes. InstancesHeader is an extension of weka.Instances.
        Returns:
        the header of this stream
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int indent)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent