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

Update branch with main #17

Merged
merged 7 commits into from
Aug 13, 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
27 changes: 27 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install obsidian-apo[docs]
- name: Sphinx build
run: |
sphinx-build docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
37 changes: 0 additions & 37 deletions .readthedocs.yaml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Modified
- Renamed aq_func hyperparmeter "Xi_f" to "inflate"
- Moved default aq_func choices for single/multi into aq_defaults of acquisition.config
- Fixed and improved campaign analysis methods

## [0.7.11]
### Added
Expand Down
17 changes: 10 additions & 7 deletions obsidian/plotting/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,16 @@ def surface_plot(optimizer: Optimizer,
if plot_data:
# Use a marker size which is larger if closer to the "other" values of the surface
# Smaller markers mean there are other variables pulling it away from the surface plot
X_t_train_ex = optimizer.X_t_train.copy().drop(columns=[X0_name, X1_name]).values
X_t_test_ex = optimizer.X_space.encode(X_test.copy().drop(columns=[X0_name, X1_name]).drop_duplicates()).values

if X_t_train_ex.shape[0] > 1:
X_t_dist = np.linalg.norm(X_t_train_ex-X_t_test_ex, ord=2, axis=1)
X_t_dist_scaled = (X_t_dist - X_t_dist.min())/(X_t_dist.max()-X_t_dist.min())
dist_scaled = 15-10*X_t_dist_scaled
if len(optimizer.X_space) != 2:
X_t_train_ex = optimizer.X_t_train.copy().drop(columns=[X0_name, X1_name]).values
X_t_test_ex = optimizer.X_space.encode(X_test.copy().drop(columns=[X0_name, X1_name]).drop_duplicates()).values

if X_t_train_ex.shape[0] > 1:
X_t_dist = np.linalg.norm(X_t_train_ex-X_t_test_ex, ord=2, axis=1)
X_t_dist_scaled = (X_t_dist - X_t_dist.min())/(X_t_dist.max()-X_t_dist.min())
dist_scaled = 15-10*X_t_dist_scaled
else:
dist_scaled = 10
else:
dist_scaled = 10

Expand Down
Loading