A user-friendly machine learning library with automated preprocessing, model selection, training, evaluation, and reinforcement learning capabilities
Project description
HumanML Library - User Guide
Overview
HumanML is a human-centered machine learning library designed to simplify the machine learning workflow while providing professional results. The library automates data preprocessing, model selection, training, evaluation, and reporting, making machine learning accessible to users of all skill levels.
Key Features
- Simplified Workflow: Complete machine learning pipeline in just a few lines of code
- Intelligent Adaptivity: Automatically adapts to your dataset characteristics
- Reinforcement Learning Optimization: Uses RL to find optimal hyperparameters
- Professional Reports: Generates comprehensive PDF reports
- Interactive Visualizations: Easily visualize model performance and insights
- Human-Centered Design: Clear, stepwise progress and intuitive interface
Installation
pip install humanml
Or install from the source:
pip install -e .
Quick Start
from humanml import HumanML
import pandas as pd
from sklearn.datasets import load_iris
# Load data
data = load_iris()
X = pd.DataFrame(data.data, columns=data.feature_names)
y = pd.Series(data.target)
# Initialize HumanML
model = HumanML()
# Fit model
model.fit(X, y)
# Make predictions
predictions = model.predict(X)
# Visualize results
model.plot()
Main Steps
HumanML follows a 5-step process:
- Data preprocessing and feature engineering
- Model selection and hyperparameter tuning
- Model training and evaluation
- Model explanation and visualization
- Report generation and model export
Key Methods
fit(X, y): Train models on your datapredict(X): Make predictions with the best modelpredict_proba(X): Get probability predictions (classification only)plot(): Visualize model performanceget_results(): Get detailed results dictionaryget_best_model(): Get the best model and its name
Configuration Options
When initializing HumanML, you can customize its behavior:
model = HumanML(
preference="speed", # Options: "accuracy", "speed", "interpretability", "balanced"
output_dir="humanml_output", # Directory for outputs
verbose=True, # Whether to print detailed information
random_state=42, # Random seed for reproducibility
n_jobs=-1, # Number of parallel jobs (-1 for all cores)
excluded_models=None, # List of models to exclude
included_models=None, # List of models to include (overrides excluded_models)
hyperparameter_tuning="auto", # Options: "auto", "grid", "random", "bayesian", "rl", "none"
cross_validation=5, # Number of cross-validation folds
test_size=0.2, # Proportion of data for testing
validation_size=0.1, # Proportion of training data for validation
auto_report=True, # Whether to automatically generate reports
report_formats=["pdf"] # Report formats to generate
)
Example: Classification
from humanml import HumanML
import pandas as pd
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
# Load data
data = load_breast_cancer()
X = pd.DataFrame(data.data, columns=data.feature_names)
y = pd.Series(data.target)
# Split data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Initialize HumanML
model = HumanML(preference="accuracy")
# Fit model
model.fit(X_train, y_train)
# Make predictions
predictions = model.predict(X_test)
# Evaluate model
from sklearn.metrics import accuracy_score
print(f"Accuracy: {accuracy_score(y_test, predictions)}")
# Visualize results
model.plot("confusion_matrix")
model.plot("roc_curve")
model.plot("feature_importance")
Changelog
Version 0.3.0
- Redesigned fit method to show only stepwise progress
- Integrated reinforcement learning for auto-parameter tuning
- Enhanced library adaptivity and smartness
- Changed report generation to PDF only
- Improved plot utilities for better visualization
- Added new plot() method for interactive visualization
Version 0.2.0
- Added support for more models
- Improved preprocessing capabilities
- Enhanced report generation
Version 0.1.0
- Initial release
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file humanml-0.3.1.tar.gz.
File metadata
- Download URL: humanml-0.3.1.tar.gz
- Upload date:
- Size: 50.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3584493ddb73af0d5b8bee085dfd3e319d013fba597dae7f805727885d0a3778
|
|
| MD5 |
02af988fc0921508ac0fc95d1b209a11
|
|
| BLAKE2b-256 |
8aed40d58db740e313ec791619a1d08ccaa9f8ad7e038a597eee627a7e6b2733
|
File details
Details for the file humanml-0.3.1-py3-none-any.whl.
File metadata
- Download URL: humanml-0.3.1-py3-none-any.whl
- Upload date:
- Size: 58.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6983f2d72b27c90b8b5e20c9d3133777d74d0e66bd08dca18d28ca029a42c61a
|
|
| MD5 |
a7c9276622dc360c18c8582c067bce9c
|
|
| BLAKE2b-256 |
904997ba6024807fd4f9d138e56e9b6a01169855f81cf797f4df7ca431f14613
|