Packages

class FeatureBalanceMeasure extends Transformer with DataBalanceParams with HasLabelCol with ComplexParamsWritable with Wrappable with SynapseMLLogging

This transformer computes a set of balance measures from the given dataframe and sensitive features.

The output is a dataframe that contains four columns:

  • The sensitive feature name.
  • A feature value within the sensitive feature.
  • Another feature value within the sensitive feature.
  • A struct containing measure names and their values showing parities between the two feature values. The following measures are computed:
    • Demographic Parity - https://en.wikipedia.org/wiki/Fairness_(machine_learning)
    • Pointwise Mutual Information - https://en.wikipedia.org/wiki/Pointwise_mutual_information
    • Sorensen-Dice Coefficient - https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient
    • Jaccard Index - https://en.wikipedia.org/wiki/Jaccard_index
    • Kendall Rank Correlation - https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient
    • Log-Likelihood Ratio - https://en.wikipedia.org/wiki/Likelihood_function#Likelihood_ratio
    • t-test - https://en.wikipedia.org/wiki/Student's_t-test

The output dataframe contains a row per combination of feature values for each sensitive feature.

Annotations
@Experimental()
Linear Supertypes
SynapseMLLogging, Wrappable, RWrappable, PythonWrappable, BaseWrappable, ComplexParamsWritable, MLWritable, HasLabelCol, DataBalanceParams, HasOutputCol, Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FeatureBalanceMeasure
  2. SynapseMLLogging
  3. Wrappable
  4. RWrappable
  5. PythonWrappable
  6. BaseWrappable
  7. ComplexParamsWritable
  8. MLWritable
  9. HasLabelCol
  10. DataBalanceParams
  11. HasOutputCol
  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

Instance Constructors

  1. new FeatureBalanceMeasure()
  2. new FeatureBalanceMeasure(uid: String)

    uid

    The unique ID.

Value Members

  1. val classACol: Param[String]
  2. val classBCol: Param[String]
  3. final def clear(param: Param[_]): FeatureBalanceMeasure.this.type
    Definition Classes
    Params
  4. def copy(extra: ParamMap): Transformer
    Definition Classes
    FeatureBalanceMeasure → Transformer → PipelineStage → Params
  5. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  6. def explainParams(): String
    Definition Classes
    Params
  7. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  8. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  9. val featureNameCol: Param[String]
  10. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  11. def getClassACol: String
  12. def getClassBCol: String
  13. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  14. def getFeatureNameCol: String
  15. final def getLabelCol: String
    Definition Classes
    HasLabelCol
  16. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  17. final def getOutputCol: String
    Definition Classes
    HasOutputCol
  18. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  19. def getParamInfo(p: Param[_]): ParamInfo[_]
    Definition Classes
    BaseWrappable
  20. def getSensitiveCols: Array[String]
    Definition Classes
    DataBalanceParams
  21. def getVerbose: Boolean
    Definition Classes
    DataBalanceParams
  22. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  23. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  24. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  25. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  26. final val labelCol: Param[String]
    Definition Classes
    HasLabelCol
  27. def logClass(featureName: String): Unit
    Definition Classes
    SynapseMLLogging
  28. def logFit[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  29. def logTransform[T](f: ⇒ T, columns: Int): T
    Definition Classes
    SynapseMLLogging
  30. def logVerb[T](verb: String, f: ⇒ T, columns: Option[Int] = None): T
    Definition Classes
    SynapseMLLogging
  31. def makePyFile(conf: CodegenConfig): Unit
    Definition Classes
    PythonWrappable
  32. def makeRFile(conf: CodegenConfig): Unit
    Definition Classes
    RWrappable
  33. final val outputCol: Param[String]
    Definition Classes
    HasOutputCol
  34. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  35. def pyAdditionalMethods: String
    Definition Classes
    PythonWrappable
  36. def pyInitFunc(): String
    Definition Classes
    PythonWrappable
  37. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  38. val sensitiveCols: StringArrayParam
    Definition Classes
    DataBalanceParams
  39. final def set[T](param: Param[T], value: T): FeatureBalanceMeasure.this.type
    Definition Classes
    Params
  40. def setClassACol(value: String): FeatureBalanceMeasure.this.type
  41. def setClassBCol(value: String): FeatureBalanceMeasure.this.type
  42. def setFeatureNameCol(value: String): FeatureBalanceMeasure.this.type
  43. def setLabelCol(value: String): FeatureBalanceMeasure.this.type
  44. def setOutputCol(value: String): FeatureBalanceMeasure.this.type
    Definition Classes
    DataBalanceParams
  45. def setSensitiveCols(values: Array[String]): FeatureBalanceMeasure.this.type
    Definition Classes
    DataBalanceParams
  46. def setVerbose(value: Boolean): FeatureBalanceMeasure.this.type
    Definition Classes
    DataBalanceParams
  47. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  48. def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    FeatureBalanceMeasure → Transformer
  49. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  50. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  51. def transformSchema(schema: StructType): StructType
    Definition Classes
    FeatureBalanceMeasure → PipelineStage
  52. val uid: String
    Definition Classes
    FeatureBalanceMeasureSynapseMLLogging → Identifiable
  53. def validateSchema(schema: StructType): Unit
  54. val verbose: BooleanParam
    Definition Classes
    DataBalanceParams
  55. def write: MLWriter
    Definition Classes
    ComplexParamsWritable → MLWritable