Skip to main content

A package for automating machine learning tasks

Project description

Autopilotml

Automated machine learning library for analytics

Installation

  • pip install autopilotml

Usage

Load data

from autopilotml import load_data, load_database

# For csv files
df = load_data(path = "dataset/titanic_train.csv", csv=True, **kwargs)

# For excel notebook
df = load_data(path = "dataset/titanic_train.xlsx", excel=True, **kwargs)

# To Load data from Database

# This framework supports sqlite, 'mysql', 'postgres', 'MongoDB'
df = load_database(database_type='sqlite', sqlite_db_path = 'database.db', query='select * from employee_table')

Data Preprocessing

from autopilotml import preprocessing

# If changing any values in the dictionary, whole dictionary has to be provided.

df = preprocessing(dataframe=df, label_column='Survived',
                                missing={
                                    'type':'impute',
                                    'drop_columns': False, 
                                    'threshold': 0.25, 
                                    'strategy_numerical': 'knn',
                                    'strategy_categorical': 'most_frequent',
                                    'fill_value': None},
                                outlier={
                                    'method': 'None',
                                    'zscore_threshold': 3,
                                    'iqr_threshold': 1.5,
                                    'Lc': 0.05, 
                                    'Uc': 0.95,
                                    'cap': False})

Data Transformation

from autopilotml import transformation

# If the target_transform is true, then the function  return 3 objects, (e.g) dataframe, feature encoder and target encoder
# else it will return 2 objects dataframe and feature encoder
df, encoder = transformation(dataframe=df,
                                label_column='Survived', 
                                type = 'ordinal',
                                target_transform = False, 
                                cardinality = True, 
                                Cardinality_threshold = 0.3)

Scaling

# Here if target_scaling = True only applicable for regression then it will return 3 objects dataframe, feature scaler and target scaler

from autopilotml import scaling

df, scaler = scaling(df, label_column= 'Survived', type = 'standard', target_scaling = False)

Feature Selecction

from autopilotml import feature_selection

df, selector = feature_selection(dataframe=df, label_column='Survived', 
                                estimator='RandomForestClassifier',           
                                type='rfe', max_features=10, 
                                min_features=2, scoring= 'accuracy', 
                                cv=5)

Model Training

from autopilotml import training

model = training(dataframe=df, label_column='Survived', model_name='SVC', problem_type='Classification', 
                target_scaler=None, test_split =0.15, hypertune=True, n_epochs=100)

MLFlow - Track the Model Training and model Parameters

!mlflow ui

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

autopilotml-1.0.11.tar.gz (202.8 kB view details)

Uploaded Source

Built Distribution

autopilotml-1.0.11-py3-none-any.whl (208.2 kB view details)

Uploaded Python 3

File details

Details for the file autopilotml-1.0.11.tar.gz.

File metadata

  • Download URL: autopilotml-1.0.11.tar.gz
  • Upload date:
  • Size: 202.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for autopilotml-1.0.11.tar.gz
Algorithm Hash digest
SHA256 43a37eb574c5623bfe52e2f2f1609dc60f922b7c88d6f8cb5df197ed4813ec66
MD5 3c83d9779ed842d0b2d50abb9affa1eb
BLAKE2b-256 21290b01d3cf46c2f758ad006f61a79b54edf39cc2f1c9f63aa4075de36c2137

See more details on using hashes here.

File details

Details for the file autopilotml-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: autopilotml-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 208.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for autopilotml-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 35f4c6bd30bf3608bd15c7ec6e9503f48c985b0996773a51c046d67bc747e9ad
MD5 a971a355554e78ccf76fe02d5b9fff31
BLAKE2b-256 14ef167b0ebf89cbd089c4e11d84b99ab35eda69ebe1c3cc25ea3b53f5de0aab

See more details on using hashes here.

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