Commit a4e52106 authored by Bannier Delphine's avatar Bannier Delphine
Browse files

update evaluation

parent 61dd2e62
This diff is collapsed.
......@@ -41,11 +41,10 @@ def evaluate_mlp(model,df, trainAttrX, trainY,sc):
print("mean difference : {:.2f}%, std: {:.2f}%".format(mean, std))
return preds
def compute_score(y_true, y_pred):
sigma = ( y_true - y_pred ) #########
def compute_score(y_true, y_pred, sigma):
fvc_pred = y_pred
sigma_clip = np.maximum(sigma, 70)
delta = np.minimum(abs(y_true - fvc_pred),1000)
sq2 = math.sqrt(2)
metric = -(delta / sigma_clip)*sq2 - np.log(sigma_clip* sq2)
return (sigma, np.mean(metric))
\ No newline at end of file
return (np.mean(metric))
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment