Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge bugfix from main to release_docs #30

Merged
merged 5 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion obsidian/dash/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def fit_statistics(opt_save, config, filename):
[
dbc.ListGroupItem(['Model Type: ', f'{optimizer.surrogate_type}']),
dbc.ListGroupItem(['Data Name: ', filename]),
dbc.ListGroupItem(['R', html.Sup('2'), ' Score: ', f'{optimizer.surrogate[0].score: .4g}']), # for SOO only
dbc.ListGroupItem(['R', html.Sup('2'), ' Score: ', f'{optimizer.surrogate[0].r2_score: .4g}']), # for SOO only
dbc.ListGroupItem(['Marginal Log Likelihood: ', f'{optimizer.surrogate[0].loss: .4g}']), # for SOO only
], flush=True
)
Expand Down
2 changes: 1 addition & 1 deletion obsidian/optimizer/bayesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def fit(self,

if self.verbose > 0:
print(f'{self.surrogate_type[i]} model has been fit \
to data with a train-score of: {self.surrogate[i].score:.3g} for response: {self.y_names[i]}')
to data with a train-score of: {self.surrogate[i].r2_score:.3g} for response: {self.y_names[i]}')
return

def save_state(self) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion obsidian/surrogates/botorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SurrogateBoTorch(SurrogateModel):
mll (ExactMarginalLogLikelihood): The marginal log likelihood of the model.
torch_model (torch.nn.Module): The torch model for the surrogate.
loss (float): The loss of the model.
score (float): The R2 score of the model.
r2_score (float): The R2 score of the model.
"""
def __init__(self,
model_type: str = 'GP',
Expand Down
Loading