evaluation appends to csv
Some checks failed
s444354-training/pipeline/head There was a failure building this commit
Some checks failed
s444354-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
6cfda35026
commit
97681d967d
@ -13,6 +13,7 @@ RUN pip3 install torch
|
|||||||
RUN pip3 install seaborn
|
RUN pip3 install seaborn
|
||||||
RUN pip3 install torchvision
|
RUN pip3 install torchvision
|
||||||
RUN pip3 install sklearn
|
RUN pip3 install sklearn
|
||||||
|
RUN pip3 install csv
|
||||||
# RUN python3 -m pip install kaggle
|
# RUN python3 -m pip install kaggle
|
||||||
RUN python3 -m pip install pandas
|
RUN python3 -m pip install pandas
|
||||||
RUN pip3 install matplotlib
|
RUN pip3 install matplotlib
|
||||||
|
@ -37,8 +37,8 @@ pipeline {
|
|||||||
copyArtifacts projectName: 's444354-create-dataset'
|
copyArtifacts projectName: 's444354-create-dataset'
|
||||||
copyArtifacts projectName: 's444354-training/$TRAINING_BRANCH'
|
copyArtifacts projectName: 's444354-training/$TRAINING_BRANCH'
|
||||||
sh 'python3 ./evaluation.py'
|
sh 'python3 ./evaluation.py'
|
||||||
archiveArtifacts 'TRAIN_winequality-red.csv'
|
archiveArtifacts 'eval.csv'
|
||||||
sh "ls -la"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import pandas as pd
|
|||||||
import re
|
import re
|
||||||
from sklearn import metrics
|
from sklearn import metrics
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import csv
|
||||||
|
|
||||||
f = open("result.txt", "r")
|
f = open("result.txt", "r")
|
||||||
|
|
||||||
@ -16,6 +17,13 @@ for x in f:
|
|||||||
|
|
||||||
list_result.append(result)
|
list_result.append(result)
|
||||||
list_predicted.append(predicted)
|
list_predicted.append(predicted)
|
||||||
print("MAE: ", metrics.mean_absolute_error(list_result, list_predicted))
|
metrics = metrics.mean_absolute_error(list_result, list_predicted), metrics.mean_squared_error(list_result, list_predicted),np.sqrt(metrics.mean_absolute_error(list_result, list_predicted))
|
||||||
print("MSE: ",metrics.mean_squared_error(list_result, list_predicted))
|
print("MAE: ", metrics[0])
|
||||||
print("RMSE: ",np.sqrt(metrics.mean_absolute_error(list_result, list_predicted)))
|
print("MSE: ",metrics[1])
|
||||||
|
print("RMSE: ",metrics[2])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
with open('eval.csv', 'a', newline='') as f:
|
||||||
|
writer = csv.writer(f)
|
||||||
|
writer.writerow((metrics[0],metrics[1], metrics[2]))
|
||||||
|
Loading…
Reference in New Issue
Block a user