如何区分线性模型和非线性模型?是基于权重还是特征值?
我只听说/读到过“模型的线性/非线性取决于特征”。这通常是最有趣的事情。我不明白在模型中加入w_i^2项如何帮助你,因为它本质上是一个常数。只有在测试期间特征才会发生变化。
因此,线性模型是可以表示为的东西
![enter image description here](https://istack.dev59.com/YWg7k.webp)
“where the w
i define your model and the x
i are your input. Different w
i result in a different model (but they are all linear with respect to the features). If your model does not fit this scheme, then your model is not linear with respect to the features.”
“You can add new features that are essentially only handcrafted non-linear transformations of the input. For example, you could create a model…”
![enter image description here](https://istack.dev59.com/MJyp8.webp)
您可以认为这是一个关于输入的非线性模型。不过,您也可以认为它本质上就是这个模型。
![enter image description here](https://istack.dev59.com/Ny3Mn.webp)
我认为这里重要的部分是它是手工制作的。你改变了特征空间,而不是模型的能力。因此,它仍然是一个线性模型,但在另一个特征空间中。当你走这条路时,你可以使任何模型变成非线性的。
毕竟:这真的很重要吗?这听起来有点像你在为考试做准备。如果是这种情况,我建议你直接问你的讲师,并坚持他定义的线性/非线性。