AdaptivePrediction-package: Prediction rules based on an adaptive handling of dependence

Description Author(s) See Also Examples

Description

This package provides functions to construct prediction rules using an adaptive handling of dependence.

Author(s)

Florian Hébert, Mathieu Emily, David Causeur

Maintainer: Florian Hébert <florian.hebert@agrocampus-ouest.fr>

See Also

AdaptiveReg PredictAdaptiveReg PlotAdaptiveReg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  library(prospectr)
  data(NIRsoil)
  indNA = which(is.na(NIRsoil$Nt))
  NIRNt = list(x=NIRsoil$spc[-indNA,],y=NIRsoil$Nt[-indNA]) #remove NA
  NIRNt = list(x=NIRNt$x[-c(287,316,321,486,641,643),],
               y=NIRNt$y[-c(287,316,321,486,641,643)]) #remove outliers
  ind.test = sample(1:length(NIRNt$y),50)
  fit = AdaptiveReg(NIRNt$x[-ind.test,],NIRNt$y[-ind.test],nvmax=100)
  PlotAdaptiveReg(fit)
  pred = PredictAdaptiveReg(fit,NIRNt$x[ind.test,])
  plot(NIRNt$y[ind.test],pred,pch=16,xlab="Y",ylab=expression(hat(Y)))

fhebert/AdaptivePrediction documentation built on Nov. 4, 2019, 12:40 p.m.