
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Decanter AI is a powerful AutoML tool which enables everyone to build ML models and make predictions without data science background. With Decanter AI SDK, you can integrate Decanter AI into your application more easily with Python.
Decanter AI is a powerful AutoML tool which enables everyone to build ML models and make predictions without data science background. With Decanter AI SDK, you can integrate Decanter AI into your application more easily with Python.
It supports actions such as data uploading, model training, and prediction to run in a more efficient way and access results more easily.
To know more about Decanter AI and how you can be benefited with AutoML, visit MoBagel website and contact us to try it out!
pip install decanter-ai-sdk
To use this sdk, you must first construct a client object.
from decanter_ai_sdk.client import Client
client = Client(
auth_key="auth_API_key",
project_id="project_id",
host="host_url",
)
After the client is constructed, now you can use it to upload your training and testing files in both csv and pandas dataframe. This function will return uploaded data id in Decanter server.
import os
sys.path.append("..")
current_path = os.path.dirname(os.path.abspath(__file__))
train_file_path = os.path.join(current_path, "ts_train.csv")
train_file = open(train_file_path, "rb")
train_id = client.upload(train_file, "train_file")
upload your pandas dataframe
import io
import pandas as pd
df_train = pd.read_csv("./yourpath/train.csv")
csv_file = io.BytesIO()
df_train.to_csv(csv_file, index=False)
csv_file.seek(0)
train_table_id = client.upload(csv_file, 'train_file')
To conduct an experiment, you need to first specify which type of data you are going to use , i.e., iid or ts, then you can input parameters by following our pyhint to customize your experiment. After the experiment, the function will return an object which you can get experiment attributes from it.
# Training iid data
experiment = client.train_iid(
experiment_name=exp_name,
experiment_table_id=train_id,
target="Survived",
evaluator=ClassificationMetric.AUC,
custom_column_types={
"Pclass": DataType.categorical,
"Parch": DataType.categorical,
},
)
# Training ts data
experiment = client.train_ts(
experiment_name=exp_name,
experiment_table_id=train_id,
target="Passengers",
datetime="Month",
time_groups=[],
timeunit=TimeUnit.month,
groupby_method="sum",
evaluator=RegressionMetric.MAPE,
custom_column_types={"Pclass": DataType.numerical},
)
To get its attributes, you can either extract them by simply using dot or its functions.
# Experiment object usage
best_model = experiment.get_best_model()
model_list = experiment.get_model_list()
best_auc_model = experiment.get_best_model_by_metric(ClassificationMetric.AUC)
Now you can use model data to run prediction.
# Predicting iid data
predict = client.predict_iid(
keep_columns=[],
non_negative=False,
test_table_id=test_id,
model=best_model
)
# Predicting ts data
predict = client.predict_ts(
keep_columns=[],
non_negative=False,
test_table_id=test_id,
model=best_model
)
To get prediction result, do
predict_data = predict.get_predict_df()
poetry install
#Project setup.poetry shell
#Start your project in poetry env. (Optional if you use Conda to manage virtual environment)Now you can create your own branch to start developing new feature.
To run test, do:
poe test
To run integration test, do:
Rename .env.example
as .env
Modify .env
file with correct configurations
run
poe test-e2e
To lint, do:
poe lint
To reformat, do:
poe format
#TODO
#TODO
#TODO
FAQs
Decanter AI is a powerful AutoML tool which enables everyone to build ML models and make predictions without data science background. With Decanter AI SDK, you can integrate Decanter AI into your application more easily with Python.
We found that decanter-ai-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.