polynomial-approximations

Multivariate Regression Method [closed]

China☆狼群 提交于 2021-01-29 15:51:49
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 days ago . Improve this question I would like to ask here one question about (I assume) the regression model. My task is to deduce the equation from the 4-dimensional dataset. During my research, I have not noticed any regression model that would fit my needs, primarily due to the fact that the equation that I

Cross Validating step functions in R

≡放荡痞女 提交于 2019-12-13 06:34:25
问题 I am trying to get errors from step functions but I get an error : library(boot) library(ISLR) attach(Wage) set.seed(5082) cv.error <- rep (0,12) for (i in 2:13){ step.fit = glm(wage~cut(age,i), data = Wage) cv.error[i] <- cv.glm(Wage ,step.fit, K= 10)$delta [1] } Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : cut(age, i) has new levels (17.9,43.5], (43.5,69.1] I can get the error from cv.glm()$delta [1] if instead of auto generating the cut()

Why is this polynomial equation badly conditioned?

半城伤御伤魂 提交于 2019-12-04 05:03:11
问题 I have 1x1024 matrix. So I'd like to estimate a polynomial equation. X= (0:1023)' Y= acquired data. A 1024 element vector Then I try this in MATLAB: polyfit(x,y,5) But MATLAB makes an abnormal result with warning. Warning: Polynomial is badly conditioned. Add points with distinct X values, reduce the degree of the ... I don't understand what am I doing wrong? Update I got a bunch of numbers like this. Y= -0.0000000150 ... 0.00001 ... 0 ... 0.17 X= 0~255 polyfit(X,Y,4) I got a polynomial but

Why is this polynomial equation badly conditioned?

爷,独闯天下 提交于 2019-12-02 07:17:11
I have 1x1024 matrix. So I'd like to estimate a polynomial equation. X= (0:1023)' Y= acquired data. A 1024 element vector Then I try this in MATLAB: polyfit(x,y,5) But MATLAB makes an abnormal result with warning. Warning: Polynomial is badly conditioned. Add points with distinct X values, reduce the degree of the ... I don't understand what am I doing wrong? Update I got a bunch of numbers like this. Y= -0.0000000150 ... 0.00001 ... 0 ... 0.17 X= 0~255 polyfit(X,Y,4) I got a polynomial but it does not match to original curve. Is there any options to match between original curve and polyfit's