Skip to content

Commit

Permalink
Feature/formula (#77)
Browse files Browse the repository at this point in the history
* initial working implementation of mean function with tests

* implemented polynomial mean function

* added finite difference tests to mean function unit tests

* made finite difference spacing a fixture

* changed fixed mean to use a function rather than lambda for derivative

* implemented mean function (note only unit tests assume zero mean, will write new ones during refactor of interface)

* fixed bugs in mean function implementation

* implemented additional mean function capabilities and wrote tests

* added docstrings to base mean function class

* documented mean sum class

* documented mean product class

* documented mean composite class

* documented fixed mean class

* added documentation and a few other checks to the fixed mean function implementations

* added documentation for coefficient class

* added documentation for polynomial mean class

* added module docstring and test for indexing error in composite mean

* added documentation page for mean function

* implemented power mean function

* fixed bugs in mean power and wrote unit tests

* basic working formula parser on linear terms

* wrote tokenizer function

* modified tokenizer to correct exponentiation and wrote expression parser

* removed unneeded function

* appear to have working formula parser

* fixed issue with square bracket parsing

* added class method and moved some things around

* added some unit tests for formula parsing

* implemented tests for tokenizing, parsing, and evaluating functions

* full set of unit tests for formulas and additional method in mean function to create from a formula

* changed base name and created functional interface for formula plus string methods

* added docstrings and renamed some functions

* added documentation for formulas and modified the mean function page a bit

* added patsy to install for testing and updated python version to 3.7

* updated version number for merge into devel
  • Loading branch information
edaub authored Mar 16, 2020
1 parent 3dfd5ed commit da05d92
Show file tree
Hide file tree
Showing 9 changed files with 1,168 additions and 105 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: python
python:
- "3.6"
- "3.7"
install:
- pip install -r requirements.txt
- pip install pytest-cov codecov
- pip install pytest-cov codecov patsy
- python setup.py install
script:
- pytest --cov=./
Expand Down
6 changes: 5 additions & 1 deletion docs/MeanFunction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ The ``MeanFunction`` Module
**********************************

.. automodule:: mogp_emulator.MeanFunction
:members: MeanFunction
:noindex:

.. autoclass:: mogp_emulator.MeanFunction.MeanFunction
.. autoclass:: mogp_emulator.MeanFunction.MeanBase
:members:

.. autoclass:: mogp_emulator.MeanFunction.MeanSum
Expand All @@ -16,6 +17,9 @@ The ``MeanFunction`` Module
.. autoclass:: mogp_emulator.MeanFunction.MeanProduct
:members:

.. autoclass:: mogp_emulator.MeanFunction.MeanPower
:members:

.. autoclass:: mogp_emulator.MeanFunction.MeanComposite
:members:

Expand Down
9 changes: 9 additions & 0 deletions docs/formula.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _formula:

**********************************
The ``formula`` Module
**********************************

.. automodule:: mogp_emulator.formula
:members:
:noindex:
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Welcome to Multi-Output GP Emulator's documentation!
DimensionReduction
MultiOutputGP
MeanFunction
formula
Kernel
ExperimentalDesign
SequentialDesign
Expand Down
394 changes: 299 additions & 95 deletions mogp_emulator/MeanFunction.py

Large diffs are not rendered by default.

Loading

0 comments on commit da05d92

Please sign in to comment.