Skip to main content

Library that easily allows to create machine learning progress for more unexperiencied programmers.

Project description

MLForAll: Easy ML projects from scratch

PyPI Latest Release Package Status License Code style: black

Description

mlforall is an open-source library aimed to developers that are beginners in the data analysis area but want to build powerful machine learning projects from the very beginning. The package offers a reliable, easy to use and well documented set of functions that drive the user through the most common steps of any machine learning projects, from data reading to model testing.

Main features

These are some of the functionalities that mlforall offers:

  1. File extension asbtraction when reading data (only supported for .csv, .txt, .xls, .xlsx, .parquet and .npy)
  2. Automatic handling of non-numeric features and missing values.
  3. A pool with almost all the data-scaling methods available and the most common ML models.
  4. Automatic model evaluation and reporting.

Usage options

The mlforall package can be used by command line interface or with Interactive Python Notebooks (.ipynb). An example of the first usage method is the following:

# MLForAll usage through command line
python -m mlforall --kwargs

With this option, the library will execute the full ML pipeline, from data reading to model testing. The available keyword arguments are:

  • --data_path: Mandatory. str.
    • The absolute or relative route to the data for which the ML pipelin wants to be built.
  • --target_var: Mandatory. str or int.
    • The name or the position of the target column in the original data.
  • --test_size: Optional. float
    • Proportion of the data that wants to be kept as test. The defualt is 0.2.
  • --cv: Optional. int
    • The number of k-folds that will be performed when evaluating the model. The deault is 5.
  • --path_to_save_metrics: Optional. str
    • The absolute or relative path to save the final metrics of the model. It must be a file with the .csv extension. If not provided, the metrics will be printed in the console but not saved.

As mentioned, usage from .ipynb files is also possible. As of version 0.1, the way to use this module from .ipynb files is by importing the submodules and using their methods separatedly. To import the different modules the following code snippet can be used:

# MLForAll usage through .ipynb files
from mlforall import DataReader
from mlforall import DataScaler
from mlforall import DataModeler


data_reader = DataReader.ReadData(*args, **kwargs)
data_scaler = DataScaler.ScaleData(*args, **kwargs)
data_modeler = DataModeler.ModelData(*args, **kwargs)
# or
import mlforall as ml

data_reader = ml.DataReader.ReadData(*args, **kwargs)
data_scaler = ml.DataScaler.ScaleData(*args, **kwargs)
data_modeler = ml.DataModeler.ModelData(*args, **kwargs)

Dependencies

Where to get it

The source code is currently hosted on GitHub at: https://github.com/UnaiTorrecilla/MLForAll

Binary installers for the latest released version are available at the Python Package Index (PyPI)

# PyPI
pip install mlforall

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

mlforall-0.4.tar.gz (10.5 kB view details)

Uploaded Source

File details

Details for the file mlforall-0.4.tar.gz.

File metadata

  • Download URL: mlforall-0.4.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for mlforall-0.4.tar.gz
Algorithm Hash digest
SHA256 95ef453b5b64ae9a213d606e86dce8012d30d7343280db4ea27a389ff9ce8d07
MD5 386e9eb4fbb9a66151702d64d755c78b
BLAKE2b-256 adac3671869889f9ba45e678ddab92ba027e0db952cb4431d8ed4757cd001d82

See more details on using hashes here.

Supported by

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