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)
Raw data
{
"_id": null,
"home_page": "https://gitee.com/summry/sklearntools",
"name": "sklearntools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "sklearn, Grid Search, machine learning",
"author": "summy",
"author_email": "xiazhongbiao@126.com",
"download_url": "https://files.pythonhosted.org/packages/7d/81/b3c1e6eaf2ac6000c066e98734a1d4af7e247a189ce8d5cc6e540e7556e3/sklearntools-1.2.7.tar.gz",
"platform": null,
"description": "Usage Sample\n''''''''''''\n\n.. code:: python\n\n import numpy as np\n from sklearn.ensemble import RandomForestClassifier\n from sklearn.model_selection import train_test_split\n from sklearntools import train_evaluate, search_model_params\n\n if __name__ == '__main__':\n X, y = np.arange(20).reshape((10, 2)), range(10)\n X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)\n\n model = RandomForestClassifier(n_estimators=837, bootstrap=False)\n train_evaluate(model, X_train, X_test, y_train, y_test)\n\n param_grid = {'n_estimators': np.arange(800, 820, 1), 'bootstrap': [False, True]}\n\t search_model_params(RandomForestClassifier, X_train, X_test, y_train, y_test, param_grid, result_num=3)\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Tools of sklearn. Grid Search with multiprocess",
"version": "1.2.7",
"project_urls": {
"Homepage": "https://gitee.com/summry/sklearntools"
},
"split_keywords": [
"sklearn",
" grid search",
" machine learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7d81b3c1e6eaf2ac6000c066e98734a1d4af7e247a189ce8d5cc6e540e7556e3",
"md5": "4a1f2a80b9cde6d2d726849bd11ab979",
"sha256": "b18f7c6998d1bc2f525c64140fbbc0e8e54a12e8f51f49f4454c8f21bf0cec24"
},
"downloads": -1,
"filename": "sklearntools-1.2.7.tar.gz",
"has_sig": false,
"md5_digest": "4a1f2a80b9cde6d2d726849bd11ab979",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5793,
"upload_time": "2024-12-13T01:12:50",
"upload_time_iso_8601": "2024-12-13T01:12:50.206666Z",
"url": "https://files.pythonhosted.org/packages/7d/81/b3c1e6eaf2ac6000c066e98734a1d4af7e247a189ce8d5cc6e540e7556e3/sklearntools-1.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-13 01:12:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sklearntools"
}