Skip to content

MLFCrafter

๐Ÿš€ ML Pipeline Automation Tool

Build, train, and deploy machine learning models with minimal code through chainable "crafter" components.


What is MLFCrafter?

MLFCrafter is a powerful Python Tool that simplifies machine learning pipeline creation through a modular, chainable architecture. Instead of writing repetitive boilerplate code, you can compose sophisticated ML workflows by connecting specialized "crafters" together.

from mlfcrafter import MLFChain, DataIngestCrafter, CleanerCrafter, ModelCrafter

# Create a complete ML pipeline in 4 lines
chain = MLFChain(
    DataIngestCrafter(data_path="data.csv"),
    CleanerCrafter(strategy="auto"),
    ModelCrafter(model_name="random_forest")
)

results = chain.run(target_column="target")
print(f"Model accuracy: {results['test_score']:.4f}")

โœจ Key Features

๐Ÿ”— Chainable Architecture

Connect multiple processing steps seamlessly with intelligent data flow between components.

๐Ÿง  Smart Data Handling

  • Auto-detection: CSV, Excel, JSON formats automatically detected
  • Intelligent cleaning: Multiple strategies for missing values
  • Flexible scaling: MinMax, Standard, Robust scaling options

๐Ÿค– Multiple ML Models

  • Random Forest: Ensemble method for robust predictions
  • XGBoost: Gradient boosting for high performance
  • Logistic Regression: Linear models for interpretability

๐Ÿ“Š Comprehensive Metrics

Track model performance with accuracy, precision, recall, and F1-score automatically.

๐Ÿš€ Easy Deployment

One-click model saving with metadata, scalers, and complete reproducibility.

๐Ÿ” Professional Logging

Detailed pipeline tracking with configurable log levels for debugging and monitoring.


๐Ÿ—๏ธ Architecture Overview

MLFCrafter uses a context-based pipeline architecture where each crafter:

  1. Receives a context dictionary with data and metadata
  2. Processes the data according to its specialization
  3. Returns an updated context for the next crafter
๐Ÿ“Š DataIngestCrafter โ†’ ๐Ÿงน CleanerCrafter โ†’ CategoricalCrafter  โ†’ โš–๏ธ ScalerCrafter โ†’ ๐Ÿค– ModelCrafter โ†’ ๐Ÿ“Š ScorerCrafter โ†’ ๐Ÿš€ DeployCrafter

Pipeline Flow: 1. DataIngestCrafter: Load data from CSV/Excel/JSON files 2. CleanerCrafter: Handle missing values with various strategies
3. CategoricalCrafter: Converts categorical variables into numerical data. 4. ScalerCrafter: Normalize numerical features (MinMax/Standard/Robust) 5. ModelCrafter: Train ML models (Random Forest, XGBoost, Logistic Regression) 6. ScorerCrafter: Calculate performance metrics (Accuracy, Precision, Recall, F1) 7. DeployCrafter: Save trained models with metadata for deployment

๐Ÿ› ๏ธ Available Crafters

Crafter Purpose Key Features
DataIngestCrafter Data loading CSV, Excel, JSON with auto-detection
CleanerCrafter Data cleaning Multiple missing value strategies
CategoricalCrafter Feature encoding One-Hot Encoding, Label Encoding
ScalerCrafter Feature scaling MinMax, Standard, Robust scalers
ModelCrafter Model training RF, XGBoost, LogReg with hyperparameters
ScorerCrafter Performance metrics Accuracy, Precision, Recall, F1
DeployCrafter Model deployment Joblib/Pickle with metadata

๐Ÿš€ Quick Start

Installation

pip install mlfcrafter

Your First Pipeline

from mlfcrafter import *
import pandas as pd

# Load your data
chain = MLFChain(
    DataIngestCrafter(data_path="your_data.csv"),
    CleanerCrafter(strategy="mean"),           # Handle missing values
    CategoricalCrafter(encoder_type="onehot"), # Convert categorical values to numerical
    ScalerCrafter(scaler_type="standard"),     # Normalize features  
    ModelCrafter(model_name="random_forest"),  # Train model
    ScorerCrafter(),                          # Calculate metrics
    DeployCrafter(model_path="my_model.joblib") # Save model
)

# Run the entire pipeline
results = chain.run(target_column="your_target_column")

# Check results
print(f"๐ŸŽฏ Test Accuracy: {results['test_score']:.4f}")
print(f"๐Ÿ“Š All Metrics: {results['scores']}")
print(f"๐Ÿ’พ Model Saved: {results['deployment_successful']}")

๐Ÿ“š Learn More

  • ๐Ÿš€ Getting Started


    New to MLFCrafter? Start here with installation and your first pipeline.

    โ†’ Getting Started

  • ๐Ÿ“š User Guide


    Learn pipeline basics, data processing, and advanced features.

    โ†’ User Guide

  • ๐Ÿ”ง API Reference


    Complete documentation of all crafters, parameters, and methods.

    โ†’ API Reference

  • ๐Ÿ’ก Examples


    Real-world examples from basic usage to production deployments.

    โ†’ Examples


๐ŸŽฏ Why Choose MLFCrafter?

Production Ready

MLFCrafter is built with production in mind - comprehensive logging, error handling, and testing ensure reliability.

Developer Friendly

Intuitive API design with clear documentation and helpful error messages make development fast and enjoyable.

Extensible

Create custom crafters easily by following the simple interface pattern.

Well Tested

23 comprehensive tests ensure quality and reliability across all components.


๐Ÿค Community & Support


Ready to build your first ML pipeline?

Get Started API Reference