Skip to main content

A restful client library, designed to access predictnow restful api.

Project description

Usage:

from pnow.pdapi import PredictNowClient

Setup client along with its api key

api_key = "<YOUR_API_KEY>" client = PredictNowClient(api_key)

Train demo

train_input_path = 'C:/Users/devstack/Documents/example_input_train.csv' train_params = { "username": "welly", "email": "welly@predictnow.ai", "label": "futreturn", "timeseries": "yes", "type": "classification", "feature_selection": "shap", "analysis": "small", "boost": "gbdt", "mode": "train", "testsize": "0.2", "weights": "no", "prob_calib": "no", "suffix": "myfirstsuffix", "eda": "no", }

response = client.train(train_input_path, train_params) print(response)

Predict demo

live_input_path = 'C:/Users/devstack/Documents/example_input_live.csv' username = train_params["username"] suffix = train_params["suffix"] path = "../" + train_params["username"] predict_params = { "username": username, "model_name": "saved_model_" + suffix + ".pkl", # TODO proper model name "eda": "no", } response = client.predict(live_input_path, params=predict_params) print(response)

Save Result demo

response = client.save_to_output({"username": "welly", "output": "C:/Users/devstack/Documents"}) print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pnow_client-0.1.2.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

pnow_client-0.1.2-py3-none-any.whl (9.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page