skmisc.loess.loess_prediction¶
- class skmisc.loess.loess_prediction(newdata, loess, stderror=False)¶
Class for loess prediction results
Holds the predicted values and standard errors of a loess object
- Parameters:
- newdata
ndarray
[m
,p
] Independent variables where the surface must be estimated, with m the number of new data points, and p the number of independent variables.
- loess
loess.loess
Loess object that has been successfully fitted, i.e loess.fit has been called and it returned without any errors.
- stderror
boolean
Whether the standard error should be computed
- newdata
- confidence(self, alpha=0.05)¶
Returns the pointwise confidence intervals
- Parameters:
- alpha
float
The alpha level for the confidence interval. The default
alpha=0.05
returns a 95% confidence interval. Therefore it must be in the range (0, 1).
- alpha
- Returns:
- out
loess_confidence_intervals
Confidence intervals object. It has attributes fit, lower and upper
- out
- df¶
float
- Degrees of freedom of the loess fit.It is used with the t-distribution to compute pointwise confidence intervals for the evaluated surface. It is obtained using the formula
(one_delta ** 2) / two_delta
.