Skip to main content

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

sklearn_cv_pandas-0.0.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sklearn_cv_pandas-0.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file sklearn_cv_pandas-0.0.2.tar.gz.

File metadata

  • Download URL: sklearn_cv_pandas-0.0.2.tar.gz
  • Upload date:
  • Size: 5.1 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

Hashes for sklearn_cv_pandas-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2bcd71a38e4cb9217c5e4b3d79e94e29f1767211aca176474437fe34770ecedb
MD5 a4c93ce9d483de9a0d60b723b7760ae5
BLAKE2b-256 2dcee29e6057c31d6a1e2fbfdf2659c1aef8d0feab2dc51d945f4433dde58daa

See more details on using hashes here.

File details

Details for the file sklearn_cv_pandas-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sklearn_cv_pandas-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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

Hashes for sklearn_cv_pandas-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a942b8f8392564cf8d3ce7c89590c321272688f5045a9bc8c24634c9b7288e6
MD5 20c8f60bca650b2ca45872ecab59928f
BLAKE2b-256 409b2cbf0c73462484c0e88d7c47bf1123ed43779bcf3e1a40c174aa4fba0981

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.0

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page