.
This commit is contained in:
parent
3f38290d0b
commit
7d0bc87876
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
__pycache__
|
||||
.ipynb_checkpoints
|
||||
suicide_model.h5
|
||||
suicide_model.h5
|
||||
test.csv
|
||||
train.csv
|
||||
validate.csv
|
@ -1,5 +1,7 @@
|
||||
pipeline {
|
||||
agent any;
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
parameters{
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
|
@ -5,22 +5,21 @@ import matplotlib.pyplot as plt
|
||||
from keras import backend as K
|
||||
from sklearn.metrics import mean_squared_error
|
||||
|
||||
model = 'suicide_model.h5'
|
||||
model = keras.models.load_model(model)
|
||||
model = keras.models.load_model('suicide_model.h5')
|
||||
|
||||
train = pd.read_csv('train.csv')
|
||||
test = pd.read_csv('test.csv')
|
||||
validate = pd.read_csv('validate.csv')
|
||||
# train = pd.read_csv('train.csv')
|
||||
# test = pd.read_csv('test.csv')
|
||||
# validate = pd.read_csv('validate.csv')
|
||||
|
||||
# podział train set
|
||||
X_train = train.loc[:, train.columns != 'suicides_no']
|
||||
y_train = train[['suicides_no']]
|
||||
X_test = test.loc[:, train.columns != 'suicides_no']
|
||||
y_test = test[['suicides_no']]
|
||||
# # podział train set
|
||||
# X_train = train.loc[:, train.columns != 'suicides_no']
|
||||
# y_train = train[['suicides_no']]
|
||||
# X_test = test.loc[:, train.columns != 'suicides_no']
|
||||
# y_test = test[['suicides_no']]
|
||||
|
||||
predictions = model.predict(X_test)
|
||||
# predictions = model.predict(X_test)
|
||||
|
||||
error = mean_squared_error(y_test, predictions)
|
||||
# error = mean_squared_error(y_test, predictions)
|
||||
|
||||
with open('eval_results.txt', 'a') as f:
|
||||
f.write(str(error) + "\n")
|
||||
# with open('eval_results.txt', 'a') as f:
|
||||
# f.write(str(error) + "\n")
|
||||
|
Loading…
Reference in New Issue
Block a user