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