Skip to content

Commit

Permalink
Update train.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dec1costello authored Oct 13, 2024
1 parent 0fdbf9d commit f3a0475
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Streamlit/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
test_score = regr.score(X_test, y_test) * 100

# Write scores to a file
with open("Streamlit/results.txt", 'w') as outfile:
with open("Streamlit/Training\ Report/results.txt", 'w') as outfile:
outfile.write("Training variance explained: %2.1f%%\n" % train_score)
outfile.write("Test variance explained: %2.1f%%\n" % test_score)

Expand All @@ -57,7 +57,8 @@
ax.set_title('Random forest\nfeature importance', fontsize = title_fs)

plt.tight_layout()
plt.savefig("Streamlit/feature_importance.png",dpi=120)
# plt.savefig("Streamlit/feature_importance.png",dpi=120)
plt.savefig("Streamlit/Training\ Report/feature_importance.png", dpi=120)
plt.close()


Expand All @@ -81,4 +82,4 @@
plt.xlim((2.5,8.5))

plt.tight_layout()
plt.savefig("Streamlit/residuals.png",dpi=120)
plt.savefig("Streamlit/Training\ Report/residuals.png",dpi=120)

0 comments on commit f3a0475

Please sign in to comment.