I have 2 vectors
days = c(1, 2, 3, 4, 5, 6, 7)
pct_used = c(22.3, 22.1, 22.1, 22.1, 55.660198413, 56.001746032, 55.988769841)
fit <- lm(days ~ poly(pct_used,2,raw=TRUE))
prediction <- predict(fit, data.frame(pct_used=85))
days_remain <- (prediction - tail(days,1))
pct_used 基本上是磁盘空间。所以这段代码预测磁盘空间何时达到 85。
返回的预测值为 325。我觉得这很奇怪。这是否意味着需要 325 天才能达到 pct_used = 85 ?
我哪里错了?