Skip to content

Commit

Permalink
Corrected the ot_detector with demo_ot_detector
Browse files Browse the repository at this point in the history
Added docstrings and comments

Signed-off-by: Illia-Kryvoviaz <illiakryvoviaz@gmail.com>
  • Loading branch information
Illia-Kryvoviaz committed Jan 22, 2023
1 parent 646a3b1 commit ac9784a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions aif360/detectors/ot_detector.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from typing import Union

from aif360.detectors.mdss.ScoringFunctions import *

from aif360.detectors.mdss.MDSS import MDSS

import pandas as pd

import numpy as np

import ot
Expand Down Expand Up @@ -52,7 +49,7 @@ def ot_bias_scan(
ideal_distribution: Union[pd.Series, pd.DataFrame] = None,
favorable_value: Union[str, float] = None,
overpredicted: bool = True,
scoring: Union[str, ScoringFunction] = "Optimal Transport",
scoring: str = "Optimal Transport",
num_iters: int = 10,
penalty: float = 1e-17,
mode: str = "binary",
Expand All @@ -79,7 +76,6 @@ def ot_bias_scan(
False means we scan for a group whose ideal_distribution/predictions are systematically lower than observed.
In other words, False means we scan for a group whose observed is systematically higher than the ideal_distribution.
:param scoring (str or class): Only 'Optimal Transport'
In order to use others params for scoring, it is essential to use from mdss_detector
:param num_iters (int, optional): number of iterations (random restarts). Should be positive.
:param penalty (float,optional): penalty term. Should be positive. The penalty term as with any regularization parameter may need to be
tuned for ones use case. The higher the penalty, the less complex (number of features and feature values) the
Expand Down

0 comments on commit ac9784a

Please sign in to comment.