Among the vast possibilities of classifying machine learning models, there exists the divide between parametric and non-parametric models.
Before we can delve into this divide, we must understand what unites all of these models. At their core, every machine learning model attempts to compute a function, f, that is going to take the inputs
Contained within the function
Parametric models are those models that are able to figure out the aforementioned function
In order to make this happen, parametric models attempt to find a mathematical model that can be used to approximate the general mapping from the inputs
Note: Unfortunately, this methodology works best when the input data is well-defined and predictable.
Here are a few parametric models:
Artificial Neural Networks
Linear Regression models map the inputs to the outputs using the following generalized linear equation:
Here,
Now that we're acquainted with parametric models and the finite number of parameters they have, it would follow that non-parametric models have no parameters, right? Wrong. The term non-parametric actually implies that the number of parameters is flexible and entirely dependent on the training data.
Having a flexible number of parameters that vary with the training data results in a model that functions without having to approximate a mathematical model (unlike linear regression); therefore, these models are immensely flexible as they minimize any assumptions that are made about the data.
It's due to this that non-parametric models are ideal when the data at hand is either too complex or isn't well-defined. However, not approximating a mathematical model does come with its drawbacks. Non-parametric models are more computationally expensive than parametric models, and also get increasingly complex as the amount of data increases (since tracing the effects of parameters becomes more difficult).
Here are a few non-parametric models:
To make a prediction in kNN models, we use the classes of the test instance's k nearest neighbors. As aforementioned, it is the parameters that enable us to make predictions for all models, so we can see that increasing the training instances will thereby lead to an increase in the number of parameters.
The table below summarizes the comparison between parametric and non-parametric models:
Parametric | Non-parametric |
It's less computationally expensive. | It's more computationally expensive. |
It's less flexible. | It's more flexible. |
It doesn't need as much training data. | It needs a lot more training data. |
It needs prior knowledge to make predictions. | It doesn't need prior knowledge to make predictions. |
It approximates a mathematical model to map inputs to outputs. | It doesn't approximate a mathematical model to map inputs to outputs. |
It's ideal when the data is simple and well-defined. | It's ideal for cases where the data is complex and ill-defined. |
Free Resources