Polynomial features transform non-linear data relationships into linear ones by creating higher-degree terms (e.g., squaring the input variable), allowing linear regression models to capture curved patterns and significantly improve model performance, as demonstrated by the ice cream sales example where the score improved from 0.69 to 0.90.
Inmersión profunda
Prerrequisito
- No hay datos disponibles.
Próximos pasos
- No hay datos disponibles.
Inmersión profunda
How to improve your model score with polynomial features? #machinelearning #coding #python #aimlAñadido:
So guys, so far we have seen the linear regression model, how actually we can train the model and predict the data.
But here is the limitation of linear regression model. So if I run the code, you can see the model score is just 0.69. So there is nothing wrong with this model, rather we have the data like this. So but during the extreme heat, our ice cream sales is going down. So that is not forming the linear graph, okay? So in that case, there comes the polynomial regression. You can import polynomial features, okay? We can create a instance for polynomial features, all right? And we can give the degree is equal to two. Two is for curve, one is for a straight line, okay? Let's take a variable, we can call it as temp poly.
So we are going to transform the data, okay? So poly.fit transform, okay? And then we can pass the input data, which is nothing but the temperature, okay?
Now we are going to use the same model, but instead of training that with temperature, we are going to train it with temp poly, the variable we have created, okay? And while evaluating the model also, let's replace the temp with temp poly. Now if I run the code, you should be seeing the model score has been improved.
So here you go, it has been improved to 0.90.
Videos Relacionados
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
3D Platformer Update - NO CAPES
SolarLune
294 views•2026-05-30
AI Doesn't Create Bias — It Inherits It
UXEvolved
176 views•2026-06-01
Distributed Inference Challenges Explained #shorts
alexa_griffith
466 views•2026-05-31
[한글자막] OpenAI @ Replay 2026 | OpenAI는 Codex로 개발 방식을 어떻게 바꾸고 있을까요?
TechBridge-KR
1K views•2026-06-03











