|
|
|
|
@ -332,14 +332,17 @@ print(classification_report(y_test, y_pred, labels = [0, 1], target_names=['Nega
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Результат выполнения:**
|
|
|
|
|
```
|
|
|
|
|
Negative 0.84 0.89 0.86 12500
|
|
|
|
|
Positive 0.88 0.83 0.86 12500
|
|
|
|
|
|
|
|
|
|
accuracy 0.86 25000
|
|
|
|
|
macro avg 0.86 0.86 0.86 25000
|
|
|
|
|
weighted avg 0.86 0.86 0.86 25000
|
|
|
|
|
```
|
|
|
|
|
| Class | Precision | Recall | F1-Score | Support |
|
|
|
|
|
|-----------|-----------|--------|----------|---------|
|
|
|
|
|
| Negative | 0.84 | 0.89 | 0.86 | 12500 |
|
|
|
|
|
| Positive | 0.88 | 0.83 | 0.86 | 12500 |
|
|
|
|
|
|
|
|
|
|
| Metric | Score |
|
|
|
|
|
|---------------------|-------|
|
|
|
|
|
| accuracy | 0.86 |
|
|
|
|
|
| macro avg | 0.86 |
|
|
|
|
|
| weighted avg | 0.86 |
|
|
|
|
|
|
|
|
|
|
### Пункт №10.3
|
|
|
|
|
|
|
|
|
|
@ -356,6 +359,8 @@ plt.show()
|
|
|
|
|
print('Area under ROC is', auc(fpr, tpr))
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Результат выполнения:**
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
Area under ROC is 0.9304564479999999
|
|
|
|
|
|