lab4 4
This commit is contained in:
parent
312f5ddda3
commit
6b53f39c9c
@ -115,7 +115,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -159,10 +159,6 @@
|
|||||||
"print(f'Cредняя абсолютная ошибка (MAE) = {mean_absolute_error(y_test, y_pred)}')\n",
|
"print(f'Cредняя абсолютная ошибка (MAE) = {mean_absolute_error(y_test, y_pred)}')\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# mse, bias, variance = bias_variance_decomp(best_model, X_train.values, y_train.values, X_test.values, y_test.values, loss='mse', num_rounds=200, random_seed=123)\n",
|
|
||||||
"# print(\"Смещение: \", bias)\n",
|
|
||||||
"# print(\"Дисперсия: \", variance)\n",
|
|
||||||
"\n",
|
|
||||||
"# Оценка дисперсии и смещения\n",
|
"# Оценка дисперсии и смещения\n",
|
||||||
"cv_results = grid_search.cv_results_\n",
|
"cv_results = grid_search.cv_results_\n",
|
||||||
"mean_test_score = cv_results['mean_test_score']\n",
|
"mean_test_score = cv_results['mean_test_score']\n",
|
||||||
@ -185,7 +181,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 9,
|
"execution_count": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -230,9 +226,6 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"print(f'Cредняя абсолютная ошибка (MAE) = {mean_absolute_error(y_test, y_pred)}')\n",
|
"print(f'Cредняя абсолютная ошибка (MAE) = {mean_absolute_error(y_test, y_pred)}')\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# mse, bias, variance = bias_variance_decomp(best_model, X_train.values, y_train.values, X_test.values, y_test.values, loss='mse', num_rounds=200, random_seed=123)\n",
|
|
||||||
"# print(\"Смещение: \", bias)\n",
|
|
||||||
"# print(\"Дисперсия: \", variance)\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"cv_results = grid_search.cv_results_\n",
|
"cv_results = grid_search.cv_results_\n",
|
||||||
"mean_test_score = cv_results['mean_test_score']\n",
|
"mean_test_score = cv_results['mean_test_score']\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user