From 9e539ca14abe306740f670d3cdce88b2d2697ed8 Mon Sep 17 00:00:00 2001 From: Brendan Folie Date: Thu, 23 Apr 2020 15:20:19 -0700 Subject: [PATCH 1/4] Update expression predictor documentation --- docs/source/workflows/predictors.rst | 33 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/docs/source/workflows/predictors.rst b/docs/source/workflows/predictors.rst index 762764a14..b280c46bb 100644 --- a/docs/source/workflows/predictors.rst +++ b/docs/source/workflows/predictors.rst @@ -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 `_. - -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 `_. +Citrine-python currently supports the following operators and functions: +- basic operators: addition `+`, subtraction `-`, multiplication `*`, division `/`, power `^`, +- 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 From 7334a32ef48b28d3292c4fb3c4a392142af643ad Mon Sep 17 00:00:00 2001 From: Brendan Folie Date: Thu, 23 Apr 2020 15:20:31 -0700 Subject: [PATCH 2/4] Version bump --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5d7f238f5..c4f96cb5f 100644 --- a/setup.py +++ b/setup.py @@ -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', From 8af021341b9b28ee7e2a5d1114340f59cb96218f Mon Sep 17 00:00:00 2001 From: bfolie Date: Thu, 23 Apr 2020 19:50:18 -0400 Subject: [PATCH 3/4] Update docs/source/workflows/predictors.rst Co-Authored-By: Ken Kroenlein <51962276+kroenlein@users.noreply.github.com> --- docs/source/workflows/predictors.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/workflows/predictors.rst b/docs/source/workflows/predictors.rst index b280c46bb..f6cce15a0 100644 --- a/docs/source/workflows/predictors.rst +++ b/docs/source/workflows/predictors.rst @@ -106,10 +106,10 @@ The syntax is described in the `mXparser documentation Date: Thu, 23 Apr 2020 19:50:40 -0400 Subject: [PATCH 4/4] Update docs/source/workflows/predictors.rst Co-Authored-By: Ken Kroenlein <51962276+kroenlein@users.noreply.github.com> --- docs/source/workflows/predictors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/workflows/predictors.rst b/docs/source/workflows/predictors.rst index f6cce15a0..9fc5fc2c8 100644 --- a/docs/source/workflows/predictors.rst +++ b/docs/source/workflows/predictors.rst @@ -104,7 +104,7 @@ If an alias isn't defined, the expression argument is expected to match the desc The syntax is described in the `mXparser documentation `_. Citrine-python currently supports the following operators and functions: -- basic operators: addition `+`, subtraction `-`, multiplication `*`, division `/`, power `^`, +- basic operators: addition `+`, subtraction `-`, multiplication `*`, division `/`, exponentiation `^` - built-in math functions: - trigonometric: `sin`, `cos`, `tan`, `asin`, `acos`, `atan` - hyperbolic: `sinh`, `cosh`, `tanh`