官术网_书友最值得收藏!

Lazy learning and non-parametric models

KNN is a lazy learner. Also known as instance-based learners, lazy learners simply store the training dataset with little or no processing. In contrast to eager learners such as simple linear regression, KNN does not estimate the parameters of a model that generalizes the training data during a training phase. Lazy learning has advantages and disadvantages. Training an eager learner is often computationally costly, but prediction with the resulting model is often inexpensive. For simple linear regression, prediction consists only of multiplying the learned coefficient by the feature, and adding the learned intercept parameter. A lazy learner can predict almost immediately, but making predictions can be costly. In the simplest implementation of KNN, prediction requires calculating the distances between a test instance and all training instances.

In contrast to most of the other models that we will discuss, KNN is a non-parametric model. A parametric model uses a fixed number of parameters, or coefficients, to define the model that summarizes the data. The number of parameters is independent of the number of training instances. Non-parametric may seem to be a misnomer, as it does not mean that the model has no parameters; rather, non-parametric means that the number of parameters of the model is not fixed, and may grow with the number of training instances.

Non-parametric models can be useful when training data is abundant and you have little prior knowledge about the relationship between the response and explanatory variables. KNN makes only one assumption: instances that are near each other are likely to have similar values of the response variable. The flexibility provided by non-parametric models is not always desirable; a model that makes assumptions about the relationship can be useful if training data is scarce or if you already know about the relationship.

主站蜘蛛池模板: 开原市| 宁阳县| 温州市| 古蔺县| 广饶县| 牙克石市| 玉门市| 天门市| 平谷区| 祁阳县| 东兰县| 通州市| 克拉玛依市| 仪陇县| 怀仁县| 大悟县| 古交市| 曲阜市| 和硕县| 瑞金市| 东源县| 乌鲁木齐市| 樟树市| 江津市| 砚山县| 涟水县| 包头市| 潜山县| 昭觉县| 云阳县| 平塘县| 罗平县| 黄石市| 吉林市| 乌拉特后旗| 黑龙江省| 清远市| 汤原县| 安福县| 秦皇岛市| 宁乡县|