Skip to content

Commit

Permalink
Merge pull request #629 from AutoResearch/doc/contributor-update-jgh
Browse files Browse the repository at this point in the history
Doc/contributor update jgh
  • Loading branch information
hollandjg authored Jun 12, 2024
2 parents 97318d6 + 3c65848 commit 84af832
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
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
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

0 comments on commit 84af832

Please sign in to comment.