You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now each Content model is assumed to be in the same order as the given input variables, but in some cases an input variable might not be used, or have a different order.
I would propose to add an input(s) attribute to Binning, MultiBinning and Category, e.g.
class Binning(Model):
nodetype: Literal["binning"]
edges: List[float]
"Edges of the binning, where edges[i] <= x < edges[i+1] => f(x, ...) = content[i](...)"
content: List[Content]
input: str
class MultiBinning(Model):
"""N-dimensional rectangular binning"""
nodetype: Literal["multibinning"]
edges: List[List[float]]
"Bin edges for each input"
content: List[Content]
inputs: List[str]
class Category(Model):
nodetype: Literal["category"]
keys: List[Union[str,int]]
content: List[Content]
input: str
such that the evaluator or a human reader knowns which Content block belongs to which input variable, no matter the order.
I was initially worried because I expected to pop input arguments in the evaluator as it descends the tree. But instead I decided to pass the whole set of inputs all the way through the tree (since Formula leaf nodes may need an arbitrary input)
So this should be simple. In fact, the Formula node can probably use names instead of indices as well, resolving them in instantiation in the evaluator for speed.
Right now each
Content
model is assumed to be in the same order as the given input variables, but in some cases an input variable might not be used, or have a different order.I would propose to add an
input(s)
attribute toBinning
,MultiBinning
andCategory
, e.g.such that the evaluator or a human reader knowns which
Content
block belongs to which input variable, no matter the order.JSON files would for example look like
The text was updated successfully, but these errors were encountered: