trigger other projects
All checks were successful
s434765-evaluation/pipeline/head This commit looks good
All checks were successful
s434765-evaluation/pipeline/head This commit looks good
This commit is contained in:
parent
b9f143d46c
commit
8251db9abf
@ -8,6 +8,7 @@ RUN pip3 install pandas
|
||||
RUN pip3 install kaggle
|
||||
RUN pip3 install tensorflow
|
||||
RUN pip3 install sklearn
|
||||
RUN pip3 install matplotlib
|
||||
COPY ./data_dev ./
|
||||
COPY ./evaluate_network.py ./
|
||||
RUN mkdir /.kaggle
|
||||
|
@ -19,7 +19,7 @@ node {
|
||||
|
||||
}
|
||||
stage('Clone repo') {
|
||||
docker.image("karopa/ium:16").inside {
|
||||
docker.image("karopa/ium:20").inside {
|
||||
stage('Test') {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/evaluation']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]])
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 's434765-create-dataset', selector: buildParameter("BUILD_DATASET")
|
||||
|
@ -2,15 +2,16 @@ import pandas as pd
|
||||
import numpy as np
|
||||
from sklearn.metrics import mean_squared_error
|
||||
from tensorflow import keras
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
model = keras.models.load_model('model')
|
||||
data = pd.read_csv("data_dev", sep=',', error_bad_lines=False,
|
||||
skip_blank_lines=True, nrows=527, names=["video_id", "last_trending_date",
|
||||
"publish_date", "publish_hour", "category_id",
|
||||
"channel_title", "views", "likes", "dislikes",
|
||||
"comment_count"]).dropna()
|
||||
X_test = data.loc[:,data.columns == "views"].astype(int)
|
||||
y_test = data.loc[:,data.columns == "likes"].astype(int)
|
||||
"publish_date", "publish_hour", "category_id",
|
||||
"channel_title", "views", "likes", "dislikes",
|
||||
"comment_count"]).dropna()
|
||||
X_test = data.loc[:, data.columns == "views"].astype(int)
|
||||
y_test = data.loc[:, data.columns == "likes"].astype(int)
|
||||
|
||||
min_val_sub = np.min(X_test)
|
||||
max_val_sub = np.max(X_test)
|
||||
@ -39,3 +40,11 @@ print(error)
|
||||
|
||||
with open("rmse.txt", "a") as file:
|
||||
file.write(str(error) + "\n")
|
||||
|
||||
with open("rmse.txt", "r") as file:
|
||||
lines = file.readlines()
|
||||
plt.plot(range(len(lines)), [line[:-2] for line in lines])
|
||||
plt.tight_layout()
|
||||
plt.ylabel('RMSE')
|
||||
plt.xlabel('evaluation no')
|
||||
plt.savefig('evaluation.png')
|
||||
|
Loading…
Reference in New Issue
Block a user