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

Doc/contributor update jgh #629

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 5 additions & 3 deletions docs/contribute/modules/experimentalist.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ a `pandas` data frame, `numpy` array, iterator variable or other data format.
We generally **recommend using pandas data frames as outputs** in which
columns correspond to the independent variables of an experiment.

Once you've created your repository, you can implement your experimentalist by editing the `init.py` file in
Once you've created your repository, you can implement your experimentalist by editing the
`__init__.py` file in
``src/autora/experimentalist/name_of_your_experimentalist/``.
You may also add additional files to this directory if needed.
It is important that the `init.py` file contains a function called `name_of_your_experimentalist`
It is important that the `__init__.py` file contains a function called
`name_of_your_experimentalist`
which returns a set of experimental conditions (e.g., as a numpy array).

The following example ``init.py`` illustrates the implementation of a simple experimentalist
The following example ``__init__.py`` illustrates the implementation of a simple experimentalist
that uniformly samples without replacement from a pool of candidate conditions.

```python
Expand Down
3 changes: 2 additions & 1 deletion docs/contribute/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ After setting up your repository and linking it to your GitHub account, you can

### Implement Your Code

You may implement your code in the ``init.py`` located in the respective feature folder in ``src/autora``.
You may implement your code in the ``__init__.py`` located in the respective feature folder in
``src/autora``.

Please refer to the following guides on implementing
* [theorists](theorist.md)
Expand Down
12 changes: 8 additions & 4 deletions docs/contribute/modules/theorist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

AutoRA theorists are meant to return scientific models describing the relationship between experimental conditions
and observations. Such models may take the form of a simple linear regression, non-linear equations, causal graphs,
a more complex neural network, or other models which
a more complex neural network, or other models which

- can be identified based on data (and prior knowledge)
- can be used to make novel predictions about observations given experimental conditions.

Expand All @@ -26,16 +27,19 @@ Make sure to select the `theorist` option when prompted. You can skip all other

## Implementation

Once you've created your repository, you can implement your theorist by editing the `init.py` file in
Once you've created your repository, you can implement your theorist by editing the `__init__.py`
file in
``src/autora/theorist/name_of_your_theorist/``. You may also add additional files to this directory if needed.
It is important that the `init.py` file contains a class called `NameOfYourTheorist` which inherits from
It is important that the `__init__.py` file contains a class called `NameOfYourTheorist` which
inherits from
`sklearn.base.BaseEstimator` and implements the following methods:

- `fit(self, conditions, observations)`
- `predict(self, conditions)`

See the [sklearn documentation](https://scikit-learn.org/stable/developers/develop.html) for more information on
how to implement the methods. The following example ``init.py`` illustrates the implementation of a simple theorist
how to implement the methods. The following example ``__init__.py`` illustrates the implementation
of a simple theorist
that fits a polynomial function to the data:

```python
Expand Down
Loading