Skip to main content

Tools of sklearn.

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

if __name__ == '__main__':
     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, result_num=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.0.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

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