Skip to content

Commit

Permalink
Addressing @mastoffel's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewesterling committed Feb 28, 2024
1 parent b488761 commit 75d5ae6
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions autoemulate/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def setup(
self.folds = folds
self.cv_results = {}

self.print_settings()
self.print_setup()

def _check_input(self, X, y):
"""Checks and possibly converts the input data.
Expand Down Expand Up @@ -378,10 +378,9 @@ def load_model(self, path=None):

return serialiser._load_model(path)

def print_settings(self):
def print_setup(self):
if not self.is_set_up:
raise RuntimeError("Must run setup() before print_settings()")
return
raise RuntimeError("Must run setup() before print_setup()")

models = "\n- " + "\n- ".join(
[
Expand All @@ -397,30 +396,32 @@ def print_settings(self):
[
str(self.X.shape),
str(self.y.shape),
str(self.train_idxs.shape),
str(self.test_idxs.shape),
str(self.train_idxs.shape[0]),
str(self.test_idxs.shape[0]),
str(self.param_search),
str(self.search_type),
str(self.param_search_iters),
str(self.scale),
str(
self.scaler.__class__.__name__ if self.scaler is not None else None
self.scaler.__class__.__name__
if self.scaler is not None
else "None"
),
str(self.reduce_dim),
str(
self.dim_reducer.__class__.__name__
if self.dim_reducer is not None
else None
else "None"
),
str(self.cv.__class__.__name__ if self.cv is not None else "None"),
str(self.folds),
str(self.n_jobs),
str(self.n_jobs if self.n_jobs is not None else "1"),
],
index=[
"Simulation input shape (X)",
"Simulation output shape (y)",
"Training dataset shape (train_idxs)",
"Test dataset shape (test_idxs)",
"# training set samples (train_idxs)",
"# test set samples (test_idxs)",
"Do hyperparameter search (param_search)",
"Type of hyperparameter search (search_type)",
"# sampled parameter settings (param_search_iters)",
Expand Down

0 comments on commit 75d5ae6

Please sign in to comment.