Polynomial regression:
cubic function instead of quadratic function.
(since we don't want the value y goes down while x increases.)
replace:
h(x) = ϴ0 + ϴ1X1 + ϴ2X2...
to:
h(x) = ϴ0 + ϴ1X1 + ϴ2(X2)^2 + ϴ3(X3)^3
easy mapping way:
X1 = X1
X2 = X2^2
X3 = X3^3
Beware the range of the feature.
e.g:
X1 -> 10
X1^2 -> 100
X1^3 -> 1000
Or using a square root function as the regression function,
since sqaure root function increase slowly.
* Also, be sure to adjust the range by square root the original range.*
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.