Skip to content

Commit

Permalink
Update neural_network.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 19, 2024
1 parent 9b9eb28 commit 6a39d57
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,13 @@ def evaluate_model(self):
# Calculate mean squared error
mse = mean_squared_error(self.y_test, y_pred)

# Calculate R-squared
# Calculate R-squared score
r2 = r2_score(self.y_test, y_pred)

return mse, r2

def make_predictions(self, input_features):
# Make predictions using trained model
predictions = self.model.predict(input_features)

return predictions

0 comments on commit 6a39d57

Please sign in to comment.