Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
33 changes: 20 additions & 13 deletions docs/source/workflows/predictors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,26 @@ The following example demonstrates how to use the python SDK to create a :class:
Expression predictor
--------------------

The :class:`~citrine.informatics.predictors.ExpressionPredictor` defines an analytic (lossless) model that computes
one real-valued output descriptor from one or more input descriptors. An ExpressionPredictor should be used when the
relationship between inputs and outputs is known.

Note, a string is used to define the expression, and the corresponding output is defined by a RealDescriptor.
The aliases parameter defines a mapping from expression argument to descriptor key. Expression arguments with spaces
are not supported, so an alias is created for each input. Aliases are not required for inputs that do not contain
spaces (but may be useful to avoid typing out the verbose descriptors in the expression string). If an alias isn't
defined, the expression argument is expected to match the descriptor key exactly.

For a full list of supported syntax see the `mXparser documentation <http://mathparser.org/mxparser-math-collection>`_.

The following example demonstrates how to use the python SDK to create a :class:`~citrine.informatics.predictors.ExpressionPredictor`.
The :class:`~citrine.informatics.predictors.ExpressionPredictor` defines an analytic (lossless) model that computes one real-valued output descriptor from one or more input descriptors.
An ExpressionPredictor should be used when the relationship between inputs and outputs is known.

A string is used to define the expression, and the corresponding output is defined by a :class:`~citrine.informatics.descriptors.RealDescriptor`.
The ``aliases`` parameter defines a mapping from expression arguments to descriptor keys.
Expression arguments with spaces are not supported, so an alias must be created for each input that has a space in its name.
Aliases are not required for inputs that do not contain spaces, but may be useful to avoid typing out the verbose descriptors in the expression string.
If an alias isn't defined, the expression argument is expected to match the descriptor key exactly.

The syntax is described in the `mXparser documentation <http://mathparser.org/mxparser-math-collection>`_.
Citrine-python currently supports the following operators and functions:
- basic operators: addition `+`, subtraction `-`, multiplication `*`, division `/`, exponentiation `^`
- built-in math functions:
- trigonometric: `sin`, `cos`, `tan`, `asin`, `acos`, `atan`
- hyperbolic: `sinh`, `cosh`, `tanh`
- logarithm: `log10`, `ln`
- exponential: `exp`
- constants: `pi`, `e`

The following example demonstrates how to create an :class:`~citrine.informatics.predictors.ExpressionPredictor`.

.. code:: python

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def run(self):


setup(name='citrine',
version='0.17.1',
version='0.17.2',
url='http://github.com/CitrineInformatics/citrine-python',
description='Python library for the Citrine Platform',
author='Andrew Millspaugh',
Expand Down