Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2016 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/06879824c2a1c6ce29184c28ff3daf03 to your computer and use it in GitHub Desktop.
Save anonymous/06879824c2a1c6ce29184c28ff3daf03 to your computer and use it in GitHub Desktop.
results of GraphLab's machine learning process
SUCCESS: Optimal solution found.
PROGRESS: Model selection based on validation accuracy:
PROGRESS: ---------------------------------------------
PROGRESS: BoostedTreesClassifier : 0.833333313465
PROGRESS: RandomForestClassifier : 0.833333313465
PROGRESS: DecisionTreeClassifier : 0.833333313465
PROGRESS: LogisticClassifier : 0.833333
PROGRESS: ---------------------------------------------
PROGRESS: Selecting BoostedTreesClassifier based on validation set performance.
>>> predictions = model.classify(test_data)
>>> results = model.evaluate(test_data)
>>> results
{'f1_score': 0.9679633867276888, 'auc': 0.9955012077294686, 'recall': 0.9722222222222222, 'precision': 0.9666666666666667, 'log_loss': 0.16391208595710882, 'roc_curve': Columns:
threshold float
fpr float
tpr float
p int
n int
class int
Rows: 300003
Data:
+-----------+-----+-----+----+----+-------+
| threshold | fpr | tpr | p | n | class |
+-----------+-----+-----+----+----+-------+
| 0.0 | 1.0 | 1.0 | 11 | 21 | 0 |
| 1e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 2e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 3e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 4e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 5e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 6e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 7e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 8e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
| 9e-05 | 1.0 | 1.0 | 11 | 21 | 0 |
+-----------+-----+-----+----+----+-------+
[300003 rows x 6 columns]
Note: Only the head of the SFrame is printed.
You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns., 'confusion_matrix': Columns:
target_label str
predicted_label str
count int
Rows: 4
Data:
+-----------------+-----------------+-------+
| target_label | predicted_label | count |
+-----------------+-----------------+-------+
| Iris-setosa | Iris-setosa | 11 |
| Iris-versicolor | Iris-versicolor | 11 |
| Iris-versicolor | Iris-virginica | 1 |
| Iris-virginica | Iris-virginica | 9 |
+-----------------+-----------------+-------+
[4 rows x 3 columns]
, 'accuracy': 0.96875}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment