Skip to content

Commit

Permalink
better names (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed May 27, 2020
1 parent 803b9e4 commit 4047c34
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion supervised/automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ def stacked_ensemble_step(self):

params = copy.deepcopy(m.params)
params["validation"]["X_train_path"] = X_train_stacked_path
params["name"] = "Stacked" + params["name"]

params["name"] = params["name"] + "_Stacked"
params["is_stacked"] = True

if "model_architecture_json" in params["learner"]:
Expand Down
2 changes: 1 addition & 1 deletion supervised/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(

self._additional_metrics = None
self._threshold = None
self._name = "stacked_ensemble" if is_stacked else "ensemble"
self._name = "Ensemble_Stacked" if is_stacked else "Ensemble"
self._scores = []
self.oof_predictions = None

Expand Down
2 changes: 1 addition & 1 deletion supervised/tuner/mljar_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
self._unique_params_keys = []

def get_model_name(self, model_type, models_cnt, special = ""):
return special + model_type.replace(" ", "")+ f"_{models_cnt}"
return f"{models_cnt}_" + special + model_type.replace(" ", "")

def simple_algorithms_params(self):
models_cnt = 0
Expand Down
4 changes: 3 additions & 1 deletion supervised/utils/learning_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ def plot_single_iter(validation_splits, metric_name, model_path, colors):
)
plt.bar(f"Fold {l+1}, test", df.test[0], color=colors[l])

plt.tight_layout(pad=2.0)

plt.ylabel(metric_name)
plt.xticks(rotation=90)
plt.tight_layout(pad=2.0)
plot_path = os.path.join(model_path, LearningCurves.output_file_name)
plt.savefig(plot_path)
plt.close("all")
Expand Down

0 comments on commit 4047c34

Please sign in to comment.