-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
222 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "3.11.0" | ||
__version__ = "3.11.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/citrine/informatics/predictors/attribute_accumulation_predictor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from typing import List | ||
|
||
from citrine._rest.resource import Resource | ||
from citrine._serialization import properties as _properties | ||
from citrine.informatics.descriptors import Descriptor | ||
from citrine.informatics.predictors import PredictorNode | ||
|
||
__all__ = ['AttributeAccumulationPredictor'] | ||
|
||
|
||
class AttributeAccumulationPredictor(Resource["AttributeAccumulationPredictor"], PredictorNode): | ||
"""A predictor that computes an output from an expression and set of bounded inputs. | ||
For a discussion of expression syntax and a list of allowed symbols, | ||
please see the :ref:`documentation<Attribute Accumulation>`. | ||
Parameters | ||
---------- | ||
name: str | ||
name of the configuration | ||
description: str | ||
the description of the predictor | ||
attributes: List[Descriptor] | ||
the attributes that are accumulated from ancestor nodes | ||
""" | ||
|
||
attributes = _properties.List(_properties.Object(Descriptor), 'attributes') | ||
sequential = _properties.Boolean('sequential') | ||
|
||
typ = _properties.String('type', default='AttributeAccumulation', deserializable=False) | ||
|
||
def __init__(self, | ||
name: str, | ||
*, | ||
description: str, | ||
attributes: List[Descriptor], | ||
sequential: bool): | ||
self.name: str = name | ||
self.description: str = description | ||
self.attributes: List[Descriptor] = attributes | ||
self.sequential: bool = sequential | ||
|
||
def __str__(self): | ||
return '<AttributeAccumulationPredictor {!r}>'.format(self.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters