abstract class FeatureDerivationFunctionSpark extends FeatureDerivationFunctionBase
Spark DataFrame based derived feature base class, Feathr user can extend this class to implement their customized derivation function to produce derived features
see TestDataFrameDerivationFunctionExtractor in feathr repo for example
- Alphabetic
- By Inheritance
- FeatureDerivationFunctionSpark
- FeatureDerivationFunctionBase
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FeatureDerivationFunctionSpark()
Abstract Value Members
-
abstract
def
transform(dataframe: DataFrame): DataFrame
Append the derived feature column, the column name should be the same as declared in the Feathr featureDef file E.g, in the following TestDataFrameDerivationFunctionExtractor (extends FeatureDerivationFunctionSpark), the input dataframe will contain dependent feature columns "f1" and "f2", output DataFrame should contain the output column 'E' derivations: { E: { key: [x, y] inputs: { f1: { key: x, feature: C }, f2: { key: y, feature: D } } class: "com.linkedin.feathr.offline.TestDataFrameDerivationFunctionExtractor" }
Append the derived feature column, the column name should be the same as declared in the Feathr featureDef file E.g, in the following TestDataFrameDerivationFunctionExtractor (extends FeatureDerivationFunctionSpark), the input dataframe will contain dependent feature columns "f1" and "f2", output DataFrame should contain the output column 'E' derivations: { E: { key: [x, y] inputs: { f1: { key: x, feature: C }, f2: { key: y, feature: D } } class: "com.linkedin.feathr.offline.TestDataFrameDerivationFunctionExtractor" }
- dataframe
context DataFrame with all dependency feature columns ready to use, the input columns could be of any valid org.apache.spark.sql.types.DataType
- returns
the transformed DataFrame
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
var
_params: Option[Config]
- Definition Classes
- FeatureDerivationFunctionBase
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getInputFeatureList(): Seq[JoiningFeatureParams]
return dependency/input feature list This function is only used in derivation function that produces multiple derived features, i.e., derived features defined within 'advancedDerivations' section.
return dependency/input feature list This function is only used in derivation function that produces multiple derived features, i.e., derived features defined within 'advancedDerivations' section. Derived features defined in 'derivations' section do not need to override this.
- Definition Classes
- FeatureDerivationFunctionBase
-
def
getOutputFeatureList(): Seq[String]
return output feature list Used together with getInputFeatureList()
return output feature list Used together with getInputFeatureList()
- Definition Classes
- FeatureDerivationFunctionBase
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
init(params: Config): Unit
init with parameter map
init with parameter map
- Definition Classes
- FeatureDerivationFunctionBase
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
validateInputSchema(schema: StructType): Unit
Check the validity of the input DataFrame, raise an exception if the schema is invalid, e.g, does not contain required input columns or has incorrect column types It is the developer's responsibility to validate the input schema's validity
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()