лаб3 поправка
This commit is contained in:
parent
1cd63f5c45
commit
afbceefcbd
@ -113,14 +113,6 @@
|
||||
"\n",
|
||||
"false_count = df[df['hazardous'] == False].shape[0]\n",
|
||||
"\n",
|
||||
"# Выбор случайных индексов записей с `false` для удаления\n",
|
||||
"# false_indices = df[df['hazardous'] == False].index\n",
|
||||
"# indices_to_remove = np.random.choice(false_indices, size=false_count - true_count, replace=False)\n",
|
||||
"\n",
|
||||
"# Удаляем выбранные записи\n",
|
||||
"# df = df.drop(indices_to_remove)\n",
|
||||
"\n",
|
||||
"#undersampling (удаление наблюдений с hazardous=true до количества наблюдений с hazardous=false)\n",
|
||||
"\n",
|
||||
"# разделение датасета на 2 части по hazardous\n",
|
||||
"from sklearn.utils import resample\n",
|
||||
@ -278,10 +270,6 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# print(df['orbiting_body'].unique())\n",
|
||||
"# print(df['sentry_object'].unique())\n",
|
||||
"# print(df['hazardous'].unique())\n",
|
||||
"\n",
|
||||
"#проверка на пропущенные значения\n",
|
||||
"columns_with_nulls = []\n",
|
||||
"for col in df.columns:\n",
|
||||
|
Loading…
Reference in New Issue
Block a user