Skip to content
DeepBridge Logo

DeepBridge: Advanced Machine Learning Model Validation and Distillation

PyPI version Documentation Status PyPI Downloads

Why DeepBridge?

DeepBridge is a comprehensive Python library that revolutionizes machine learning model validation and distillation. Our key features include:

  • 🚀 Automated Model Validation: Streamline experiment tracking and model comparison
  • 🧠 Intelligent Model Distillation: Create lightweight, high-performance models
  • 📊 Advanced Metrics: In-depth performance analysis
  • 🔬 Flexible Experiment Management: Support for multiple model types and use cases

Key Differentiators

  • Seamless integration with scikit-learn
  • Support for complex model architectures
  • Automated hyperparameter optimization
  • Robust performance tracking

Installation

Install DeepBridge using pip:

pip install deepbridge

Quick Start

Model Validation

from deepbridge.model_validation import ModelValidation

# Create a new experiment
experiment = ModelValidation("my_experiment")

# Add training and test data
experiment.add_data(X_train, y_train, X_test, y_test)

# Add a model to the experiment
experiment.add_model(model, "model_v1")

# Save the model
experiment.save_model("model_v1")

Model Distillation

from deepbridge.model_distiller import ModelDistiller

# Create a distiller
distiller = ModelDistiller(model_type="gbm")

# Train the distilled model
distiller.fit(X=features, probas=predictions)

# Make predictions
new_predictions = distiller.predict(X_test)

Key Features

Model Validation

  • Experiment management and tracking
  • Model versioning and storage
  • Performance metrics calculation
  • Support for surrogate models

Model Distillation

  • Support for multiple model types:
  • Gradient Boosting (GBM)
  • XGBoost
  • Multi-layer Perceptron (MLP)
  • Automated model training
  • Comprehensive performance metrics
  • Easy model persistence

Command Line Interface

# Create a new experiment
deepbridge validation create my_experiment --path ./experiments

# Train a distilled model
deepbridge distill train gbm predictions.csv features.csv -s ./models

# Make predictions
deepbridge distill predict ./models/model.joblib new_data.csv -o predictions.csv

Next Steps

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

DeepBridge is released under the MIT License. See the License file for more details.

Support