Class

com.microsoft.ml.spark.core.schema

CategoricalMap

Related Doc: package schema

Permalink

class CategoricalMap[T] extends Serializable

A wrapper around level maps: Map[T -> Int] and Map[Int -> T] that converts the data to/from Spark Metadata in both MLib and AzureML formats.

T

Input levels could be String, Double, Int, Long, Boolean

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CategoricalMap
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CategoricalMap(levels: Array[T], isOrdinal: Boolean = false, hasNullLevel: Boolean = false)

    Permalink

    levels

    The level values are assumed to be already sorted as needed

    isOrdinal

    A flag that indicates if the data are ordinal

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. val dataType: DataType

    Permalink

    Spark DataType corresponding to type T

  7. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getIndex(level: T): Int

    Permalink

    Returns the index of the given level, can throw

  12. def getIndexOption(level: T): Option[Int]

    Permalink

    Returns the index of a given level as Option; does not throw

  13. def getLevel(index: Int): T

    Permalink

    Returns the level of the given index; can throw

  14. def getLevelOption(index: Int): Option[T]

    Permalink

    Returns the level of the given index as Option; does not throw

  15. def hasLevel(level: T): Boolean

    Permalink

    Checks if the given level exists

  16. val hasNullLevel: Boolean

    Permalink
  17. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  19. val isOrdinal: Boolean

    Permalink

    A flag that indicates if the data are ordinal

  20. val levels: Array[T]

    Permalink

    The level values are assumed to be already sorted as needed

  21. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  24. val numLevels: Int

    Permalink

    Total number of levels

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

    Permalink
    Definition Classes
    AnyRef
  26. def toMetadata(mmlStyle: Boolean): Metadata

    Permalink

    Add categorical levels and in either MML or MLlib style metadata

    Add categorical levels and in either MML or MLlib style metadata

    mmlStyle

    MML (true) or MLlib metadata (false)

  27. def toMetadata(existingMetadata: Metadata, mmlStyle: Boolean): Metadata

    Permalink

    Add categorical levels to existing Spark Metadata

    Add categorical levels to existing Spark Metadata

    existingMetadata

    [tag, categorical metadata] pair is added to existingMetadata, where tag is either MLlib or MML

    mmlStyle

    MML (true) or MLlib metadata (false)

  28. def toString(): String

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

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped