Hello everyone,
I want to *save the components *when using pls, I tried several ways but
failed.
No matter if using the caret package or in other coding formats. The code
in the caret is:
factors <- c("a","b","c")
set.seed(123)
silt <- caret::train(extsentinel[,factors],extsentinel$Silt,metric="RMSE",
method="pls",tuneLength = 10 , importance=T, verbose=FALSE,
trControl=trainControl(method="cv",savePredictions =
"final"),
returnData=T, preProc = c("BoxCox","center", "scale"))
Thanks in advance,
Hossein
How to save components in pls model
3 messages · Hossein Shafizadeh, Roger Bivand
On Sat, 22 Jun 2019, Hossein Shafizadeh wrote:
Hello everyone, I want to *save the components *when using pls, I tried several ways but failed. No matter if using the caret package or in other coding formats. The code in the caret is:
Maybe you should condider a different list? The only reason this list
might be relevant is if the object name extsentinel suggests that you are
using earth observation data. In any case a reproducible example would be
needed using a built in data set, such as a raster image from a CRAN
package, or spDataLarge::landsat; install from:
install.packages("spDataLarge", repos = "https://nowosad.github.io/drat/",
type = "source")
Roger
factors <- c("a","b","c")
set.seed(123)
silt <- caret::train(extsentinel[,factors],extsentinel$Silt,metric="RMSE",
method="pls",tuneLength = 10 , importance=T, verbose=FALSE,
trControl=trainControl(method="cv",savePredictions =
"final"),
returnData=T, preProc = c("BoxCox","center", "scale"))
Thanks in advance,
Hossein
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no https://orcid.org/0000-0003-2392-6140 https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
Thank you for your kind reply. Hossein
On Sun, Jun 23, 2019 at 1:46 PM Roger Bivand <Roger.Bivand at nhh.no> wrote:
On Sat, 22 Jun 2019, Hossein Shafizadeh wrote:
Hello everyone, I want to *save the components *when using pls, I tried several ways but failed. No matter if using the caret package or in other coding formats. The code in the caret is:
Maybe you should condider a different list? The only reason this list
might be relevant is if the object name extsentinel suggests that you are
using earth observation data. In any case a reproducible example would be
needed using a built in data set, such as a raster image from a CRAN
package, or spDataLarge::landsat; install from:
install.packages("spDataLarge", repos = "https://nowosad.github.io/drat/",
type = "source")
Roger
factors <- c("a","b","c")
set.seed(123)
silt <-
caret::train(extsentinel[,factors],extsentinel$Silt,metric="RMSE",
method="pls",tuneLength = 10 , importance=T,
verbose=FALSE,
trControl=trainControl(method="cv",savePredictions =
"final"),
returnData=T, preProc = c("BoxCox","center", "scale"))
Thanks in advance,
Hossein
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
-- Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no https://orcid.org/0000-0003-2392-6140 https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en