Welcome to the comprehensive guide for getting started with IntegratedML Flexible Model Integration! This guide will take you from installation through running your first machine learning models integrated directly into database workflows.
- System Requirements
- Installation & Setup
- Quick Verification
- Demo Portfolio Overview
- Using the Notebooks
- Demo Walkthroughs
- Common Issues & Troubleshooting
- Next Steps
- Python: 3.8 or higher
- Memory: 4GB RAM (8GB recommended for all demos)
- Storage: 2GB free space
- Operating System: Windows 10+, macOS 10.15+, or Linux (Ubuntu 18.04+)
- InterSystems IRIS: For full IntegratedML integration
- Jupyter: For interactive notebooks
- Git: For cloning and contributing
- Credit Risk: Scikit-learn, pandas, numpy
- Fraud Detection: XGBoost, scikit-learn (GPU optional)
- Sales Forecasting: Prophet, LightGBM (additional system dependencies)
The primary way to interact with the demos is through Jupyter Notebooks.
-
Launch Jupyter:
jupyter lab
or
jupyter notebook
-
Open the Quickstart Notebook:
-
Explore Domain-Specific Notebooks:
- demos/credit_risk/notebooks/01_Credit_Risk_Complete_Demo.ipynb
- demos/fraud_detection/notebooks/01_Fraud_Detection_Complete_Demo.ipynb
- demos/sales_forecasting/notebooks/01_Sales_Forecasting_Complete_Demo.ipynb
- demos/dna_similarity/notebooks/01_DNA_Similarity_Complete_Demo.ipynb
- demos/time_series_native/notebooks/01_Time_Series_Native_Complete_Demo.ipynb
The notebooks utilize shared modules for common tasks:
- Database Connection:
shared/database/connection.py - Data Loading:
shared/database/data_loader.py - Model Management:
shared/database/model_manager.py
# Clone the repository
git clone https://github.com/intersystems/integratedml-demos.git
cd integratedml-demos
# Create and activate virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install all dependencies
pip install -r requirements.txt
# Install the package in development mode
pip install -e .# Clone the repository
git clone https://github.com/intersystems/integratedml-demos.git
cd integratedml-demos
# Create conda environment
conda create -n integratedml-demos python=3.9
conda activate integratedml-demos
# Install dependencies
pip install -r requirements.txt
pip install -e .# Clone and run with Docker
git clone https://github.com/intersystems/integratedml-demos.git
cd integratedml-demos
# Build and run the development environment
docker-compose up -d
# Access Jupyter Lab at http://localhost:8888Let's verify your installation works correctly by running a simple test:
# Test basic installation
python -c "
import sys
print('✅ Python version:', sys.version)
try:
import pandas as pd
import numpy as np
import sklearn
print('✅ Core dependencies loaded successfully')
# Test our demo imports
from demos.credit_risk.models.credit_risk_classifier import CustomCreditRiskClassifier
print('✅ Demo models imported successfully')
print('\n🎉 Installation verified! Ready to run demos.')
except ImportError as e:
print('❌ Import error:', e)
print('💡 Try: pip install -r requirements.txt')
"Run the quick start example to ensure everything works:
# Run the quick start example
python examples/quick_start_example.pyExpected Output:
IntegratedML Flexible Model Integration Demo - Quick Start Examples
========================================================
DEMO 1: Credit Risk Assessment with Custom Feature Engineering
============================================================
Training data shape: (800, 15)
Test data shape: (200, 15)
...
Accuracy: 0.xxx
🎉 All demos completed successfully!
Our three progressive demos demonstrate different aspects of IntegratedML integration:
Perfect for: First-time users, understanding custom feature engineering
- Complexity: Beginner-friendly
- Time Commitment: 15-30 minutes
- Key Learning: Custom preprocessing within database context
- Business Value: Secure financial data processing
Perfect for: Understanding ensemble techniques and real-time processing
- Complexity: Intermediate
- Time Commitment: 30-45 minutes
- Key Learning: Ensemble orchestration, real-time constraints
- Business Value: 67ms latency, 95.4% accuracy validated
Perfect for: Advanced users, third-party library integration
- Complexity: Advanced
- Time Commitment: 45-60 minutes
- Key Learning: Prophet + LightGBM hybrid architecture
- Business Value: 20%+ forecasting improvement
cd demos/credit_risk# Create realistic credit risk dataset
python data/generate_sample_data.py# Launch interactive notebook
jupyter notebook notebooks/01_Credit_Risk_Complete_Demo.ipynb
# OR run the Python script directly
python -m demos.credit_risk.models.credit_risk_classifierThe demo showcases several custom feature engineering techniques:
- Debt-to-Income Ratios: Financial health indicators
- Credit Utilization Scores: Spending pattern analysis
- Risk Interaction Terms: Complex relationship modeling
- Domain-Specific Transformations: Financial industry best practices
-- Example SQL commands for IntegratedML
CREATE MODEL CreditRiskModel PREDICTING (default_risk)
FROM CreditApplications
USING CustomCreditRiskClassifier(
enable_debt_ratio=true,
enable_interaction_terms=true,
decision_threshold=0.6
);📖 Complete Credit Risk Tutorial →
cd demos/fraud_detection
# Install additional dependencies if needed
pip install xgboost# Create synthetic fraud transaction dataset
python data/generate_transaction_data.py# Verify latency requirements
python scripts/verify_latency_requirements.py
# Expected output:
# ✅ Average Latency: 67ms (Target: ≤100ms)
# ✅ P95 Latency: 89ms (Target: ≤150ms)
# ✅ Success Rate: 96.8% (Target: ≥90%)The fraud detection system combines:
- Rule-based Detector: Fast heuristics (~8ms)
- Anomaly Detection: IRIS Vector Search integration (~15ms)
- Neural Network: Pattern recognition (~12ms)
- Behavioral Analysis: Customer profiling (~9ms)
# Launch interactive demo
jupyter notebook notebooks/01_Fraud_Detection_Complete_Demo.ipynb
# Test ensemble performance
python -m pytest tests/test_performance.py -v📖 Complete Fraud Detection Tutorial →
cd demos/sales_forecasting
# Install Prophet and LightGBM
pip install prophet lightgbm
# Note: Prophet may require additional system dependencies
# See troubleshooting section if you encounter issues# Create multi-store retail sales dataset
python data/generate_sales_data.py# Launch forecasting notebook
jupyter notebook notebooks/01_Sales_Forecasting_Complete_Demo.ipynbThe sales forecasting system combines:
- Prophet Component: Trend and seasonality detection
- LightGBM Component: Feature-rich ML predictions
- Ensemble Strategy: Horizon-weighted combination
- Confidence Intervals: Business-ready uncertainty quantification
-- Example IntegratedML deployment
CREATE MODEL SalesForecastModel PREDICTING (monthly_sales)
FROM HistoricalSales
USING HybridForecastingModel(
trend_model='prophet',
ml_model='lightgbm',
forecast_horizon=12,
include_confidence_intervals=true
);📖 Complete Sales Forecasting Tutorial →
# Solution: Use fresh virtual environment
python -m venv fresh_env
source fresh_env/bin/activate # or fresh_env\Scripts\activate on Windows
pip install --upgrade pip
pip install -r requirements.txt# On macOS:
brew install cmake
pip install prophet
# On Ubuntu/Debian:
sudo apt-get install python3-dev python3-pip python3-venv
pip install prophet
# On Windows:
# Install Visual C++ Build Tools first, then:
pip install prophet# Use CPU version (recommended for most users):
pip install xgboost
# For GPU support (advanced users):
pip install xgboost[gpu]# Ensure package is installed in development mode:
pip install -e .
# Verify PYTHONPATH:
export PYTHONPATH="${PYTHONPATH}:$(pwd)"# Install Jupyter kernel for your environment:
python -m ipykernel install --user --name=integratedml-demos# Reduce dataset size for testing:
export DEMO_SAMPLE_SIZE=1000
# Or increase system memory allocation- Check system resources (CPU/Memory usage)
- Verify no other intensive processes running
- Consider reducing ensemble complexity for testing
- Reduce forecast horizon for testing
- Use smaller dataset for initial exploration
- Check Prophet installation (C++ dependencies)
- Verify IntegratedML is properly installed
- Check model class imports and paths
- Ensure database connectivity and permissions
- Explore Custom Features: Study the feature engineering in Demo 1
- Build Your Own Model: Follow Tutorial 4: Custom Models
- Performance Optimization: Review Architecture Documentation
- Production Deployment: Review Deployment Guide
- Integration Patterns: Study Architecture Overview
- API Reference: Explore API Documentation
- Performance Analysis: Deep dive into Performance Benchmarks
- Model Comparison: Run all three demos and compare approaches
- Custom Algorithms: Adapt the frameworks for your specific use cases
- Development Setup: Follow the contributor setup in main README
- Contributing Guidelines: Review CONTRIBUTING.md
- Issue Reporting: Use GitHub Issues for bugs and feature requests
- 📖 Documentation: Complete reference in
docs/directory - 🐛 Issues: GitHub Issues
- 💬 Community: InterSystems Developer Community
- ✉️ Email: support@intersystems.com
🎉 You're all set! Choose your starting demo based on your experience level and dive into the world of IntegratedML Flexible Model Integration. Happy coding! 🚀