ipex-llm
ipex-llm copied to clipboard
Chronos: Make `test_tsdataset.is_predict` more friendly
Description
Before that, since the horizon is not 0, the length of the predicted data will be less than the actual demand data.
Now if is_predict
set to True, then horizon will be set to 0, which avoids the prediction data being split.
Usage
test = TSDataset.from_pandas(...)
test.is_predict = True
yhat = forecaster.predict(test)
Should we use a setter for this member? since we want to use it as a external API
Should we use a setter for this member? since we want to use it as a external API
Like this?
yhat = forecaster.predict(test, is_predict=True)
It looks a little weird, but it's friendly to use.
Should we use a setter for this member? since we want to use it as a external API
Like this?
yhat = forecaster.predict(test, is_predict=True)
It looks a little weird, but it's friendly to use.
no I mean make this member a https://docs.python.org/3/library/functions.html#property .
We may try some thing new in this PR, since we might have such syntax supported more and more in future.
Diff:
- Removed redundant parameters(is_predict)
- Some changes based on property(experiment)
- Descriptor applied(experiment)