Skip to content

Add pycma Example for Optuna#321

Closed
ParagEkbote wants to merge 4 commits intooptuna:mainfrom
ParagEkbote:Add-pycma-example
Closed

Add pycma Example for Optuna#321
ParagEkbote wants to merge 4 commits intooptuna:mainfrom
ParagEkbote:Add-pycma-example

Conversation

@ParagEkbote
Copy link
Copy Markdown
Contributor

Refs #317

Description of the changes

This PR adds an example showing the integration of pycma with optuna. We use the iris flower dataset and RandomForestClassifier as the model. The following results are observed:
Best is trial 1 with value: 0.9583333333333334.

Final model (Optuna PyCmaSampler):
Best parameters: {'n_estimators': 55, 'max_depth': 12, 'max_features': 'log2'}

We also plot the following visualizations:

  1. Parameter Importance
  2. Contour Plot: n_estimators vs max_depth

Could you please review?

cc: @c-bata

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've removed the comment as the issue has been resolved :)

@nabenabe0928
Copy link
Copy Markdown
Contributor

@ParagEkbote
Thank you for the PR!
Could you add the example in the documentation string here so that the example will be visible here?

Important

Please use a square function $f(x, y) = x^2 + y^2$ as an objective function to make examples more concise.

@ParagEkbote ParagEkbote deleted the Add-pycma-example branch April 28, 2025 16:43
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.

2 participants