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

Multi obj epm #837

Merged
merged 30 commits into from
May 19, 2022
Merged

Multi obj epm #837

merged 30 commits into from
May 19, 2022

Conversation

dengdifan
Copy link
Contributor

This PR makes it easier for developing new Multi-Objective models. Also, it will explicitly raise an error if the acquisition function is incompatible with the epm models

"""Wrapper for the surrogate models to predict multiple targets.

Only a list with the target names and the types array for the
underlying forest model are mandatory. All other hyperparameters to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only RF works?

model_kwargs = {}
self.target_names = target_names
self.num_targets = len(self.target_names)
print(seed, model_kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep the print statement?

raise NotImplementedError

def _train(self, X: np.ndarray, Y: np.ndarray) -> "UncorrelatedMultiObjectiveModel":
"""Trains the random forest on X and y.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjust to "trains the surrogate model on X and y"?

# (incremental updates are used to save time as getting the cost for > 100 instances is high)
# assumes an average across runs as cost function aggregation, this is used for
# algorithm configuration (incremental updates are used to save time as getting
# Zthe cost for > 100 instances is high)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small typo 👀

# (incremental updates are used to save time as getting the cost for > 100 instances is high)
# assumes an average across runs as cost function aggregation, this is used for
# algorithm configuration (incremental updates are used to save time as getting
# Zthe cost for > 100 instances is high)
self.incremental_update_cost(self.ids_config[k.config_id], v.cost)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the cost in runhistory will be still averaged for the new uncorrelated MO?

@@ -725,5 +725,5 @@ def transform_response_values(self, values: np.ndarray) -> np.ndarray:
-------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do we not add 1 anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This aims at solving the issue #833

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to #833 , todo: create a separate PR for that:)

@benjamc
Copy link
Contributor

benjamc commented May 12, 2022

We should create an acquisition function that works with this type of surrogate model :)

@renesass renesass merged commit ac178f5 into development May 19, 2022
@renesass renesass deleted the multi_obj_epm branch May 19, 2022 08:37
@renesass renesass restored the multi_obj_epm branch May 19, 2022 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants