{"id":344323,"date":"2023-01-23T03:00:49","date_gmt":"2023-01-23T03:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344323"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344323","title":{"rendered":"<span>DatRet: \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Tensorflow \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/346\/b65\/b55\/346b65b55b300d0f274219bfcdf81e4b.png\" alt=\"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430\" title=\"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430\" width=\"531\" height=\"130\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/346\/b65\/b55\/346b65b55b300d0f274219bfcdf81e4b.png\"\/><figcaption>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430<\/figcaption><\/figure>\n<p>\u041c\u043e\u0439 open-source \u043f\u0440\u043e\u0434\u0443\u043a\u0442.  <strong>Ret<\/strong>e neurale per la previsione di <strong>Dat<\/strong>i tabulari. (it.)<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u043b\u043e\u0435\u0432 \u0438 \u043f\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u043c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432. \u0421 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p><em>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c &#171;\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b&#187;  \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <\/em><strong><em>DatRetClassifier <\/em><\/strong><em>\u0438<\/em><strong><em> DatRetRegressor <\/em><\/strong><em>\u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/em><\/p>\n<hr\/>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 <a href=\"https:\/\/scikit-learn.org\" rel=\"noopener noreferrer nofollow\">scikit-learn<\/a>. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u0435\u043b\u0430\u0435\u043c fit \u0438 predict, \u0433\u043e\u0442\u043e\u0432\u043e. <\/p>\n<pre><code class=\"python\">from sklearn.ensemble import RandomForestClassifier from sklearn.datasets import make_classification X, y = make_classification(n_samples=1000, n_features=4,                             n_informative=2, n_redundant=0,                            random_state=0, shuffle=False) clf = RandomForestClassifier(max_depth=2, random_state=0) clf.fit(X, y) print(clf.predict([[0, 0, 0, 0]]))<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <a href=\"https:\/\/www.tensorflow.org\/\" rel=\"noopener noreferrer nofollow\">Tensorflow<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/pytorch.org\/\" rel=\"noopener noreferrer nofollow\">PyTorch <\/a>\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f. <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441  \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0437\u0432\u0443\u043a\u043e\u043c. \u041d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 &#8212; \u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/dreamquark-ai\/tabnet\" rel=\"noopener noreferrer nofollow\">TabNet<\/a>.  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\" rel=\"noopener noreferrer nofollow\">DatRet<\/a> \u0441\u0442\u0430\u0432\u0438\u043b \u043f\u043e\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.ensemble.RandomForestClassifier.html\" rel=\"noopener noreferrer nofollow\">RandomForestClassifier<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/catboost.ai\/en\/docs\/concepts\/python-reference_catboostclassifier\" rel=\"noopener noreferrer nofollow\">CatBoostClassifier<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435. \u0412\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043b\u044c\u044e, \u0441\u0442\u0430\u0432\u0438\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c.<\/p>\n<p><em>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430:<\/em><\/p>\n<ul>\n<li>\n<p><strong>DatRetClassifier <\/strong>\u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>DatRetRegressor <\/strong>\u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>DatRetMultilabelClassifier <\/strong>\u0434\u043b\u044f &#171;\u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0442\u043e\u0447\u043d\u043e\u0439&#187; \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<strong>.<\/strong><\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/h2>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. Fit \u0438 predict et Voila! <\/p>\n<\/li>\n<li>\n<p>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 <\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 GPU<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 multilabel \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <\/p>\n<\/li>\n<li>\n<p>Tensorflow \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \ud83d\ude09 <\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u043d\u0430 GitHub \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\" rel=\"noopener noreferrer nofollow\">GitHub \u2014 AbdualimovTP\/datret: \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Tensorflow \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <\/a>   \u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/pypi.org\/project\/datret\" rel=\"noopener noreferrer nofollow\"> Python.   \u0418\u043d\u0434\u0435\u043a\u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (PyPI)<\/a><\/p>\n<pre><code class=\"bash\"># PyPI pip install datret<\/code><\/pre>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.tensorflow.org\/\" rel=\"noopener noreferrer nofollow\">Tensorflow &#8212; An open-source library primarily for deep learning applications<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.numpy.org\" rel=\"noopener noreferrer nofollow\">NumPy &#8212; Adds support  for large, multi-dimensional arrays, matrices and high-level  mathematical functions to operate on these arrays<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/pandas.pydata.org\/pandas-docs\/stable\/\" rel=\"noopener noreferrer nofollow\">Pandas documentation \u2014 pandas 1.5.2 documentation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/scikit-learn.org\/stable\/\" rel=\"noopener noreferrer nofollow\">Scikit-Learn &#8212; machine learning in Python<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/h3>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438  \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u0430\u043a \u0432 scikit-learn.  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435  \u0442\u0440\u0435\u0439\u043d\u043e\u0432\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430  \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. <\/p>\n<p><em>NB!  \u041d\u0435  \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438.  \u0412\u0430\u043c  \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Tensorflow, Numpy, Pandas \u0438 Scikit-Learn. <\/em><\/p>\n<p><em>NB!  \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c one-hot encoding \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u044e\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.  \u041c\u043e\u0434\u0435\u043b\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/em><\/p>\n<pre><code class=\"python\"># load library from datret.datret import DatRetClassifier, DatRetRegressor, DatRetMultilabelClassifier  # prepare train, test split. As in sklearn. # for example X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=i)  # Call the regressor or classifier and train the model. DR = DatRetClassifier() # DatRetRegressor works on the same principle DR.fit(X_train, y_train) # predict the actual label (or class) over a new set of data. DR_predict = DR.predict(X_test) # predict the class probabilities for each data point. DR_predict_proba = DR.predict_proba(X_test) # Missing in DatRetRegressor, DatRetMultilabelClassifier<\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p><em>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <\/em> : <\/p>\n<ul>\n<li>\n<p><strong>epoch: <\/strong> int, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 30. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043f\u043e\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>optimizer: <\/strong> str,  (\u0438\u043c\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430) \u0438\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430.   \u0421\u043c. <a href=\"https:\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/optimizers\/legacy\/\" rel=\"noopener noreferrer nofollow\"> tf.keras.optimizers<\/a>, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = <code>Adam(learning_rate=0.001)<\/code>.  \u0412 DatRetRegressor \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0,01. <\/p>\n<\/li>\n<li>\n<p><strong>loss: <\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u0438.  str.   \u0421\u043c. <a href=\"https:\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/losses\" rel=\"noopener noreferrer nofollow\"> tf.keras.losses <\/a>,  \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f DatRetClassifier = <code>CategoricalCrossentropy()<\/code>, \u0434\u043b\u044f DatRetRegressor = <code>MeanSquaredError()<\/code>. <\/p>\n<\/li>\n<li>\n<p><strong>verbose: <\/strong>  &#8216;\u0430\u0432\u0442\u043e&#8217;, 0, 1 \u0438\u043b\u0438 2, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0.  \u0412\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u044d\u043f\u043e\u0445\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>number_neurons: <\/strong>  int, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 500. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435.    \u041f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043b\u043e\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0432\u0434\u0432\u043e\u0435 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c  \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432. <\/p>\n<\/li>\n<li>\n<p><strong>validation_split: <\/strong>  float \u043e\u0442 0 \u0434\u043e 1, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0. \u0414\u043e\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445  \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.  \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430  \u043d\u0435\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438 \u0438 \u043b\u044e\u0431\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432  \u043a\u043e\u043d\u0446\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u044d\u043f\u043e\u0445\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>batch_size: <\/strong>int<strong> <\/strong> , \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 1.   \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430.   Steps_per_epoch \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, <code>X_train.shape[0] \/\/ batch_size<\/code><\/p>\n<\/li>\n<li>\n<p><strong>shuffle: <\/strong> True \u0438\u043b\u0438 False, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = True.   &#171;\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435&#187; \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>callback: <\/strong> <code>[]<\/code>, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = <code>[EarlyStopping(monitor='loss', mode='auto', patience=7, verbose=1), ReduceLROnPlateau(monitor='loss', factor=0.2, patience=3, min_lr=0.00001, verbose=1)]<\/code>. <a href=\"https:\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/callbacks\/\" rel=\"noopener noreferrer nofollow\">  \u0421allbacks <\/a> : \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <\/strong><code>fit<\/code> .<\/p>\n<p><em>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/em>:<\/p>\n<ul>\n<li>\n<p><strong>normalize:<\/strong> True or False, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u0435 True. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.preprocessing.MinMaxScaler.html\" rel=\"noopener noreferrer nofollow\">MinMaxScaler<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p> \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<pre><code class=\"python\"># load library import tensorflow as tf from tensorflow.keras.layers import * from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam, Nadam from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau from tensorflow.keras.losses import CategoricalCrossentropy, MeanSquaredError, BinaryCrossentropy from datret.datret import DatRetClassifier, DatRetRegressor, DatRetMultilabelClassifier  # prepare train, test split. As in sklearn. # for example X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=i)  # Call the regressor or classifier and train the model. DR = DatRetClassifier(epoch=50,                       optimizer=Nadam(learning_rate=0.001),                       loss=BinaryCrossentropy(),                       verbose=1,                       number_neurons=1000,                       validation_split = 0.1,                       batch_size=100,                       shuffle=True,                       callback=[]) DR.fit(X_train, y_train, normalize=True) # predict the actual label (or class) over a new set of data. DR_predict = DR.predict(X_test) # predict the class probabilities for each data point. DR_predict_proba = DR.predict_proba(X_test)<\/code><\/pre>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>number_neurons = 500<\/code>\u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c 2-\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (0, 1) &#8212; \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. <\/p>\n<pre><code class=\"sql\">Model: \"DatRet with number_neurons = 500\" _________________________________________________________________  Layer (type)                Output Shape              Param #    =================================================================  input_1 (InputLayer)        [(None, X_train.shape[0)]      0            dense (Dense)               (None, 500)               150500       dense_1 (Dense)             (None, 250)               125250       dense_2 (Dense)             (None, 125)               31375        dense_3 (Dense)             (None, 62)                7812         dense_4 (Dense)             (None, 31)                1953         dense_5 (Dense)             (None, 15)                480          dense_6 (Dense)             (None, 7)                 112          dense_7 (Dense)             (None, 3)                 24           dense_8 (Dense)             (None, 2)                 8                                 (2 predictable classes)                                ================================================================= Total params: 317,514 Trainable params: 317,514 Non-trainable params: 0<\/code><\/pre>\n<hr\/>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p><strong>DatRetClassifier \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.kaggle.com\/datasets\/uciml\/pima-indians-diabetes-database\" rel=\"noopener noreferrer nofollow\">Pima Indians Diabetes Database | Kaggle<\/a>. \u041c\u0435\u0442\u0440\u0438\u043a\u0430 RocAucScore. \u0411\u0443\u0434\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c DatRet \u0441 RandomForest \u0438 CatBoost \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb.  \u041f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\/tree\/main\/test\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<pre><code class=\"python\">for i in [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]:     X_train, X_test, y_train, y_test = train_test_split(data.drop([\"Outcome\"], axis=1), data[\"Outcome\"],                                                 random_state=10, test_size=i)     #RandomForest     RF = RandomForestClassifier(random_state=0)     RF.fit(X_train, y_train)     RF_pred = RF.predict_proba(X_test)     dataFrameRocAuc.loc['RandomForest'][f'{int(i*100)}%'] = np.round(roc_auc_score(y_test, RF_pred[:,1]), 2)          #Catboost     CB = CatBoostClassifier(random_state=0, verbose=0)     CB.fit(X_train, y_train)     CB_pred = CB.predict_proba(X_test)     dataFrameRocAuc.loc['CatBoost'][f'{int(i*100)}%'] = np.round(roc_auc_score(y_test, CB_pred[:,1]), 2)          #DatRet     DR = DatRetClassifier(optimizer=Adam(learning_rate=0.001))     DR.fit(X_train, y_train)     DR_pred = DR.predict_proba(X_test)     dataFrameRocAuc.loc['DatRet'][f'{int(i*100)}%'] = np.round(roc_auc_score(y_test, DR_pred[:,1]), 2)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/90d\/5b8\/1dc\/90d5b81dc8070ccf847d5f26d462c9e9.png\" width=\"1338\" height=\"825\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/90d\/5b8\/1dc\/90d5b81dc8070ccf847d5f26d462c9e9.png\"\/><figcaption><\/figcaption><\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<\/th>\n<th>\n<p>10% <\/p>\n<\/th>\n<th>\n<p>20% <\/p>\n<\/th>\n<th>\n<p>30% <\/p>\n<\/th>\n<th>\n<p>40% <\/p>\n<\/th>\n<th>\n<p>50% <\/p>\n<\/th>\n<th>\n<p>60% <\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>RandomForest <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.79 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0.81 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.81 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.79 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.82 <\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.82 <\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>CatBoost<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0.78 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.82 <\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.82 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0.8 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.81 <\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.82 <\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>DatRet<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.79 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.84 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.82 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.81 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.84 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0.81 <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>DatRetRegressor <\/strong>\u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0438\u0438<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u043e\u0440\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/www.kaggle.com\/datasets\/mirichoi0218\/insurance\" rel=\"noopener noreferrer nofollow\">Medical Cost Personal Datasets | Kaggle<\/a>. \u041c\u0435\u0442\u0440\u0438\u043a\u0430 <em> \u0441\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 <\/em>. \u0411\u0443\u0434\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c DatRet \u0441 RandomForest \u0438 CatBoost \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb. \u041f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\/tree\/main\/test\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<pre><code class=\"python\">for i in [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]:     X_train, X_test, y_train, y_test = train_test_split(data.drop([\"charges\"], axis=1), data[\"charges\"],                                                 random_state=10, test_size=i)     #RandomForest     RF = RandomForestRegressor(random_state=0)     RF.fit(X_train, y_train)     RF_pred = RF.predict(X_test)     dataFrameRMSE.loc['RandomForest'][f'{int(i*100)}%'] = np.round(mean_squared_error(y_test, RF_pred, squared=False), 2)          #Catboost     CB = CatBoostRegressor(random_state=0, verbose=0)     CB.fit(X_train, y_train)     CB_pred = CB.predict(X_test)     dataFrameRMSE.loc['CatBoost'][f'{int(i*100)}%'] = np.round(mean_squared_error(y_test, CB_pred, squared=False), 2)          #DatRet     DR = DatRetRegressor(optimizer=Adam(learning_rate=0.01))     DR.fit(X_train, y_train)     DR_pred = DR.predict(X_test)     dataFrameRMSE.loc['DatRet'][f'{int(i*100)}%'] = np.round(mean_squared_error(y_test, DR_pred, squared=False), 2)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5f3\/ca4\/ab4\/5f3ca4ab442889aa8006d8b05050d401.png\" width=\"1336\" height=\"818\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5f3\/ca4\/ab4\/5f3ca4ab442889aa8006d8b05050d401.png\"\/><figcaption><\/figcaption><\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<\/th>\n<th>\n<p>10%<\/p>\n<\/th>\n<th>\n<p>20%<\/p>\n<\/th>\n<th>\n<p>30%<\/p>\n<\/th>\n<th>\n<p>40%<\/p>\n<\/th>\n<th>\n<p>50%<\/p>\n<\/th>\n<th>\n<p>60%<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>RandomForest<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">5736<\/p>\n<\/td>\n<td>\n<p align=\"left\">5295<\/p>\n<\/td>\n<td>\n<p align=\"left\">4777<\/p>\n<\/td>\n<td>\n<p align=\"left\">4956<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>4904<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>4793<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>CatBoost<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>5732<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">5251<\/p>\n<\/td>\n<td>\n<p align=\"left\">4664<\/p>\n<\/td>\n<td>\n<p align=\"left\">4986<\/p>\n<\/td>\n<td>\n<p align=\"left\">5044<\/p>\n<\/td>\n<td>\n<p align=\"left\">4989<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>DatRet<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">5860<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>5173<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>4610<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>4927<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">5047<\/p>\n<\/td>\n<td>\n<p align=\"left\">5780<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 &#171;\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438&#187;.<\/p>\n<p>\u0412 \u0437\u0430\u0434\u0430\u0447\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 10%, 20%, 30%, 40%, 50% \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <strong>DatRet<\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043b\u0443\u0447\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. <\/p>\n<p>\u0412 \u0437\u0430\u0434\u0430\u0447\u0435 \u0440\u0435\u0433\u0440\u0435\u0441\u0438\u0438 \u043d\u0430 20%, 30%, 40% \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <strong>DatRet<\/strong> \u0432\u044b\u0434\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0443\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0438\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445. \u0422\u0430\u043a\u0436\u0435 \u0432\u0438\u0436\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/712088\/\"> https:\/\/habr.com\/ru\/post\/712088\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430<\/figcaption><\/figure>\n<p>\u041c\u043e\u0439 open-source \u043f\u0440\u043e\u0434\u0443\u043a\u0442.  <strong>Ret<\/strong>e neurale per la previsione di <strong>Dat<\/strong>i tabulari. (it.)<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u043b\u043e\u0435\u0432 \u0438 \u043f\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u043c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432. \u0421 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<p><em>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c &#171;\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b&#187;  \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <\/em><strong><em>DatRetClassifier <\/em><\/strong><em>\u0438<\/em><strong><em> DatRetRegressor <\/em><\/strong><em>\u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/em><\/p>\n<hr\/>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 <a href=\"https:\/\/scikit-learn.org\" rel=\"noopener noreferrer nofollow\">scikit-learn<\/a>. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u0435\u043b\u0430\u0435\u043c fit \u0438 predict, \u0433\u043e\u0442\u043e\u0432\u043e. <\/p>\n<pre><code class=\"python\">from sklearn.ensemble import RandomForestClassifier from sklearn.datasets import make_classification X, y = make_classification(n_samples=1000, n_features=4,                             n_informative=2, n_redundant=0,                            random_state=0, shuffle=False) clf = RandomForestClassifier(max_depth=2, random_state=0) clf.fit(X, y) print(clf.predict([[0, 0, 0, 0]]))<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <a href=\"https:\/\/www.tensorflow.org\/\" rel=\"noopener noreferrer nofollow\">Tensorflow<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/pytorch.org\/\" rel=\"noopener noreferrer nofollow\">PyTorch <\/a>\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f. <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441  \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0437\u0432\u0443\u043a\u043e\u043c. \u041d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 &#8212; \u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/dreamquark-ai\/tabnet\" rel=\"noopener noreferrer nofollow\">TabNet<\/a>.  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\" rel=\"noopener noreferrer nofollow\">DatRet<\/a> \u0441\u0442\u0430\u0432\u0438\u043b \u043f\u043e\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.ensemble.RandomForestClassifier.html\" rel=\"noopener noreferrer nofollow\">RandomForestClassifier<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/catboost.ai\/en\/docs\/concepts\/python-reference_catboostclassifier\" rel=\"noopener noreferrer nofollow\">CatBoostClassifier<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435. \u0412\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043b\u044c\u044e, \u0441\u0442\u0430\u0432\u0438\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c.<\/p>\n<p><em>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430:<\/em><\/p>\n<ul>\n<li>\n<p><strong>DatRetClassifier <\/strong>\u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>DatRetRegressor <\/strong>\u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0433\u0440\u0435\u0441\u0438\u0438<\/p>\n<\/li>\n<li>\n<p><strong>DatRetMultilabelClassifier <\/strong>\u0434\u043b\u044f &#171;\u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0442\u043e\u0447\u043d\u043e\u0439&#187; \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<strong>.<\/strong><\/p>\n<\/li>\n<\/ul>\n<h2>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/h2>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. Fit \u0438 predict et Voila! <\/p>\n<\/li>\n<li>\n<p>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 <\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 GPU<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 multilabel \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <\/p>\n<\/li>\n<li>\n<p>Tensorflow \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \ud83d\ude09 <\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u043d\u0430 GitHub \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\" rel=\"noopener noreferrer nofollow\">GitHub \u2014 AbdualimovTP\/datret: \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Tensorflow \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <\/a>   \u0414\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/pypi.org\/project\/datret\" rel=\"noopener noreferrer nofollow\"> Python.   \u0418\u043d\u0434\u0435\u043a\u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (PyPI)<\/a><\/p>\n<pre><code class=\"bash\"># PyPI pip install datret<\/code><\/pre>\n<h3>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.tensorflow.org\/\" rel=\"noopener noreferrer nofollow\">Tensorflow &#8212; An open-source library primarily for deep learning applications<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.numpy.org\" rel=\"noopener noreferrer nofollow\">NumPy &#8212; Adds support  for large, multi-dimensional arrays, matrices and high-level  mathematical functions to operate on these arrays<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/pandas.pydata.org\/pandas-docs\/stable\/\" rel=\"noopener noreferrer nofollow\">Pandas documentation \u2014 pandas 1.5.2 documentation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/scikit-learn.org\/stable\/\" rel=\"noopener noreferrer nofollow\">Scikit-Learn &#8212; machine learning in Python<\/a><\/p>\n<\/li>\n<\/ul>\n<h3>\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442<\/h3>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438  \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u0430\u043a \u0432 scikit-learn.  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435  \u0442\u0440\u0435\u0439\u043d\u043e\u0432\u0443\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430  \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. <\/p>\n<p><em>NB!  \u041d\u0435  \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438.  \u0412\u0430\u043c  \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Tensorflow, Numpy, Pandas \u0438 Scikit-Learn. <\/em><\/p>\n<p><em>NB!  \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c one-hot encoding \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u044e\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.  \u041c\u043e\u0434\u0435\u043b\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/em><\/p>\n<pre><code class=\"python\"># load library from datret.datret import DatRetClassifier, DatRetRegressor, DatRetMultilabelClassifier  # prepare train, test split. As in sklearn. # for example X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=i)  # Call the regressor or classifier and train the model. DR = DatRetClassifier() # DatRetRegressor works on the same principle DR.fit(X_train, y_train) # predict the actual label (or class) over a new set of data. DR_predict = DR.predict(X_test) # predict the class probabilities for each data point. DR_predict_proba = DR.predict_proba(X_test) # Missing in DatRetRegressor, DatRetMultilabelClassifier<\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p><em>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <\/em> : <\/p>\n<ul>\n<li>\n<p><strong>epoch: <\/strong> int, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 30. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043f\u043e\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>optimizer: <\/strong> str,  (\u0438\u043c\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430) \u0438\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430.   \u0421\u043c. <a href=\"https:\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/optimizers\/legacy\/\" rel=\"noopener noreferrer nofollow\"> tf.keras.optimizers<\/a>, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = <code>Adam(learning_rate=0.001)<\/code>.  \u0412 DatRetRegressor \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0,01. <\/p>\n<\/li>\n<li>\n<p><strong>loss: <\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u0438.  str.   \u0421\u043c. <a href=\"https:\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/losses\" rel=\"noopener noreferrer nofollow\"> tf.keras.losses <\/a>,  \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f DatRetClassifier = <code>CategoricalCrossentropy()<\/code>, \u0434\u043b\u044f DatRetRegressor = <code>MeanSquaredError()<\/code>. <\/p>\n<\/li>\n<li>\n<p><strong>verbose: <\/strong>  &#8216;\u0430\u0432\u0442\u043e&#8217;, 0, 1 \u0438\u043b\u0438 2, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0.  \u0412\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u044d\u043f\u043e\u0445\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>number_neurons: <\/strong>  int, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 500. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435.    \u041f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043b\u043e\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0432\u0434\u0432\u043e\u0435 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c  \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432. <\/p>\n<\/li>\n<li>\n<p><strong>validation_split: <\/strong>  float \u043e\u0442 0 \u0434\u043e 1, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0. \u0414\u043e\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445  \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.  \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430  \u043d\u0435\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438 \u0438 \u043b\u044e\u0431\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432  \u043a\u043e\u043d\u0446\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u044d\u043f\u043e\u0445\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>batch_size: <\/strong>int<strong> <\/strong> , \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 1.   \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430.   Steps_per_epoch \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, <code>X_train.shape[0] \/\/ batch_size<\/code><\/p>\n<\/li>\n<li>\n<p><strong>shuffle: <\/strong> True \u0438\u043b\u0438 False, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = True.   &#171;\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435&#187; \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>callback: <\/strong> <code>[]<\/code>, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = <code>[EarlyStopping(monitor='loss', mode='auto', patience=7, verbose=1), ReduceLROnPlateau(monitor='loss', factor=0.2, patience=3, min_lr=0.00001, verbose=1)]<\/code>. <a href=\"https:\/\/www.tensorflow.org\/api_docs\/python\/tf\/keras\/callbacks\/\" rel=\"noopener noreferrer nofollow\">  \u0421allbacks <\/a> : \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. <\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <\/strong><code>fit<\/code> .<\/p>\n<p><em>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/em>:<\/p>\n<ul>\n<li>\n<p><strong>normalize:<\/strong> True or False, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u0435 True. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.preprocessing.MinMaxScaler.html\" rel=\"noopener noreferrer nofollow\">MinMaxScaler<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p> \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<pre><code class=\"python\"># load library import tensorflow as tf from tensorflow.keras.layers import * from tensorflow.keras.models import Model from tensorflow.keras.optimizers import Adam, Nadam from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau from tensorflow.keras.losses import CategoricalCrossentropy, MeanSquaredError, BinaryCrossentropy from datret.datret import DatRetClassifier, DatRetRegressor, DatRetMultilabelClassifier  # prepare train, test split. As in sklearn. # for example X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=i)  # Call the regressor or classifier and train the model. DR = DatRetClassifier(epoch=50,                       optimizer=Nadam(learning_rate=0.001),                       loss=BinaryCrossentropy(),                       verbose=1,                       number_neurons=1000,                       validation_split = 0.1,                       batch_size=100,                       shuffle=True,                       callback=[]) DR.fit(X_train, y_train, normalize=True) # predict the actual label (or class) over a new set of data. DR_predict = DR.predict(X_test) # predict the class probabilities for each data point. DR_predict_proba = DR.predict_proba(X_test)<\/code><\/pre>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p><strong>\u041c\u043e\u0434\u0435\u043b\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>number_neurons = 500<\/code>\u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u043e\u043c \u0441\u043b\u043e\u0435 \u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c 2-\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (0, 1) &#8212; \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. <\/p>\n<pre><code class=\"sql\">Model: \"DatRet with number_neurons = 500\" _________________________________________________________________  Layer (type)                Output Shape              Param #    =================================================================  input_1 (InputLayer)        [(None, X_train.shape[0)]      0            dense (Dense)               (None, 500)               150500       dense_1 (Dense)             (None, 250)               125250       dense_2 (Dense)             (None, 125)               31375        dense_3 (Dense)             (None, 62)                7812         dense_4 (Dense)             (None, 31)                1953         dense_5 (Dense)             (None, 15)                480          dense_6 (Dense)             (None, 7)                 112          dense_7 (Dense)             (None, 3)                 24           dense_8 (Dense)             (None, 2)                 8                                 (2 predictable classes)                                ================================================================= Total params: 317,514 Trainable params: 317,514 Non-trainable params: 0<\/code><\/pre>\n<hr\/>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p><strong>DatRetClassifier \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.kaggle.com\/datasets\/uciml\/pima-indians-diabetes-database\" rel=\"noopener noreferrer nofollow\">Pima Indians Diabetes Database | Kaggle<\/a>. \u041c\u0435\u0442\u0440\u0438\u043a\u0430 RocAucScore. \u0411\u0443\u0434\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c DatRet \u0441 RandomForest \u0438 CatBoost \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb.  \u041f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 <a href=\"https:\/\/github.com\/AbdualimovTP\/datret\/tree\/main\/test\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<pre><code class=\"python\">for i in [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]:     X_train, X_test, y_train, y_test = train_test_split(data.drop([\"Outcome\"], axis=1), data[\"Outcome\"],                                                 random_state=10, test_size=i)     #RandomForest     RF = RandomForestClassifier(random_state=0)     RF.fit(X_train, y_train)     RF_pred = RF.predict_proba(X_test)     dataFrameRocAuc.loc['RandomForest'][f'{int(i*100)}%'] = np.round(roc_auc_score(y_test, RF_pred[:,1]), 2)          #Catboost     CB = CatBoostClassifier(random_state=0, verbose=0)     CB.fit(X_train, y_train)     CB_pred = CB.predict_proba(X_test)     dataFrameRocAuc.loc['CatBoost'][f'{int(i*100)}%'] = np.round(roc_auc_score(y_test, CB_pred[:,1]), 2)          #DatRet     DR = DatRetClassifier(optimizer=Adam(learning_rate=0.001))     DR.fit(X_train, y_train)     DR_pred = DR.predict_proba(X_test)     dataFrameRocAuc.loc['DatRet'][f'{int(i*100)}%'] = np.round(roc_auc_score(y_test, DR_pred[:,1]), 2)<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<\/th>\n<th>\n<p>10% <\/p>\n<\/th>\n<th>\n<p>20% <\/p>\n<\/th>\n<th>\n<p>30% <\/p>\n<\/th>\n<th>\n<p>40% <\/p>\n<\/th>\n<th>\n<p>50% <\/p>\n<\/th>\n<th>\n<p>60% <\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>RandomForest <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.79 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0.81 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.81 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.79 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.82 <\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.82 <\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>CatBoost<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0.78 <\/p>\n<\/td>\n<td>\n<p align=\"left\">0.82 <\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>0.82 <\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-344323","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=344323"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344323\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}