org.apache.spark.streamdm.core

TextInstance

case class TextInstance(inFeatures: Map[String, Double]) extends Instance with Serializable with Product

A TextInstance is an Instance in which the features are a map of text keys, each associated with a value.

Linear Supertypes
Product, Equals, Instance, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TextInstance
  2. Product
  3. Equals
  4. Instance
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TextInstance(inFeatures: Map[String, Double])

Type Members

  1. type T = TextInstance

    Definition Classes
    TextInstanceInstance

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. def add(input: Instance): TextInstance

    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

    Definition Classes
    TextInstanceInstance
  7. 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

    Definition Classes
    TextInstanceInstance
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. 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

    Definition Classes
    TextInstanceInstance
  11. 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

    Definition Classes
    TextInstanceInstance
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. val features: Map[String, Double]

  14. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  16. 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)

    Definition Classes
    TextInstanceInstance
  17. def hadamard(input: Instance): TextInstance

    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

    Definition Classes
    TextInstanceInstance
  18. val inFeatures: Map[String, Double]

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def map(func: (Double) ⇒ Double): TextInstance

    Apply an operation to every feature of the Instance (essentially a map) TODO try to extend map to this case

    Apply an operation to every feature of the Instance (essentially a map) TODO try to extend map to this case

    func

    the function for the transformation

    returns

    a new Instance with the transformed features

    Definition Classes
    TextInstanceInstance
  21. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  24. 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

    Definition Classes
    TextInstanceInstance
  25. def set(index: Int, input: Double): TextInstance

    Append a feature to the instance

    Append a feature to the instance

    index

    the index at which the feature is set

    input

    the new value of the feature

    returns

    an Instance representing the new feature vector

    Definition Classes
    TextInstanceInstance
  26. def setFeature(key: String, value: Double): TextInstance

    Append a feature to the instance

    Append a feature to the instance

    key

    the key on which the feature is set

    value

    the value on which the feature is set

    returns

    an Instance representing the new feature vector

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def valueAt(key: String): Double

  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from Instance

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped