Skip to content

Commit

Permalink
Increase maxmimum allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
spinosaphb committed Jul 10, 2024
1 parent a9b9f71 commit eafe0cd
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## [4.0.0rc1] - 2024-05-22
- **Enhancement**
- Add support for python 3.11 and 3.10
- Decrease maxmimum allowed `scikit-learn`

## [3.0.0] - 2023-11-08
- **Enhancement**
Expand Down
16 changes: 16 additions & 0 deletions install_all_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


REQUIREMENTS_ARR="requirements.txt requirements_catboost.txt requirements_demos.txt requirements_lgbm.txt requirements_tools.txt requirements_xgboost.txt requirements_test.txt"

install_requirements() {
echo "Installing requirements..."
for req in $REQUIREMENTS_ARR; do
echo "Installing $req..."
pip install -r $req --force-reinstall
done

echo "Installing project in development mode..."
pip install -e . --force-reinstall
}

install_requirements
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
joblib>=1.3.2,<2
numpy>=1.24.4,<2
pandas>=2,<3
scikit-learn>=1,<1.4
scikit-learn>=1,<2
statsmodels>=0.14.0,<1
toolz>=0.12.0,<1
2 changes: 1 addition & 1 deletion src/fklearn/validation/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ def logistic_coefficient_evaluator(test_data: pd.DataFrame,
if eval_name is None:
eval_name = "logistic_coefficient_evaluator__" + target_column

score = LogisticRegression(penalty='none', multi_class="ovr").fit(test_data[[prediction_column]],
score = LogisticRegression(penalty=None, multi_class="ovr").fit(test_data[[prediction_column]],
test_data[target_column]).coef_[0][0]

return {eval_name: score}
7 changes: 6 additions & 1 deletion tests/causal/test_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,9 @@ def test_logistic_coefficient_effect():
))

result = logistic_coefficient_effect(df, treatment_column="t", outcome_column="y")
assert round(result, 3) == 20.645

SKLEARN_GTE_1_4_RESULT = 17.922
SKLEARN_LT_1_4_RESULT = 20.645
expected_result_range = {SKLEARN_GTE_1_4_RESULT, SKLEARN_LT_1_4_RESULT}

assert round(result, 3) in expected_result_range
6 changes: 5 additions & 1 deletion tests/validation/test_evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,8 @@ def test_logistic_coefficient_evaluator():

result = logistic_coefficient_evaluator(predictions)

assert round(result['logistic_coefficient_evaluator__target'], 3) == 20.645
SKLEARN_GTE_1_4_RESULT = 17.922
SKLEARN_LT_1_4_RESULT = 20.645
expected_result_range = {SKLEARN_GTE_1_4_RESULT, SKLEARN_LT_1_4_RESULT}

assert round(result['logistic_coefficient_evaluator__target'], 3) in expected_result_range

0 comments on commit eafe0cd

Please sign in to comment.