In general terms, a **prediction function** is a mathematical function that tells you something about a future event, based on past events. There are many different kinds of functions that might be classified as prediction functions, including functions based on likelihood, sufficiency, and plausibility (Mathiasen, 1979). However, the term isn’t formally defined, so *any* function with some kind of predictive capabilities could fall into this umbrella term.

Prediction functions can also be found in various **software packages**; These are often used in data mining to return a prediction, based on a set of inputs or a statistical model. They are still mathematical functions, except these particular function are defined in very narrow ways. Exactly *what *is returned as a prediction depends on what software you’re using, and what type of model you’re basing those predictions on. For example, you can predict the lag of a time series model, or descriptions of decision tree models can return rules and node descriptions.

## Software Prediction Function Examples

**Oracle’s** prediction function returns the best prediction for models created by the DBMS_DATA_MINING package, or with the Oracle Data Mining Java API.

In ** R**, the prediction function creates prediction objects, transforming input data into a standardized format. Inputs can be vectors, matrices, lists, or data frames containing the predictions.

In **SQL**, you can add a prediction function to a query after you’ve selected a model. An SQL prediction function can also return related statistics, like the probability of the predicted value, or information used in generating the prediction. The function returns various types of values, including:

- The predictable attribute’s name and predicted value.
- Information about the predicted value’s statistical distribution,
- Variance of the distribution,
- Probability of an outcome,
- Maximum and minimum values,
- Values associated with a specified attribute node, or object.

Skicit Learn offers this caution when using prediction functions: Make sure you use a validation set. In other words, don’t use the same data to learn the function’s parameters and test it. While the function will perform perfectly, it may not generalize at all to unseen data.

## References

Cran R Project. (2015). Package ‘ROCR’. Retrieved January 29, 2019 from: https://cran.r-project.org/web/packages/ROCR/ROCR.pdf

Prediction. Retrieved January 29, 2020 from: https://www.rdocumentation.org/packages/ROCR/versions/1.0-7/topics/prediction

Apply Prediction Functions to a Model. https://docs.microsoft.com/en-us/analysis-services/data-mining/apply-prediction-functions-to-a-model

Mathiasen, P. (1978). Prediction Functions. Scand J Statist 6: 1-21.

Oracle. PREDICTION. Retrieved January 29, 2020 from: https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions120.htm#SQLRF06219

Scikit-Learn. 3.6. scikit-learn: machine learning in Python. Retrieved January 29, 2020 from: https://scipy-lectures.org/packages/scikit-learn/index.html

**CITE THIS AS:**

**Stephanie Glen**. "Prediction Function: Simple Definition, Examples" From

**StatisticsHowTo.com**: Elementary Statistics for the rest of us! https://www.statisticshowto.com/prediction-function/

**Need help with a homework or test question?** With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!

**Comments? Need to post a correction?** Please ** Contact Us**.