mnplib is a highly efficient open source library for machine learning based on Python and built on top of scikit-learn. The library is based on the minimum nescience principle, a novel mathematical theory that measures how well we understand a problem given a representation and a description. In case of machine learning, representations are based on datasets, and descriptions are based on mathematical models.
The minimum nescience principle allow us to automate the common tasks performed by data scientists, from feature selection, model selection, or hyperparameters optimization.
mnplib can dramatically increase the productivity of the data scientist, reducing the time to analyze and model a dataset. With mnplib we can have results in very short time, without decreasing the accuracy (in fact, we usually have a better accuracy). mnplib is fast because:
- It does not requires cross-validation
- It use a greedy search for hyperparameters
- It is not based on ensembles of models
The mnplib library is composed of the following classes:
Miscodingmeasures the quality of the dataset we are using to represent our problem.Inaccuracymeasures the error made by the model we have trained.Surfeitmeasures how (unnecessarily) complex is the model we have identified.
All these metrics are combined into a single quantity, called Nescience, as a measure of how well we understand our problem given a dataset and a model. Nescience allow us to evaluate and compare models from different model families.
The mnplib library also contains the following utilities:
Anomaliesfor the identification and classification of anomalies.Causalfor root-cause analysis.
Besides to these classes, the mnplib library provide the following automated machine-learning tools:
Regressionfor automated regression problems.Classificationfor automated classification problems.TimeSeriesfor time series based analysis and forecasting.
The mnplib library can be installed using the standard pip installer:
pip install mnplibThe following code constains a simple example of how to use the auto-classifer module of the library:
from sklearn.datasets import load_breast_cancer
from mnplib.classifier import Classifier
X, y = load_breast_cancer(return_X_y=True)
model = Classifier()
model.fit(X, y)
model.score(X, y)This user guide contains the following sections: