Skip to main content

Tools of sklearn. Grid Search with multiprocess

Project description

Usage Sample ''''''''''''

.. code:: python

import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearntools import train_evaluate, search_model_params

X, y = np.arange(20).reshape((10, 2)), range(10)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)

model = RandomForestClassifier(n_estimators=837, bootstrap=False)
train_evaluate(model, X_train, X_test, y_train, y_test)

param_grid = {'n_estimators': np.arange(800, 820, 1), 'bootstrap': [False, True]}
search_model_params(RandomForestClassifier, X_train, X_test, y_train, y_test, param_grid, num_results=3)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sklearntools-1.3.1.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file sklearntools-1.3.1.tar.gz.

File metadata

  • Download URL: sklearntools-1.3.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for sklearntools-1.3.1.tar.gz
Algorithm Hash digest
SHA256 647a7e07b599f872276a7b3ee9d7e64e06ca87e3f7d357ad07348d6732cfb068
MD5 e0e2abd086d8f2931cd72cde08bfe94d
BLAKE2b-256 384c4f05cf8fd66689313d8b70e2366383dd4a2fb4d4c04780a4245c8b09b26d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page