VisiML is an interactive educational tool designed to help students and practitioners understand machine learning algorithms through real-time visualization. Watch how algorithms learn, adjust hyperparameters on the fly, and see the immediate impact on model performance.
- Linear Regression - Multiple optimizers (SGD, Adam, RMSprop), regularization options
- Polynomial Regression - Automatic feature engineering with degree control
- Logistic Regression - Binary and multi-class support
- Naive Bayes - Gaussian, Multinomial, and Bernoulli variants
- Decision Tree - Visual tree structure, feature importance
- Random Forest - Ensemble visualization, OOB score tracking
- Support Vector Machine - Kernel methods, margin visualization
- K-Nearest Neighbors - Distance metrics, Voronoi regions
- 🎯 Real-time Training Visualization - Watch models learn iteration by iteration
- 🎛️ Interactive Hyperparameter Tuning - Adjust parameters and see immediate effects
- 📊 Comprehensive Metrics - Loss curves, accuracy, confusion matrices, ROC curves
- 🎨 Decision Boundary Visualization - See how models separate classes
- 📈 Performance Analysis - Learning curves, residual plots, feature importance
- 💾 Export Capabilities - Save models, plots, and generate code
- 🎲 Built-in Data Generation - Various patterns for testing (linear, spiral, moons, etc.)
- Clone the repository:
git clone https://github.com/your-username/VisiML.git
cd VisiML- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtstreamlit run app.pyThen open your browser to http://localhost:8501
python visiml_standalone.py- Select Task Type: Choose between Regression or Classification
- Choose Algorithm: Pick from available algorithms for your task
- Configure Data:
- Use built-in data generators with various patterns
- Or upload your own CSV file
- Adjust Hyperparameters: Use intuitive sliders and controls
- Train & Visualize: Watch the model learn in real-time
- Analyze Results: Explore metrics, visualizations, and insights
from visiml.models import LinearRegression
from visiml.data_generator import DataGenerator
from visiml.visualization import plot_regression_predictions
# Generate sample data
X, y = DataGenerator.generate_regression_data(
n_samples=100,
function_type='polynomial',
noise=0.1
)
# Create and train model
model = LinearRegression(learning_rate=0.01, n_iterations=1000)
model.fit(X, y)
# Visualize results
plot_regression_predictions(X, y, model)VisiML/
├── app.py # Streamlit web application
├── visiml_standalone.py # Matplotlib standalone version
├── visiml/
│ ├── __init__.py
│ ├── models.py # ML model implementations
│ ├── data_generator.py # Data generation utilities
│ ├── visualization.py # Visualization functions
│ └── utils.py # Helper functions
├── examples/
│ ├── linear_regression.ipynb
│ ├── classification_demo.ipynb
│ └── custom_data_example.ipynb
├── docs/
│ ├── user_guide.md
│ ├── api_reference.md
│ └── images/
├── tests/
│ ├── test_models.py
│ ├── test_visualization.py
│ └── test_data_generator.py
├── requirements.txt
├── setup.py
├── LICENSE
└── README.md
VisiML is perfect for:
- Machine Learning Courses - Interactive demonstrations in lectures
- Self-Study - Hands-on learning of ML concepts
- Algorithm Comparison - Side-by-side algorithm performance
- Hyperparameter Understanding - See effects of different parameters
- Debugging Models - Visualize what's happening inside algorithms
Support for CSV files with automatic feature and target detection.
- Save trained models as pickle files
- Export training history and metrics
- Generate Python code for reproduction
- 2D and 3D plotting capabilities
- Animation of training progress
- Interactive plots with hover information
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for better ML education tools
- Built with Streamlit, Matplotlib, and scikit-learn
- Thanks to all contributors and users
- Add deep learning models (Neural Networks)
- Support for clustering algorithms
- Time series visualization
- Model comparison dashboard
- Export to TensorBoard
- Mobile-responsive design
Made with ❤️ for ML Education
