import main def solution(tests): return [0]*len(tests) if __name__ == '__main__': main.update_answers(0, 1)
# result[2] = levels[level] return result def _get_users_features(user_id, users): # users_types = {'S': 0, 'W': 1, 'NA': 2} result = numpy.zeros(shape=(USER_FEATURES,)) result[0] = users[user_id]['solved_count'] result[1] = users[user_id]['attempts'] # result[2] = users_types[users[user_id]['user_type']] return result def get_feature_vector(problem_id, problems, user_id, users): result = _get_problem_features(problem_id, problems) result = numpy.concatenate((result, _get_users_features(user_id, users))) assert len(result) == NUMBER_OF_FEATURES return result def solution(tests, train_problems, train_users, test_problems, test_users, submissions): purifying._purify_submissions_unique_rows(submissions) return utils.solve(train_problems, train_users, submissions, tests, test_problems, test_users, NUMBER_OF_FEATURES, get_feature_vector) if __name__ == '__main__': main.update_answers(0, 0)
submissions, tests, train_problems, train_users, NUMBER_OF_FEATURES, get_feature_vector, ) # sbmt_low, sbmt_high = split_submissions(submissions, train_users) # test_low, test_high, ids_low, ids_high = split_tests(tests, train_users) # purifying._purify_submissions_unique_rows(sbmt_high) # answer_labels = [0] * len(tests) # temp_labels = utils.solve(train_problems, train_users, sbmt_low, test_low, # train_problems, train_users, # NUMBER_OF_FEATURES, # get_feature_vector_for_low) # utils.apply_results(answer_labels, temp_labels, ids_low) # temp_labels = utils.solve(train_problems, train_users, sbmt_high, # test_high, train_problems, train_users, # NUMBER_OF_FEATURES, # get_feature_vector_for_low) # utils.apply_results(answer_labels, temp_labels, ids_high) # # print('u1p1 has ended, time =', time.clock()) # return answer_labels if __name__ == "__main__": main.update_answers(1, 1)
import main def solution(tests): return [0]*len(tests) if __name__ == '__main__': main.update_answers(1, 0)