Skip to content

Tutorial blm#90

Merged
yomichi merged 5 commits intodevelopfrom
tutorial_blm
Mar 12, 2026
Merged

Tutorial blm#90
yomichi merged 5 commits intodevelopfrom
tutorial_blm

Conversation

@yomichi
Copy link
Copy Markdown
Contributor

@yomichi yomichi commented Mar 12, 2026

  1. Fix misc.permutation_importance and blm.Model.permutation_importance

  2. Added a tutorial how to use blm.Model

  3. Update of blm.Model.predict_sampling(X, N=n)

    • Fix a bug that N=1 returns N=X.shape[0] result
    • Becomes to return a (n, X.shape[0]) array instead of (X.shape[0], n) to achieve the consistency with gp.Model.predict_sampling(), which returns (n, X.shape[0])

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates PHYSBO’s permutation-importance implementation to support models (notably BLM) whose get_post_fmean API takes only query points, and extends the Gaussian process tutorial notebooks to demonstrate building/using blm.Model.

Changes:

  • Add query_only option to misc.get_permutation_importance() to support BLM-style get_post_fmean(X_query) calls.
  • Update blm.Model.get_permutation_importance() to use query_only=True.
  • Extend JP/EN GP tutorial notebooks with a new section demonstrating gp.export_blm() and basic BLM usage (including permutation importance).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/physbo/misc/permutation_importance.py Adds query_only branch for BLM-style prediction API (but still has a critical MPI feature-splitting bug).
src/physbo/blm/core/_model.py Routes BLM permutation importance through the updated helper with query_only=True.
docs/sphinx/manual/ja/source/notebook/tutorial_Gaussian_process.ipynb Adds BLM tutorial section (includes very large stored outputs).
docs/sphinx/manual/en/source/notebook/tutorial_Gaussian_process.ipynb Adds BLM tutorial section (includes very large stored outputs).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yomichi yomichi marked this pull request as draft March 12, 2026 00:59
@yomichi
Copy link
Copy Markdown
Contributor Author

yomichi commented Mar 12, 2026

After seeing copilot's review, I find that blm.Model.predict_sampling(X) returns N x N matrix (N=X.shape[0]) while we expect an N x 1 matrix (vector)... I will fix it

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yomichi yomichi marked this pull request as ready for review March 12, 2026 06:23
@yomichi yomichi merged commit 0ebbc5e into develop Mar 12, 2026
32 checks passed
@yomichi yomichi deleted the tutorial_blm branch March 12, 2026 07:00
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