Skip to content

Commit

Permalink
Merge pull request #17 from MSDLLCpapers/main
Browse files Browse the repository at this point in the history
Update branch with main
  • Loading branch information
kstone40 authored Aug 13, 2024
2 parents b631f72 + a993673 commit ac11cb0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 44 deletions.
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

0 comments on commit ac11cb0

Please sign in to comment.