sklearn-cv-pandas
RandomizedSearchCV/GridSearchCV with pandas.DataFrame interface
Installation
pip install sklearn_cv_pandas
Usage
To tune hyper parameters, instantiate CV as the same as original ones, and use methods fit_sv_pandas or fit_cv_pandas
from scipy import stats
from sklearn import linear_model
from sklearn_cv_pandas import RandomizedSearchCV
estimator = linear_model.Lasso()
param_dist = dict(alpha=stats.loguniform(1e-5, 10))
cv = RandomizedSearchCV(estimator, param_dist, scoring="mean_absolute_error")
model = cv.fit_cv_pandas(
df, target_column="y", feature_columns=["x{}".format(i) for i in range(100)], n_fold=5
)
To make prediction, use method predict of the output of fit_sv_pandas or fit_cv_pandas
model.predict(df)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sklearn_cv_pandas-0.0.1.tar.gz.
File metadata
- Download URL: sklearn_cv_pandas-0.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db3388809a4c0da6d1bb5f9f414479dfdfe9e3a7b27fec2170f7fb1c5135e40b
|
|
| MD5 |
67cafcad916488833d67e953c31c9433
|
|
| BLAKE2b-256 |
dd3192b8b3ae5ba50819a0ddf1d29b771f36c0bbea02492bf5c986e668d5c121
|
File details
Details for the file sklearn_cv_pandas-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sklearn_cv_pandas-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2486eaadc68c8c5a779415cb7e8923ae010b2571e4b993ffe35ebc9f72486a8
|
|
| MD5 |
4f9c7f2728135e1fa03d60b3b9639d71
|
|
| BLAKE2b-256 |
765b70c73979beed0318c8efbf8707f6efa2c5895fa9ef752118aa3979517dcc
|