小编use*_*184的帖子

plot.window(...)出错:需要有限的'xlim'值

我该怎么办这个错误?我的代码是:

library(e1071)
library(hydroGOF)
donnees <- read.csv("F:/new work with shahab/Code-SVR/SVR/MainData.csv")
summary(donnees)

#partitioning into training and testing set
donnees.train <- donnees[donnees$subset=="train",2:ncol(donnees)]
donnees.test <- donnees[donnees$subset=="test",2:ncol(donnees)]

#use the mean of the dependent variable as a predictor
def.pred <- mean(donnees.train$y)

#error sum of squares of the default model on the test set
def.rss <- sum((donnees.test$y-def.pred)^2)
print(def.rss)
plot(donnees.train)
#*****************
#linear regression
#*****************
#Linear Models
reg <- lm(y ~., data = donnees.train)
print(summary(reg))
#error sum of squares of the model on the test set
reg.pred <- predict(reg,newdata …
Run Code Online (Sandbox Code Playgroud)

r

19
推荐指数
2
解决办法
11万
查看次数

标签 统计

r ×1