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