Class

com.salesforce.op.stages.impl.feature

OPCollectionTransformer

Related Doc: package feature

Permalink

sealed abstract class OPCollectionTransformer[I <: FeatureType, O <: FeatureType, ICol <: OPCollection, OCol <: OPCollection] extends UnaryTransformer[ICol, OCol]

Abstract base class for a set of transformer wrappers that allow unary transformers between non-collection types to be used on collection types. For example, we can use a UnaryLambdaTransformer[Email, Integer] on a map's values, creating a UnaryLambdaTransformer[EmailMap, IntegralMap]. This base class will be inherited by concrete classes for OPMaps, OPList, and OPSets (in order to enforce not allowing these collection types to be transformed into each other, eg. no MultiPickList to RealMap transformations).

The OP type hierarchy does not allow direct type checking of such transformer wrappers (eg. Real#Value is Option[Double] and RealMap#Value is Map[String, Double], so there's no way to enforce that a RealMap can only hold what is contained in a Real) since the types themselves are not created with typetags for performance reasons. However, we can still enforce that operations like building a UnaryLambdaTransformer[RealMap, StringMap] from a UnaryLambdaTransformer[Real, Integer] is not possible by using the Spark types in validateTypes.

I

input feature type for supplied non-collection transformer

O

output feature type for supplied non-collection transformer

ICol

input feature type for desired collection transformer

OCol

output feature type for desired collection transformer

Linear Supertypes
UnaryTransformer[ICol, OCol], OpTransformer1[ICol, OCol], OpTransformer, OpPipelineStage1[ICol, OCol], HasIn1, OpPipelineStage[OCol], OpPipelineStageBase, MLWritable, OpPipelineStageParams, InputParams, Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OPCollectionTransformer
  2. UnaryTransformer
  3. OpTransformer1
  4. OpTransformer
  5. OpPipelineStage1
  6. HasIn1
  7. OpPipelineStage
  8. OpPipelineStageBase
  9. MLWritable
  10. OpPipelineStageParams
  11. InputParams
  12. Transformer
  13. PipelineStage
  14. Logging
  15. Params
  16. Serializable
  17. Serializable
  18. Identifiable
  19. AnyRef
  20. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final type InputFeatures = FeatureLike[ICol]

    Permalink
    Definition Classes
    OpPipelineStage1 → OpPipelineStage → InputParams
  2. type KeyValue = (String) ⇒ Any

    Permalink
    Definition Classes
    OpTransformer
  3. final type OutputFeatures = FeatureLike[OCol]

    Permalink
    Definition Classes
    OpPipelineStage → OpPipelineStageBase

Abstract Value Members

  1. abstract def doTransform(in: ICol): Any

    Permalink

    Function that transforms the relevant entry of the collection based on the supplied transformer.

    Function that transforms the relevant entry of the collection based on the supplied transformer. OPLists and OPSets have their entries transformed, and OPMaps have just their values transformed.

    Attributes
    protected

Concrete 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 $[T](param: Param[T]): T

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  4. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  6. final def checkInputLength(features: Array[_]): Boolean

    Permalink
    Definition Classes
    OpPipelineStage1 → InputParams
  7. final def checkSerializable: Try[Unit]

    Permalink
    Definition Classes
    OpTransformer1 → OpPipelineStageBase
  8. final def clear(param: Param[_]): OPCollectionTransformer.this.type

    Permalink
    Definition Classes
    Params
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def copy(extra: ParamMap): OPCollectionTransformer.this.type

    Permalink
    Definition Classes
    OpPipelineStageBase → Params
  11. def copyValues[T <: Params](to: T, extra: ParamMap): T

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  12. final def defaultCopy[T <: Params](extra: ParamMap): T

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def explainParam(param: Param[_]): String

    Permalink
    Definition Classes
    Params
  16. def explainParams(): String

    Permalink
    Definition Classes
    Params
  17. final def extractParamMap(): ParamMap

    Permalink
    Definition Classes
    Params
  18. final def extractParamMap(extra: ParamMap): ParamMap

    Permalink
    Definition Classes
    Params
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def get[T](param: Param[T]): Option[T]

    Permalink
    Definition Classes
    Params
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def getDefault[T](param: Param[T]): Option[T]

    Permalink
    Definition Classes
    Params
  23. final def getInputFeature[T <: FeatureType](i: Int): Option[FeatureLike[T]]

    Permalink
    Definition Classes
    InputParams
  24. final def getInputFeatures(): Array[OPFeature]

    Permalink
    Definition Classes
    InputParams
  25. final def getInputSchema(): StructType

    Permalink
    Definition Classes
    OpPipelineStageParams
  26. final def getMetadata(): Metadata

    Permalink
    Definition Classes
    OpPipelineStageParams
  27. final def getOrDefault[T](param: Param[T]): T

    Permalink
    Definition Classes
    Params
  28. def getOutput(): FeatureLike[OCol]

    Permalink
    Definition Classes
    OpPipelineStage1 → OpPipelineStageBase
  29. final def getOutputFeatureName: String

    Permalink
    Definition Classes
    OpPipelineStage
  30. def getParam(paramName: String): Param[Any]

    Permalink
    Definition Classes
    Params
  31. final def getTransientFeature(i: Int): Option[TransientFeature]

    Permalink
    Definition Classes
    InputParams
  32. final def getTransientFeatures(): Array[TransientFeature]

    Permalink
    Definition Classes
    InputParams
  33. final def hasDefault[T](param: Param[T]): Boolean

    Permalink
    Definition Classes
    Params
  34. def hasParam(paramName: String): Boolean

    Permalink
    Definition Classes
    Params
  35. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def in1: TransientFeature

    Permalink
    Attributes
    protected
    Definition Classes
    HasIn1
  37. val inFactory: FeatureTypeSparkConverter[I]

    Permalink
  38. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  39. final def inputAsArray(in: InputFeatures): Array[OPFeature]

    Permalink
    Definition Classes
    OpPipelineStage1 → InputParams
  40. final def isDefined(param: Param[_]): Boolean

    Permalink
    Definition Classes
    Params
  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. final def isSet(param: Param[_]): Boolean

    Permalink
    Definition Classes
    Params
  43. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  44. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  45. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  46. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  47. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  48. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  49. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  50. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  51. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  52. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  53. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  54. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  55. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  56. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  59. def onGetMetadata(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    OpPipelineStageParams
  60. def onSetInput(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    OpPipelineStageBase
  61. val operationName: String

    Permalink

    unique name of the operation this stage performs

    unique name of the operation this stage performs

    Definition Classes
    UnaryTransformer → OpPipelineStageBase
  62. val outEmpty: OCol

    Permalink
  63. val outFactory: FeatureTypeFactory[OCol]

    Permalink
  64. final def outputAsArray(out: OutputFeatures): Array[OPFeature]

    Permalink
    Definition Classes
    OpPipelineStage → OpPipelineStageBase
  65. def outputFeatureUid: String

    Permalink
    Attributes
    protected[com.salesforce.op]
    Definition Classes
    OpPipelineStage1 → OpPipelineStage
  66. def outputIsResponse: Boolean

    Permalink
    Definition Classes
    OpPipelineStage
  67. lazy val params: Array[Param[_]]

    Permalink
    Definition Classes
    Params
  68. def save(path: String): Unit

    Permalink
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  69. final def set(paramPair: ParamPair[_]): OPCollectionTransformer.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  70. final def set(param: String, value: Any): OPCollectionTransformer.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  71. final def set[T](param: Param[T], value: T): OPCollectionTransformer.this.type

    Permalink
    Definition Classes
    Params
  72. final def setDefault(paramPairs: ParamPair[_]*): OPCollectionTransformer.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  73. final def setDefault[T](param: Param[T], value: T): OPCollectionTransformer.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    Params
  74. final def setInput(features: InputFeatures): OPCollectionTransformer.this.type

    Permalink
    Definition Classes
    OpPipelineStageBase
  75. final def setInputFeatures[S <: OPFeature](features: Array[S]): OPCollectionTransformer.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    InputParams
  76. final def setMetadata(m: Metadata): OPCollectionTransformer.this.type

    Permalink
    Definition Classes
    OpPipelineStageParams
  77. def setOutputFeatureName(name: String): OPCollectionTransformer.this.type

    Permalink
    Definition Classes
    OpPipelineStage
  78. final def stageName: String

    Permalink
    Definition Classes
    OpPipelineStageBase
  79. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    Identifiable → AnyRef → Any
  81. def transform(dataset: Dataset[_]): DataFrame

    Permalink
    Definition Classes
    OpTransformer1 → Transformer
  82. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame

    Permalink
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  83. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame

    Permalink
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  84. def transformFn: (ICol) ⇒ OCol

    Permalink
    Definition Classes
    OPCollectionTransformer → OpTransformer1
  85. lazy val transformKeyValue: (KeyValue) ⇒ Any

    Permalink
    Definition Classes
    OpTransformer1 → OpTransformer
  86. def transformMap: (Map[String, Any]) ⇒ Any

    Permalink
    Definition Classes
    OpTransformer
  87. def transformRow: (Row) ⇒ Any

    Permalink
    Definition Classes
    OpTransformer
  88. final def transformSchema(schema: StructType): StructType

    Permalink
    Definition Classes
    OpPipelineStageBase
  89. def transformSchema(schema: StructType, logging: Boolean): StructType

    Permalink
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  90. def transformValue(value: Any): Any

    Permalink

    Function that takes the values contained in our FeatureTypes and converts them to/from types that the supplied UnaryTransformer operates on and applies the unary transformation.

    Function that takes the values contained in our FeatureTypes and converts them to/from types that the supplied UnaryTransformer operates on and applies the unary transformation. Note that this does not do any checks on the output, so if the unary transformer function produces a null, then we leave that in the map (Map[String, Long] can still contain eg. ("a" -> null))

    value

    input value contained in type ICol (eg. if ICol is TextMap, then value is Map[String, String])

    returns

    transformed output value contained

    Attributes
    protected
  91. val transformer: UnaryTransformer[I, O]

    Permalink

    UnaryTransformer on non-collection types that we wish to use on collection types

  92. implicit val tti: scala.reflect.api.JavaUniverse.TypeTag[ICol]

    Permalink

    type tag for input

    type tag for input

    Definition Classes
    UnaryTransformer → OpTransformer1
  93. implicit val tto: scala.reflect.api.JavaUniverse.TypeTag[OCol]

    Permalink

    type tag for output

    type tag for output

    Definition Classes
    UnaryTransformer → OpPipelineStage1
  94. implicit val ttov: scala.reflect.api.JavaUniverse.TypeTag[OCol.Value]

    Permalink

    type tag for output value

    type tag for output value

    Definition Classes
    UnaryTransformer → OpPipelineStage1
  95. val uid: String

    Permalink

    uid for instance

    uid for instance

    Definition Classes
    UnaryTransformer → Identifiable
  96. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  99. final def write: MLWriter

    Permalink
    Definition Classes
    OpPipelineStageBase → MLWritable

Inherited from UnaryTransformer[ICol, OCol]

Inherited from OpTransformer1[ICol, OCol]

Inherited from OpTransformer

Inherited from OpPipelineStage1[ICol, OCol]

Inherited from HasIn1

Inherited from OpPipelineStage[OCol]

Inherited from OpPipelineStageBase

Inherited from MLWritable

Inherited from OpPipelineStageParams

Inherited from InputParams

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

Ungrouped