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 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.12.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c689a10aef0b313ceeb4aae610514574dbd5edc19f95f89c02af70ee0bf5dca5 |
|
MD5 | bfcb098fa0a64a5f370987abf9db6f85 |
|
BLAKE2b-256 | 7ef7adb9ad2d2ff3e63c3760b6367074f660380743c2adc2ee1ad65d38c36792 |
Close
Hashes for mindfoundry.client.horizon-2.12.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44ecb8405b5d6e984a33260f6bd2015f08b185feb2f3327094a75da9a53a3f1b |
|
MD5 | 61b3b50b40085c4b4cea704ba9fb7edb |
|
BLAKE2b-256 | 3b10d37aa14e3dfb4b9b364cd5c3358c69a15c4e10e660b6551314160d37e294 |