Skip to content

Commit

Permalink
change test to assert condition not equality
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Sep 3, 2023
1 parent c367b7a commit 9224285
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions src/redflag/importance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit 9224285

Please sign in to comment.