Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
ClassifierFunction
  • See Also
    • Classify
    • ClassifierMeasurements
    • Information
    • PredictorFunction
    • NearestFunction
    • DimensionReducerFunction
  • Related Guides
    • Built-in Classifiers
    • Supervised Machine Learning
    • Scientific Models
    • Nonparametric Statistical Distributions
    • See Also
      • Classify
      • ClassifierMeasurements
      • Information
      • PredictorFunction
      • NearestFunction
      • DimensionReducerFunction
    • Related Guides
      • Built-in Classifiers
      • Supervised Machine Learning
      • Scientific Models
      • Nonparametric Statistical Distributions

ClassifierFunction[…]

represents a function generated by Classify that classifies data into classes.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
ClassPriors  
IndeterminateThreshold  
RecalibrationFunction  
TargetDevice  
UtilityFunction  
See Also
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Classify
    • ClassifierMeasurements
    • Information
    • PredictorFunction
    • NearestFunction
    • DimensionReducerFunction
  • Related Guides
    • Built-in Classifiers
    • Supervised Machine Learning
    • Scientific Models
    • Nonparametric Statistical Distributions
    • See Also
      • Classify
      • ClassifierMeasurements
      • Information
      • PredictorFunction
      • NearestFunction
      • DimensionReducerFunction
    • Related Guides
      • Built-in Classifiers
      • Supervised Machine Learning
      • Scientific Models
      • Nonparametric Statistical Distributions

ClassifierFunction

ClassifierFunction[…]

represents a function generated by Classify that classifies data into classes.

Details and Options

  • ClassifierFunction works like Function.
  • ClassifierFunction[…][data] attempts to classify data, returning the class in which data is considered most likely to be.
  • ClassifierFunction[…][{data1,data2,…}] attempts to classify all the datai.
  • ClassifierFunction[…][data,prop] gives the specified property of the classification associated with data.
  • Possible properties applicable to all methods include:
  • "Decision"best class according to the probabilities and the utility function
    "TopProbabilities"probabilities for most likely classes
    "TopProbabilities"nprobabilities for the n most likely classes
    "Probability"classprobability for a specific class
    "Probabilities"association of probabilities for all possible classes
    "SHAPValues"Shapley additive feature explanations for each example
    "Properties"list of all properties available
  • "SHAPValues" assesses the contribution of features by comparing predictions with different sets of features removed and then synthesized. The option MissingValueSynthesis can be used to specify how the missing features are synthesized. SHAP explanations are given as odds ratio multipliers with respect to the class training prior. "SHAPValues"n can be used to control the number of samples used for the numeric estimations of SHAP explanations.
  • ClassifierFunction[…][data,…,opts] specifies that the classifier should use the options opts when applied to data.
  • Possible options are:
  • ClassPriors Automaticexplicit prior probabilities for classes
    IndeterminateThreshold Automaticbelow what probability to return Indeterminate
    MissingValueSynthesisAutomatichow to synthesize missing values
    PerformanceGoalAutomaticwhich aspect of performance to optimize
    TargetDevice "CPU"the target device on which to perform training
    RecalibrationFunction Automatichow to post-process class probabilities
    UtilityFunction Automaticutility expressed as a function of actual and predicted class
  • A ClassifierFunction[…] trained in an older version of the Wolfram Language will still work in the current version.
  • Classify[net] can be used to convert a NetChain or NetGraph representing a classifier into a ClassifierFunction[…].
  • Classify[ClassifierFunction[…],opts], can be used to update the values of PerformanceGoal, ClassPriors, IndeterminateThreshold, UtilityFunction or FeatureExtractor of the classifier.
  • In Classify[ClassifierFunction[…],FeatureExtractorfe], the FeatureExtractorFunction[…] fe will be prepended to the existing feature extractor.
  • Information[ClassifierFunction[…]] generates an information panel about the classifier and its estimated performances.
  • Information[ClassifierFunction[…],prop] can be used to obtain specific properties.
  • Information of a ClassifierFunction may include the following properties:
  • "Accuracy"estimated accuracy of the classifier
    "BatchEvaluationTime"marginal time to predict one example when a batch is given
    "Classes"list of classes that the classifier can return
    "ClassNumber"number of classes that the classifier can return
    "EvaluationTime"time needed to classify one example
    "ExampleNumber"number of training examples
    "FeatureTypes"feature types of the classfier input
    "FunctionMemory"memory needed to store the classifier
    "FunctionProperties"all classification properties available for this classifier
    "IndeterminateThreshold"value of IndeterminateThreshold used by the classifier
    "LearningCurve"performance as a function of the training set size
    "MaxTrainingMemory"maximum memory used during training
    "MeanCrossEntropy"estimated mean cross entropy of the classifier
    "Method"value of Method used by the classifier
    "MethodDescription"summary of the method
    "MethodOption"full method option to be reused in a new training
    "MethodParameters"parameter settings of the method
    "Properties"all information properties available for this classifier
    "FeatureExtractor"feature extractor as FeatureExtractorFunction
    "TrainingClassPriors"the distribution of classes seen during training
    "TrainingTime"time used by Classify to generate the classifier
    "UtilityFunction"value of UtilityFunction used by the classifier
  • Information properties also include all method suboptions.

