work on lab6
Some checks failed
s449288-training/pipeline/head There was a failure building this commit
Some checks failed
s449288-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
a857c78b74
commit
536d52d1c9
5
lab6/Jenkinsfile
vendored
5
lab6/Jenkinsfile
vendored
@ -11,8 +11,9 @@ pipeline {
|
||||
echo 'Datasets copied'
|
||||
echo 'Conducting simple regression model test'
|
||||
sh 'python3 simple_regression.py'
|
||||
echo 'Model predictions saved'
|
||||
sh 'head lego_linreg_results.csv'
|
||||
echo 'Model and predictions saved'
|
||||
sh 'head lego_reg_results.csv'
|
||||
sh 'head lego_reg_model'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import tensorflow as tf
|
||||
from keras import layers
|
||||
from keras import save_model
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
@ -51,7 +52,10 @@ y = model.predict(x)
|
||||
|
||||
# Zapis predykcji do pliku
|
||||
results = pd.DataFrame({"input_piece_count": x.numpy().tolist(), "predicted_price": [a[0] for a in y.tolist()]})
|
||||
results.to_csv(r'lego_linreg_results.csv', index=False, header=True)
|
||||
results.to_csv(r'lego_reg_results.csv', index=False, header=True)
|
||||
|
||||
# Zapis modelu do pliku
|
||||
model.save('lego_reg_model')
|
||||
|
||||
# Opcjonalne statystyki, wykresy
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user