Skip to content

Commit

Permalink
Merge: Rework Mixture Examples (#394)
Browse files Browse the repository at this point in the history
- added example for traditional mixture
- reworked example for slot-based mixtures
- grouped both mixture examples under a new example category `Mixtures`
  • Loading branch information
Scienfitz authored Nov 11, 2024
2 parents 8c2b667 + 61cadb7 commit e2dd8b9
Show file tree
Hide file tree
Showing 6 changed files with 427 additions and 181 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- `allow_missing` and `allow_extra` keyword arguments to `Objective.transform`
- Example for a traditional mixture

### Changed
- Example for slot-based mixtures has been revised and grouped together with the new
traditional mixture example

### Deprecations
- Passing a dataframe via the `data` argument to `Objective.transform` is no longer
Expand Down
4 changes: 2 additions & 2 deletions docs/userguide/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Without this constraint, combinations like below would be possible:
| 3 | Octanol | Octanol | would be excluded |

The usage of `DiscreteNoLabelDuplicatesConstraint` is part of the
[example on mixtures](../../examples/Constraints_Discrete/mixture_constraints).
[example on slot-based mixtures](../../examples/Mixtures/slot_based).

### DiscreteLinkedParametersConstraint
The [`DiscreteLinkedParametersConstraint`](baybe.constraints.discrete.DiscreteLinkedParametersConstraint)
Expand Down Expand Up @@ -367,7 +367,7 @@ DiscretePermutationInvarianceConstraint(
```

The usage of `DiscretePermutationInvarianceConstraint` is also part of the
[example on mixtures](../../examples/Constraints_Discrete/mixture_constraints).
[example on slot-based mixtures](../../examples/Mixtures/slot_based).

### DiscreteCustomConstraint
With a [`DiscreteCustomConstraint`](baybe.constraints.discrete.DiscreteCustomConstraint)
Expand Down
179 changes: 0 additions & 179 deletions examples/Constraints_Discrete/mixture_constraints.py

This file was deleted.

4 changes: 4 additions & 0 deletions examples/Mixtures/Mixtures_Header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Mixtures

These examples demonstrate how to set up mixture use cases in the traditional as well
as in the slot-based representation.
Loading

0 comments on commit e2dd8b9

Please sign in to comment.