rheon.FormulaTarget¶
- class rheon.FormulaTarget[source]¶
Bases:
TypedDictA formula target, written as a table.
It is what an expression over the window operators that looks ahead becomes in a spec’s
targets, and a[[specs]]target table withnameandformulain the command line’s TOML.nameis the expression’s alias, which the output fields carry.formulais the expression’s compact tree (rheon.polars.ops), holding at least one window operator that looks ahead (reverse=True).Examples
ahead = rp.ewm_mean("y", half_life=5.0, window_size=10.0, reverse=True).alias("y_ahead") spec = rp.spec.ewridge("m", targets=[ahead], features=["x0"], half_life=50.0) print(list(spec["targets"][0]), spec["targets"][0]["name"]) # a FormulaTarget
['name', 'formula'] y_ahead