diff --git a/source/experiments/train_on_reduced_dataset.py b/source/experiments/train_on_reduced_dataset.py index 8748383cbee9666044da5dddf645106bc4d24be8..2ed0c9bc11d529507584f70ba15bad74c5a737a1 100644 --- a/source/experiments/train_on_reduced_dataset.py +++ b/source/experiments/train_on_reduced_dataset.py @@ -77,7 +77,7 @@ class RedAQbench: total_contribs = df.loc['total', :] # a histogram of the contributions - if False: + if True: plt.hist(total_contribs, bins=100) plt.xlabel('Sum of contributions over test set') plt.ylabel('Number of stations with that contribution sum in training set') @@ -117,11 +117,11 @@ class RedAQbench: Let's see how the performance drops. """ print('Train reference and reduced...') - ref_model_dir = f'reference_{model}/' - red_model_dir = f'reduced_{model}/' - if model == 'rf': + ref_model_dir = f'reference_{self.model}/' #Scarlet ?? + red_model_dir = f'reduced_{self.model}/' #Scarlet ?? + if self.model == 'rf': Model = RandomForest - elif model == 'nn': + elif self.model == 'nn': Model = NeuralNetwork # Train reference @@ -246,10 +246,11 @@ def compare_unimportant_stations(): # found 154 of only nn # found 153 of only rf # found 181 of both + pdb.set_trace() if __name__ == '__main__': """ Conduct the experiment. """ - # training_experiment() + training_experiment() compare_unimportant_stations()