title: Calculate group fairness metrics with AIF360
body: <p>I want to calculate <a href="https://aif360.readthedocs.io/en/latest/modules/sklearn.html#group-fairness-metrics" rel="nofollow noreferrer">group fairness metrics</a> using <a href="https://github.com/Trusted-AI/AIF360" rel="nofollow noreferrer">AIF360</a>. This is a sample dataset and model, in which gender is the protected attribute and income is the target.</p>
  <pre><code>import pandas as pd
  from sklearn.svm import SVC
  from aif360.sklearn import metrics
  
  df = pd.DataFrame({'gender': [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1],
                    'experience': [0, 0.1, 0.2, 0.4, 0.5, 0.6, 0, 0.1, 0.2, 0.4, 0.5, 0.6],
                    'income': [0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1]})
  
  clf = SVC(random_state=0).fit(df[['gender', 'experience']], df['income'])
  
  y_pred = clf.predict(df[['gender', 'experience']])
  
  metrics.statistical_parity_difference(y_true=df['income'], y_pred=y_pred, prot_attr='gender', priv_group=1, pos_label=1)
  </code></pre>
  <p>It throws out:</p>
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-7-609692e52b2a&gt; in &lt;module&gt;
       11 y_pred = clf.predict(X)
       12 
  ---&gt; 13 metrics.statistical_parity_difference(y_true=df['income'], y_pred=y_pred, prot_attr='gender', priv_group=1, pos_label=1)
  
  TypeError: statistical_parity_difference() got an unexpected keyword argument 'y_true'
  </code></pre>
  <p>Similar error for <a href="https://aif360.readthedocs.io/en/latest/modules/generated/aif360.sklearn.metrics.disparate_impact_ratio.html#aif360.sklearn.metrics.disparate_impact_ratio" rel="nofollow noreferrer"><code>disparate_impact_ratio</code></a>. It seems the data needs to be entered differently, but I have not been able to figure out how.</p>