7762aa93ff14011
http://nhiro.org.s3.amazonaws.com/6/d/6d3ec13b4ebbf0442709d033fbdebec9.jpg https://gyazo.com/6d3ec13b4ebbf0442709d033fbdebec9
(OCR text)
12
scoringオプション
cross_val_scoreはデフォルトでは正解率を返す
scoringオプションでlog lossなど色々なものを
選ぶことができる
def do_cross_validation ( )
make_model(O
cross_validation.StratifiedKFold (ys)
cross_validation.cross_val_score(
model, xs, ys, cv cv, scoring='log_loss')
print("LogLoss: %0.2f (+/- %0.2f)"
% (scores.mean(),
model =
CV
Scores
scores.std()
2))