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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ec801e5bc66860d93745e8fed466bfae0f4d894703ada15f8c1bab0a732a49e |
|
MD5 | 18441c55ceea1001d002f2f80dd79b93 |
|
BLAKE2b-256 | ee739f517d358ab48ce45d95b97d4f09084f35a03484b1308d63e0142cc99ec6 |
Close
Hashes for mindfoundry.client.horizon-2.12.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0267bac8b063d3a4e2b30d3a37f3d4c1370249dda3ff6574e84be29393c19511 |
|
MD5 | a295f4bf886393095a6208a62c49dd32 |
|
BLAKE2b-256 | da41b48b955d2962572b9db7a7826ff1f4165b753f14fec3383b9e3e1dbc7d8e |