Skip to content

Commit

Permalink
tweak class 7 homework solution
Browse files Browse the repository at this point in the history
  • Loading branch information
justmarkham committed Apr 14, 2015
1 parent 6c0d1ff commit 676ba6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/07_glass_id_homework_solution.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
EXERCISE: Glass Identification (aka "Glassification")
HOMEWORK: Glass Identification (aka "Glassification")
'''

# TASK 1: read data into a DataFrame
Expand Down Expand Up @@ -44,7 +44,7 @@
print metrics.accuracy_score(y_test, y_pred) # 90.7% accuracy

# TASK 9: calculate null accuracy
1 - y_test.mean() # 74.1% null accuracy
1 - y.mean() # 76.2% null accuracy

# BONUS: write a for loop that computes test set accuracy for a range of K values
k_range = range(1, 30, 2)
Expand Down

0 comments on commit 676ba6a

Please sign in to comment.