diff --git a/learning_curve.py b/learning_curve.py index 2364f2c..9e7a836 100644 --- a/learning_curve.py +++ b/learning_curve.py @@ -11,16 +11,41 @@ num_trials = 10 train_percentages = range(5,95,5) test_accuracies = numpy.zeros(len(train_percentages)) +print train_percentages + +digits = load_digits() +print digits.DESCR +fig = plt.figure() +for i in range(10): + subplot = fig.add_subplot(5,2,i+1) + subplot.matshow(numpy.reshape(digits.data[i],(8,8)),cmap='gray') + +plt.show() # train a model with training percentages between 5 and 90 (see train_percentages) and evaluate # the resultant accuracy. # You should repeat each training percentage num_trials times to smooth out variability # for consistency with the previous example use model = LogisticRegression(C=10**-10) for your learner +test_accuracies = [] +n = 0 +while n