From eaee61b0a7a8c37b12ffe6b9569308849f0fa4a3 Mon Sep 17 00:00:00 2001 From: Aidan Borkan <134334100+aidanborkan@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:26:45 -0600 Subject: [PATCH] Update test_code2 #AB: must be a str among {'poisson', 'friedman_mse', 'absolute_error', 'squared_error'} #criterion cannot be 'mse' valid options: --- test_code2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_code2 b/test_code2 index 1909675..c8be975 100644 --- a/test_code2 +++ b/test_code2 @@ -197,7 +197,9 @@ class learning_data_inividual_protein_data(protein_data): def RandomForest(self): x_train, x_test, y_train, y_test = self.test_train() - forest = RandomForestRegressor(n_estimators=1000,criterion='mse',max_depth=10,random_state=1,n_jobs=-1) + #In every instance in which the class RandomForest is defined we need to modify the criterion. mse is not an acceptable option. + #choice of: {'poisson', 'friedman_mse', 'absolute_error', 'squared_error'} + forest = RandomForestRegressor(n_estimators=1000,criterion='squared_error',max_depth=10,random_state=1,n_jobs=-1) forest.fit(x_train, y_train) return forest