AntonAntonov/MonadicContextualClassification

A monad for machine learning classification workflows

Paclet Manifest

Web ContentResourceCreateNotebook

Headline ImageResourceCreateNotebook

Basic DescriptionResourceCreateNotebook

A software monad for Machine Learning (ML) classification workflows. Streamlined data onboarding. Both built-in and ensemble classifiers are supported. Receiver Operating Characteristic (ROC) functions can be specified, computed, and plotted. Other built-in classifier measurements and ML classification operations are implemented and supported.

DetailsResourceCreateNotebook

The monad facilitates the rapid specification of classification workflows.

A (short) workflow is: split the data, make a classifier, compute and show classifier measurements, show Receiver Operating Characteristic (ROC) plots.

If the given data is a dataset, then by default the last column is considered to have the class labels.

The splitting utilizes random sampling.

By default class-label stratification is used for the data splitting.

Both built-in classifiers and ensemble classifiers can be used in monads pipelines.

The computation of the (standard) built-in classifier measurements is supported.

Special monad functions are used for the ROC plots.

Primary ContextResourceCreateNotebook

AntonAntonov`MonadicContextualClassification`

Main Guide PageResourceCreateNotebook

ExamplesResourceCreateNotebook

Initialization for ExamplesResourceCreateNotebook

PacletDirectoryLoad[NotebookDirectory[]];

Needs["AntonAntonov`MonadicContextualClassification`"];

Basic Examples

Here is a dataset:

dsTitanic=ResourceFunction["ExampleDataset"][{"MachineLearning","Titanic"}];
dsTitanic[[100;;108;;2]]

Here is a classification pipeline:

clObj=
ClCon[dsTitanic,<||>]⟹
ClConSplitData[0.75]⟹
ClConEchoDataSummary⟹
ClConMakeClassifier["RandomForest"]⟹
ClConClassifierMeasurements[{"Accuracy","Precision","Recall"}]⟹
ClConEchoValue⟹
ClConROCPlot;

The ClCon object is summarized with MakeBoxes:

clObj

Scope

Context

The ClCon object is an association with the keys:

Keys[clObj⟹ClConTakeContext]

Confusion matrix

Here is the confusion matrix:

clObj⟹
ClConClassifierMeasurements["ConfusionMatrixPlot"]⟹
ClConTakeValue

Importance of variables

Here is an importance of variables computation:

clObj⟹
ClConAccuracyByVariableShuffling⟹
ClConEchoValue⟹
ClConEchoFunctionValue["normalized:",1-KeyDrop[#,None]/#[None]&];

Source & Additional Information

CreatorResourceCreateNotebook

Anton Antonov

Source Control RepositoryResourceCreateNotebook

https://github.com/antononcube/WL-MonadicContextualClassification-paclet

LicenseResourceCreateNotebook

KeywordsResourceCreateNotebook

ClCon

Classification

Classifier measurements

Machine Learning

Workflow

Data Science

ROC functions

ROC

CategoriesResourceCreateNotebook

Related Resource ObjectsResourceCreateNotebook

AntonAntonov/ClassifierEnsembles

AntonAntonov/DataReshapers

AntonAntonov/MonadMakers

AntonAntonov/SSparseMatrix

AntonAntonov/OutlierIdentifiers

AntonAntonov/ROCFunctions

AntonAntonov/VariableImportanceByClassifiers

Original Source References and AttributionsResourceCreateNotebook

A monad for classification workflows | Mathematica for prediction algorithms

LinksResourceCreateNotebook

MathematicaForPrediction/MonadicProgramming/MonadicContextualClassification.m at master · antononcube/MathematicaForPrediction · GitHub

CompatibilityResourceCreateNotebook

Wolfram Language VersionResourceCreateNotebook

13.0+

Operating SystemResourceCreateNotebook

EnvironmentsResourceCreateNotebook

Cloud SupportResourceCreateNotebook

Required FeaturesResourceCreateNotebook

DisclosuresResourceCreateNotebook

Author NotesResourceCreateNotebook

Additional information about limitations, issues, etc.