Skip to content

Commit

Permalink
bump v0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymoudiki committed Apr 27, 2024
1 parent ee8e2b6 commit 06fa746
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Run examples
run: pip install .&&find examples -maxdepth 2 -name "*.py" -exec python3 {} \;

# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_GLOBAL_MLSAUCE }}
# repository-url: https://upload.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_GLOBAL_MLSAUCE }}
repository-url: https://upload.pypi.org/legacy/
9 changes: 9 additions & 0 deletions examples/lasso_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
print(time()-start)
print(obj.beta)

obj = ms.LassoRegressor(backend="cpu")
start = time()
obj.fit(X_train, y_train)
print(time()-start)
start = time()
print(np.sqrt(np.mean(np.square(obj.predict(X_test) - y_test))))
print(time()-start)
print(obj.beta)

# obj = ms.LassoRegressor(backend="gpu")
# print(obj.get_params())
# start = time()
Expand Down
22 changes: 22 additions & 0 deletions examples/lsboost_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,28 @@
print(obj.score(X_test, y_test))
print(time()-start)

obj = ms.LSBoostClassifier(solver="lasso",
n_clusters=3, degree=2,
clustering_method="gmm")
print(obj.get_params())
start = time()
obj.fit(X_train, y_train)
print(time()-start)
start = time()
print(obj.score(X_test, y_test))
print(time()-start)


obj = ms.LSBoostClassifier(solver="enet",
n_clusters=3, degree=2,
clustering_method="gmm")
print(obj.get_params())
start = time()
obj.fit(X_train, y_train)
print(time()-start)
start = time()
print(obj.score(X_test, y_test))
print(time()-start)
# MORE DATA NEEDED # MORE DATA NEEDED # MORE DATA NEEDED
# obj = ms.LSBoostClassifier(backend="gpu", solver="lasso")
# print(obj.get_params())
Expand Down
14 changes: 14 additions & 0 deletions examples/lsboost_regressor_pi.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,17 @@
method="splitconformal")
print(time()-start)
print(f"splitconformal bootstrap coverage 5: {np.mean((preds.upper >= y_test)*(preds.lower <= y_test))}")


obj = ms.LSBoostRegressor(n_estimators=50, solver="enet", reg_lambda=0.002,
col_sample=0.8, row_sample=0.8)
print(obj.get_params())
start = time()
obj.fit(X_train, y_train)
print(time()-start)
start = time()
preds = obj.predict(X_test, return_pi=True,
level = 90,
method="splitconformal")
print(time()-start)
print(f"splitconformal bootstrap coverage 6: {np.mean((preds.upper >= y_test)*(preds.lower <= y_test))}")
1 change: 1 addition & 0 deletions mlsauce.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: Cython
Requires-Dist: joblib
Requires-Dist: matplotlib
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: scikit-learn
Expand Down
1 change: 1 addition & 0 deletions mlsauce.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
numpy
Cython
joblib
matplotlib
pandas
requests
scikit-learn
Expand Down
Binary file modified mlsauce/adaopt/_adaoptc.cpython-311-darwin.so
Binary file not shown.
3 changes: 2 additions & 1 deletion mlsauce/booster/_booster_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def __init__(
assert solver in (
"ridge",
"lasso",
), "`solver` must be in ('ridge', 'lasso')"
"enet"
), "`solver` must be in ('ridge', 'lasso', 'enet')"

sys_platform = platform.system()

Expand Down
Binary file modified mlsauce/booster/_boosterc.cpython-311-darwin.so
Binary file not shown.
Binary file modified mlsauce/lasso/_lassoc.cpython-311-darwin.so
Binary file not shown.
Binary file modified mlsauce/ridge/_ridgec.cpython-311-darwin.so
Binary file not shown.
Binary file modified mlsauce/stump/_stumpc.cpython-311-darwin.so
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
MAINTAINER_EMAIL = '[email protected]'
LICENSE = 'BSD3 Clause Clear'

__version__ = '0.16.0'
__version__ = '0.17.0'

VERSION = __version__

Expand Down

0 comments on commit 06fa746

Please sign in to comment.