Examples

open all close all

Basic Examples  (2)

Create a ClassifierFunction with Classify and a list of labeled examples:

Classify an unlabeled example with the ClassifierFunction:

Classify multiple examples:

Return the probabilities of the classes given the feature of an example:

Return the sorted probabilities of the most likely classes:

Return the probability of the most probable class:

Return the probability of a given class:

Plot the probability of class "B" as a function of the feature:

Generate a ClassifierFunction using multiple features:

Use the function on a new example:

Classify an example that has missing features:

Get the probabilities for the most probable classes:

Scope  (5)

Create a function classifying textual data:

Classify new examples:

Obtain information on the function:

Obtain the properties that can be used by this function:

Train a classifier function:

Generate a classifier measurements object of the function applied to a test set:

Get the accuracy from the function on the test set:

Visualize the confusion matrix:

Generate a classifier function whose input is an association:

Use the function on an example:

Classify examples containing missing features:

Train a classifier:

Store the ClassifierFunction[…] into a file using the "WMLF" format:

Load the classifier from the file using Import:

Use the loaded classifier on new data:

Train a classifier to predict a person's odds of surviving or dying in the Titanic crash:

Calculate the prior odds of a passenger dying:

Use the classifier to predict the odds of a person dying:

Get an explanation of how each feature multiplied the model's predicted odds of a class:

Compare the model's explanation of feature impact to the base rate odds:

Options  (6)

ClassPriors  (1)

Train a classifier on an imbalanced dataset:

The example 5False is classified as True:

Classify this example with a uniform prior over classes:

The class priors of a classifier can also be updated after training:

IndeterminateThreshold  (1)

Train a classifier:

Obtain class probabilities for an example:

The most probable class is chosen as the prediction:

No prediction is made if no class probabilities exceed a specified probability threshold:

Update the value of the threshold permanently:

RecalibrationFunction  (2)

Train a classifier function:

Compute the class probabilities of a new example:

Check if the model has been calibrated:

Temporarily set a recalibration function to apply to the probabilities:

Set a permanent recalibration function to apply to the probabilities:

Compute the class probabilities of a new example:

Remove the recalibration function from the classifier:

Load the Titanic dataset:

Create a nearest neighbors classifier with no calibration function:

The classifier is slightly overconfident:

Select the worst classification case in the test set:

Evaluate the estimated probabilities:

Use "temperature scaling" to reduce the classifier self-confidence:

TargetDevice  (1)

Train a classifier using a neural network:

Evaluate the resulting classifier on system's default GPU and look at its AbsoluteTiming:

Compare the previous timing with the one achieved by using the default CPU computation:

UtilityFunction  (1)

Train a classifier:

By default, the most probable class is predicted:

Specify a utility function that penalizes examples of class "yes" being misclassified as "no":

Update the value of the utility function permanently:

See Also

Classify  ClassifierMeasurements  Information  PredictorFunction  NearestFunction  DimensionReducerFunction

Related Guides

    ▪
  • Built-in Classifiers
  • ▪
  • Supervised Machine Learning
  • ▪
  • Scientific Models
  • ▪
  • Nonparametric Statistical Distributions

Related Links

  • An Elementary Introduction to the Wolfram Language : Machine Learning

History

Introduced in 2014 (10.0) | Updated in 2017 (11.1) ▪ 2018 (11.3) ▪ 2019 (12.0) ▪ 2021 (12.3)

Wolfram Research (2014), ClassifierFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ClassifierFunction.html (updated 2021).

Text

Wolfram Research (2014), ClassifierFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ClassifierFunction.html (updated 2021).

CMS

Wolfram Language. 2014. "ClassifierFunction." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ClassifierFunction.html.

APA

Wolfram Language. (2014). ClassifierFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ClassifierFunction.html

BibTeX

@misc{reference.wolfram_2025_classifierfunction, author="Wolfram Research", title="{ClassifierFunction}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ClassifierFunction.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_classifierfunction, organization={Wolfram Research}, title={ClassifierFunction}, year={2021}, url={https://reference.wolfram.com/language/ref/ClassifierFunction.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English