Mind Foundry Horizon Client
Project description
Mind Foundry Horizon Client
This package contains a python client that can be used to interact with an instance of Mind Foundry Horizon. The client exposes a familiar interface that allows you to tackle forecasting problems with ease.
from mindfoundry.client.horizon.client import Connection
from mindfoundry.client.horizon.models import HorizonForecaster
# Generate an API key in the Horizon dashboard
connection = Connection(
base_url="your Horizon instance",
api_key="your api key",
)
# Create a new forecasting model. See the complete documentation
# for a more in-depth explanation of each argument.
model = HorizonForecaster(
connection=connection,
name="My Forecaster",
targets=["target1", "target2", ...],
horizons=[1, 2, 3],
refinement=False,
)
# Train a model on some training data (a pandas dataframe)
model.fit(training_data)
# Make a prediction on new data
prediction = model.predict(new_data)
print(prediction.as_df().head())
# Save the model for later use
model.save("/path/to/model/file")
# Re-load the model
model = HorizonForecaster.load("/path/to/model/file", connection=connection)
# The model can be updated with new data in the same format
model.update(new_data_2)
new_prediction = model.predict()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mindfoundry.client.horizon-2.13.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f499d1fec5c48ca5b85a22d40197953bb17c26a7c48413c2ecaaa5da6e4eb8 |
|
MD5 | 093583d599b39f757305d6c2b45616a3 |
|
BLAKE2b-256 | 2c2859d772ad183188b447161c2d865a28f2706117f007de45e5048f99ba7161 |
Close
Hashes for mindfoundry.client.horizon-2.13.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e24e28a5f9e3d65b7a2772c3f498d411111cd76fb0d048b9f3576c4a6656f191 |
|
MD5 | 7389e5ed04242ac16bbd33c56006935c |
|
BLAKE2b-256 | 0039429a5671665f036eaa319aa6b99cb8cf678cc19c32bcd48f0620db26b87a |