diff --git a/README.md b/README.md index d4ec102..9ad96a7 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ 🚩 `redflag` aims to be an automatic safety net for machine learning datasets. The vision is to accept input of a Pandas `DataFrame` or NumPy `ndarray` (one for each of the input `X` and target `y` in a machine learning task). `redflag` will provide an analysis of each feature, and of the target, including aspects such as class imbalance, leakage, outliers, anomalous data patterns, threats to the IID assumption, and so on. The goal is to complement other projects like `pandas-profiling` and `greatexpectations`. -⚠️ **This project is very rough and does not do much yet. The API will very likely change without warning. Please consider contributing!** - ## Installation diff --git a/src/redflag/importance.py b/src/redflag/importance.py index 45f4171..920deab 100644 --- a/src/redflag/importance.py +++ b/src/redflag/importance.py @@ -68,8 +68,9 @@ def feature_importances(X: ArrayLike, y: ArrayLike=None, >>> feature_importances(X, y, task='regression', random_state=42) array([0. , 0.99416839, 0.00583161]) >>> y = ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'] - >>> feature_importances(X, y, task='classification', random_state=42) - array([0. , 0.62908523, 0.37091477]) + >>> x0, x1, x2 = feature_importances(X, y, task='classification', random_state=42) + >>> x1 > x2 > x0 # See Issue #49 for why this test is like this. + True """ if y is None: raise NotImplementedError('Unsupervised importance is not yet implemented.')