Class InstancesGeometricOperations


  • public class InstancesGeometricOperations
    extends Object
    Geometric operations for instances
    Since:
    1.4.0
    Version:
    1.4.0
    Author:
    pawel trajdos
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static weka.core.Instance addInstances​(weka.core.Instance i1, weka.core.Instance i2)
      Adds two instances.
      static weka.core.Instance addInstances​(weka.core.Instance i1, weka.core.Instance i2, boolean checkCompatibility)
      Adds two instances.
      static weka.core.Instance scale​(weka.core.Instance inst, double factor)
      Scales the numeric attributes of the instance
      static weka.core.Instance subtractInstances​(weka.core.Instance i1, weka.core.Instance i2)
      Subtracts two instances.
      static weka.core.Instance subtractInstances​(weka.core.Instance i1, weka.core.Instance i2, boolean checkCompatibility)
      Subtracts two instances.
    • Constructor Detail

      • InstancesGeometricOperations

        public InstancesGeometricOperations()
    • Method Detail

      • scale

        public static weka.core.Instance scale​(weka.core.Instance inst,
                                               double factor)
        Scales the numeric attributes of the instance
        Parameters:
        inst - -- instance
        factor - -- scale factor
        Returns:
        -- rescaled instance
        Since:
        1.4.0
      • addInstances

        public static weka.core.Instance addInstances​(weka.core.Instance i1,
                                                      weka.core.Instance i2)
                                               throws Exception
        Adds two instances. Uses only numeric attributes. The remaining attributes will be taken from i1.
        Parameters:
        i1 -
        i2 -
        Returns:
        Throws:
        Exception
        Since:
        1.4.0
      • addInstances

        public static weka.core.Instance addInstances​(weka.core.Instance i1,
                                                      weka.core.Instance i2,
                                                      boolean checkCompatibility)
                                               throws Exception
        Adds two instances. Uses only numeric attributes. The remaining attributes will be taken from i1.
        Parameters:
        i1 -
        i2 -
        checkCompatibility - -- defines whether the compatibility check of the instances is done
        Returns:
        Throws:
        Exception
        Since:
        2.1.0
      • subtractInstances

        public static weka.core.Instance subtractInstances​(weka.core.Instance i1,
                                                           weka.core.Instance i2)
                                                    throws Exception
        Subtracts two instances. Uses only numeric attributes. The remaining attributes will be taken from i1.
        Parameters:
        i1 -
        i2 -
        Returns:
        Throws:
        Exception
        Since:
        1.4.0
      • subtractInstances

        public static weka.core.Instance subtractInstances​(weka.core.Instance i1,
                                                           weka.core.Instance i2,
                                                           boolean checkCompatibility)
                                                    throws Exception
        Subtracts two instances. Uses only numeric attributes. The remaining attributes will be taken from i1.
        Parameters:
        i1 -
        i2 -
        checkCompatibility -
        Returns:
        Throws:
        Exception
        Since:
        2.1.0