def infer_overall(season): l = get_overall_pie(season) draw_hist(l[0], BIN) draw_hist(l[1], BIN) finish('x', 'y', './static_infer') infer_by_t(l[1], l[0]) infer_by_chi(l[1], l[0])
def infer_rest_player(player_id, path=PATH): rest = get_pie(player_id)[1:] assert len(rest) == len(REST_LIST) # draw graph tmp = [] final = [] for i in range(0, len(rest)): if rest[i] != 0: final.append(rest[i]) tmp.append(REST_LIST[i]) draw_scatter(tmp, final, 10) if len(tmp) < 3: return s = different_model(tmp, final) add_text(0.3, 0.15, s) draw.finish('Day(s)', 'PIE', path + player_id)