There's something rather amusing about building a machine learning ensemble. We gather several algorithms, feed them the same features, ask them the same question and hope that, somehow, they will provide meaningfully different insights.
It's like assembling a panel of experts, giving everyone the same job description and wondering why the meeting could have been an email.
But what if each model could specialise in a different aspect of the problem?
That's the idea behind MPML (Multi-Perspective Machine Learning), a Python package I've developed for perspective-based ensemble learning and model interpretability.
One Dataset, Multiple Perspectives
Real-world problems are rarely one-dimensional.
Consider heart disease prediction. A dataset might contain demographic information, lifestyle habits and clinical measurements. Rather than requiring every classifier to consider every feature, MPML allows different models to specialise in different aspects of the problem.
Illustrative example of a multi-perspective ensemble for heart disease prediction.
Each perspective can have its own:
- Machine learning algorithm.
- Subset of features.
- Voting weight.
Features can even be shared across perspectives. There's no need to start a custody battle over a DataFrame column.
The objective is to encourage meaningful diversity among classifiers by exploiting the different characteristics of a problem.

Each perspective can have its own:
- Machine learning algorithm.
- Subset of features.
- Voting weight.
Features can even be shared across perspectives. There's no need to start a custody battle over a DataFrame column. The objective is to encourage meaningful diversity among classifiers by exploiting the different characteristics of a problem.
Six Ways to Make Your Models Agree (Sort Of)
The beauty is that you can experiment with these strategies while maintaining the same familiar fit() and predict() interface.
No need to rewrite half your code because you've suddenly developed an interest in stacking.
Getting Started
MPML is built around the familiar Python machine learning ecosystem: scikit-learn, pandas and NumPy.
Installation is straightforward:
pip install mpml_lib
Or, if you're using uv:
uv add mpml_lib
Once installed, defining perspectives and training an ensemble follows a familiar workflow.
perspectives = Perspectives(X_train) # Define the first perspective perspectives.add( DecisionTreeClassifier(), ["age", "sex"], weight=1 ) # Define the second perspective perspectives.add( RandomForestClassifier(), ["cholesterol", "blood_pressure"], weight=2 ) # Create and train the ensemble ensemble = MPML( perspectives=perspectives, combination_method="stacking", meta_model=LogisticRegression() ) ensemble.fit(X_train, y_train) predictions = ensemble.predict(X_test)
That's it. Two classifiers examining different aspects of the same problem, with a meta-model learning how to combine their predictions.
Because "The Model Said So" Is Not an Explanation
Making accurate predictions is great. Understanding what influenced those predictions is considerably better.
MPML includes an interpretability framework that allows developers to investigate the impact of individual features and entire perspectives.
It supports three feature-impact analysis methods:
- Ablation: Replace a feature with a baseline value and examine the resulting score change.
- Background ablation: Replace a feature with sampled values from the training dataset to estimate its average impact.
- Retraining: Remove a feature, retrain the affected model and compare the results.
You can also examine the impact of an entire perspective, either for an individual prediction or across an evaluation dataset.
ensemble.set_evaluation_data(X_test, y_test) impact = ensemble.get_global_impact( model_name="model2" )
This allows us to ask not only which feature influenced a prediction? but also which perspective influenced it?
Of course, these scores measure changes in model outputs, not causality. We haven't given Python the power of divine revelation just yet.
From Research Paper to Python Package
MPML isn't simply another wrapper around scikit-learn. It is the practical implementation of a research journey that began with cybersecurity and multi-faceted learning problems and later extended into interpretable heart disease prediction.
The underlying approach is documented in two research publications:
- Multi-Perspective Machine Learning: A Machine Learning Model for Multi-Faceted Learning Problems (2017)
- MPML: A High-Performance and Interpretable Ensemble Method for Heart Disease Prediction (2026)
The package brings these ideas into an accessible framework for developers, researchers and students interested in ensemble classification, feature engineering and model interpretability.
Give Your Models Some Perspective
Sometimes, improving a machine learning system isn't about adding more features, finding a more complicated algorithm or purchasing a GPU that costs more than your car.
Sometimes, it's about recognising that different aspects of a problem deserve different approaches.
Not every model needs to know everything. It just needs to know its part well.
MPML is available under the MIT licence. Install it, experiment with it and see what a different perspective can do for your machine learning projects.
- Python package: MPML on PyPI
- Developer: Sean T. Miller, PhD
Tags: Python, MPML, Machine Learning, Ensemble Learning, Explainable AI, Feature Engineering, Scikit-learn, Open Source.

Discussion · 0
Comments are closed for this article.