Packages

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)

    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
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. val dataType: DataType

    Spark DataType corresponding to type T

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def getIndex(level: T): Int

    Returns the index of the given level, can throw

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

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

  13. def getLevel(index: Int): T

    Returns the level of the given index; can throw

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

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

  15. def hasLevel(level: T): Boolean

    Checks if the given level exists

  16. val hasNullLevel: Boolean
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. val isOrdinal: Boolean
  20. val levels: Array[T]
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. val numLevels: Int

    Total number of levels

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toMetadata(mmlStyle: Boolean): Metadata

    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

    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
    Definition Classes
    AnyRef → Any
  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( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped