text_plain_output_1.png
from sklearn.metrics.classification import accuracy_score, log_loss

from sklearn.metrics.classification import accuracy_score, log_loss

import numpy as np

import numpy as np # linear algebra

from sklearn.metrics.classification import accuracy_score, log_loss
cross_validation_size = y_cv.shape[0]
random_cross_validation = np.zeros((cross_validation_size, 9))
for i in range(cross_validation_size):
    random_prob = np.random.rand(1, 9)
    random_cross_validation[i] = (random_prob / sum(sum(random_prob)))[0]

from sklearn.metrics.classification import accuracy_score, log_loss
test_size = y_test.shape[0]
random_test_data = np.zeros((test_size, 9))
for i in range(test_size):
    random_prob = np.random.rand(1, 9)
    random_test_data[i] = (random_prob / sum(sum(random_prob)))[0]
print('log loss for random test data is', log_loss(y_test, random_test_data))