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/f9/bf/99707eddbbff46df0ed7a47b78e4b53b783faa63f3a8906ce6534bed31b8/sklearntools-1.2.3.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.3",
"project_urls": {
"Homepage": "https://gitee.com/summry/sklearntools"
},
"split_keywords": [
"sklearn",
" grid search",
" machine learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f9bf99707eddbbff46df0ed7a47b78e4b53b783faa63f3a8906ce6534bed31b8",
"md5": "9ba2755a23611b1ec91501d1e57a6085",
"sha256": "30b85a6df236e467a5ef85b775b9e30296f2d017c3676af90b8398767974bd7e"
},
"downloads": -1,
"filename": "sklearntools-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "9ba2755a23611b1ec91501d1e57a6085",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4633,
"upload_time": "2024-11-17T10:08:13",
"upload_time_iso_8601": "2024-11-17T10:08:13.233770Z",
"url": "https://files.pythonhosted.org/packages/f9/bf/99707eddbbff46df0ed7a47b78e4b53b783faa63f3a8906ce6534bed31b8/sklearntools-1.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-17 10:08:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sklearntools"
}