org.apache.spark.streamdm.core

Instance

trait Instance extends Serializable

An Instance represents the input or output of any learning algorithm. It is normally composed of a feature vector (having various implementations).

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Instance
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type T <: Instance

Abstract Value Members

  1. abstract def add(input: Instance): T

    Perform an element by element addition between two instances

    Perform an element by element addition between two instances

    input

    an Instance which is added up

    returns

    an Instance representing the added Instances

  2. abstract def apply(index: Int): Double

    Get the value present at position index

    Get the value present at position index

    index

    the index of the features

    returns

    a Double representing the feature value, or 0 if the index is not present in the underlying data structure

  3. abstract def distanceTo(input: Instance): Double

    Compute the Euclidean distance to another Instance

    Compute the Euclidean distance to another Instance

    input

    the Instance to which the distance is computed

    returns

    a Double representing the distance value

  4. abstract def dot(input: Instance): Double

    Perform a dot product between two instances

    Perform a dot product between two instances

    input

    an Instance with which the dot product is performed

    returns

    a Double representing the dot product

  5. abstract def getFeatureIndexArray(): Array[(Double, Int)]

    Return an array of features and indexes

    Return an array of features and indexes

    returns

    an array of turple2(value,index)

  6. abstract def hadamard(input: Instance): T

    Perform an element by element multiplication between two instances

    Perform an element by element multiplication between two instances

    input

    an Instance which is multiplied

    returns

    an Instance representing the Hadamard product

  7. abstract def map(func: (Double) ⇒ Double): T

    Apply an operation to every feature of the Instance

    Apply an operation to every feature of the Instance

    func

    the function for the transformation

    returns

    a new Instance with the transformed features

  8. abstract def reduce(func: (Double, Double) ⇒ Double): Double

    Aggregate the values of an instance

    Aggregate the values of an instance

    func

    the function for the transformation

    returns

    the reduced value

  9. abstract def set(index: Int, input: Double): T

    Add a feature to the instance

    Add a feature to the instance

    index

    the index at which the value is added

    input

    the feature value which is added up

    returns

    an Instance representing the new feature vector

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped