diff --git a/Main.py b/Main.py new file mode 100644 index 0000000..a61663d --- /dev/null +++ b/Main.py @@ -0,0 +1,28 @@ +from Prediction import Prediction +import numpy as np +import pandas as pd +import random +from sklearn.metrics import mean_squared_error +from sklearn.metrics import mean_absolute_error +from sklearn.metrics import median_absolute_error +from math import sqrt + +#Prediction of complexity level (the number of levels is variable) +#Each row is a complexity level, each pair [,] is the note and the time for a question (test with 3 levels) + +dataI=pd.read_csv('dataInitial.csv', sep=' ', header=0) +data=pd.read_csv('data.csv', sep=' ', header=0) +v1=[] +v2=[] +n=0 +#for name,dr in dataI.iterrows(): +for i in range(1): + + #initialization of Beta distribution for all the complexity levels (test with 5 levels) + betap=[[1,1],[1,2],[1,3],[1,4],[1,5]] + + #Parameters: previous grades and times, a-priori paameters for beta distribution in each complexity level, step for change beta parameters, value of penalization for time and value of limit between win and loss + pred=Prediction(dataI.iloc[i,:], data.iloc[i,:], betap, 0.2, 1/16, 6) + pred.CalculateGradePenalization() + pred.Calculate() + pred.CalculateSW()