<commit_before>import numpy
import parse
import utils
import similarity_functions as sf

def main():
    training, test, metadata = parse.load(1)
    ratingMatrix = utils.constructRatingMatrix(training, metadata)
    similarity = sf.cosineMatrix(ratingMatrix)
    predictRatingMatrix =  utils.predictRating(similarity, ratingMatrix)
    return predictRatingMatrix

if __name__ == '__main__':
    print main()
<commit_msg>resolved conflicts<commit_after>import numpy
import parse
import utils
import similarity_functions as sf

def main():
    training, test, metadata = parse.load(1)
    ratingMatrix = utils.constructRatingMatrix(training, metadata)
    similarity = sf.cosineMatrix(ratingMatrix)
    print "similarity done"
    prediction = utils.predictRating(similarity, ratingMatrix)
    predictionOnTest = prediction[test[:, 0]-1, test[:, 1]-1]
    error = predictionOnTest - test[:, 2]
    print np.abs(error).mean()

if __name__ == '__main__':
    print main()

{'fraction_non_alphanumeric': 0.09700722394220847, 'fraction_numerical': 0.007223942208462332, 'mean_word_length': 4.808383233532934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '990859', 'n_tokens_mistral': 286, 'n_tokens_neox': 279, 'n_words': 75}