Object

com.enriquegrodrigo.spark.crowd.methods

MajorityVoting

Related Doc: package methods

Permalink

object MajorityVoting

Provides functions for transforming an annotation dataset into a standard label dataset using the majority voting approach

This object provides several functions for using majority voting style algorithms over annotations datasets (spark datasets with types com.enriquegrodrigo.spark.crowd.types.BinaryAnnotation, com.enriquegrodrigo.spark.crowd.types.MulticlassAnnotation, or com.enriquegrodrigo.spark.crowd.types.RealAnnotation). For discrete types (com.enriquegrodrigo.spark.crowd.types.BinaryAnnotation, com.enriquegrodrigo.spark.crowd.types.MulticlassAnnotation) the method uses the most frequent class. For continuous types, the mean is used.

The object also provides methods for estimating the probability of a class for the discrete type, computing, for the binary case, the mean of the positive class and, for the multiclass case, the one vs all mean of a class against the others.

Example:
  1. result: Dataset[BinaryLabel] = MajorityVoting.transformBinary(dataset)
Version

0.1

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MajorityVoting
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class ExampleClassCombination(example: Long, clas: Int) extends Product with Serializable

    Permalink

    Combination example class for complete multiclass probability estimation

    Combination example class for complete multiclass probability estimation

    Version

    0.1

  2. case class ExampleClassFrequency(example: Long, clas: Int, freq: Double) extends Product with Serializable

    Permalink

    Frequency of a concrete class for example

    Frequency of a concrete class for example

    Version

    0.1

  3. case class ExampleFrequency(example: Long, freq: Double) extends Product with Serializable

    Permalink

    Number of labels for an example

    Number of labels for an example

    Version

    0.1

  4. class MulticlassMajorityEstimation extends Aggregator[(ExampleClassCombination, MulticlassAnnotation), Double, Double]

    Permalink

    Obtain multiclass soft probability estimation

    Obtain multiclass soft probability estimation

    Version

    0.1

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. def transformBinary(dataset: Dataset[BinaryAnnotation]): Dataset[BinaryLabel]

    Permalink

    Obtains the most frequent class for BinaryAnnotation datasets

    Obtains the most frequent class for BinaryAnnotation datasets

    dataset

    The annotations dataset to be aggregated

  18. def transformMulticlass(dataset: Dataset[MulticlassAnnotation]): Dataset[MulticlassLabel]

    Permalink

    Obtain the most frequent class for all examples in the annotation dataset.

    Obtain the most frequent class for all examples in the annotation dataset.

    dataset

    The annotations dataset to be aggregated

  19. def transformReal(dataset: Dataset[RealAnnotation]): Dataset[RealLabel]

    Permalink

    Obtain the mean of the annotations for a given example.

    Obtain the mean of the annotations for a given example.

    dataset

    The annotations dataset to be aggregated

  20. def transformSoftBinary(dataset: Dataset[BinaryAnnotation]): Dataset[BinarySoftLabel]

    Permalink

    Obtains probability of the class being positive for BinaryAnnotation datasets

    Obtains probability of the class being positive for BinaryAnnotation datasets

    dataset

    The annotations dataset to be aggregated

  21. def transformSoftMulti(dataset: Dataset[MulticlassAnnotation]): Dataset[MulticlassSoftProb]

    Permalink

    Obtain a list of datasets resulting of applying transformSoftBinary to each class against the others

    Obtain a list of datasets resulting of applying transformSoftBinary to each class against the others

    dataset

    The annotations dataset to be aggregated

  22. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped