mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-15 23:45:54 +00:00
Add version info to Reports
This commit is contained in:
@@ -208,6 +208,7 @@ class Experiment:
|
||||
shuffle=True, random_state=random_state, n_splits=self.folds
|
||||
)
|
||||
clf = self._build_classifier(random_state, hyperparameters)
|
||||
self.version = clf.version() if hasattr(clf, "version") else "-"
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore")
|
||||
res = cross_validate(
|
||||
@@ -248,6 +249,7 @@ class Experiment:
|
||||
output = {}
|
||||
output["score_name"] = self.score_name
|
||||
output["model"] = self.model_name
|
||||
output["version"] = self.version
|
||||
output["stratified"] = self.stratified
|
||||
output["folds"] = self.folds
|
||||
output["date"] = self.date
|
||||
|
@@ -136,7 +136,8 @@ class Report(BaseReport):
|
||||
self._compare_totals = {}
|
||||
self.header_line("*")
|
||||
self.header_line(
|
||||
f" Report {self.data['model']} with {self.data['folds']} Folds "
|
||||
f" Report {self.data['model']} ver. {self.data['version']}"
|
||||
f" with {self.data['folds']} Folds "
|
||||
f"cross validation and {len(self.data['seeds'])} random seeds"
|
||||
)
|
||||
self.header_line(
|
||||
@@ -262,7 +263,8 @@ class Excel(BaseReport):
|
||||
self.sheet.write(
|
||||
0,
|
||||
0,
|
||||
f" Report {self.data['model']} with {self.data['folds']} Folds "
|
||||
f" Report {self.data['model']} ver. {self.data['version']}"
|
||||
f" with {self.data['folds']} Folds "
|
||||
f"cross validation and {len(self.data['seeds'])} random seeds",
|
||||
header,
|
||||
)
|
||||
|
Reference in New Issue
Block a user