See the last updates in NEWS.
To complete installation of dev version of the package IBCF.MTME
from GitHub, you must have previously installed the devtools package.
install.packages('devtools') devtools::install_github('frahik/IBCF.MTME')
If you want to use the stable version of IBCF.MTME
package, install it from CRAN.
install.packages('IBCF.MTME')
library(IBCF.MTME)
library(BGLR) data(wheat)
pheno <- data.frame(ID = gl(n = 599, k = 1, length = 599*4), Response = as.vector(wheat.Y), Env = paste0('Env', gl(n = 4, k = 599))) head(pheno)
CrossV <- CV.RandomPart(pheno, NPartitions = 10, PTesting = 0.25, Set_seed = 123)
pm <- IBCF(CrossV)
All the predictive model printed output:
pm
Predictions and observed data in tidy format
head(pm$predictions_Summary, 6)
Predictions and observed data in matrix format
head(pm$Data.Obs_Pred, 5)
Some plots
par(mai = c(2, 1, 1, 1)) plot(pm, select = 'Pearson') plot(pm, select = 'MAAPE')
library(mvtnorm) library(IBCF.MTME) set.seed(2) A <- matrix(0.65, ncol = 12, nrow = 12) diag(A) <- 1 Sdv <- diag(c(0.9^0.5,0.8^0.5,0.9^0.5,0.8^0.5,0.86^0.5,0.7^0.5,0.9^0.5,0.8^0.5,0.9^0.5,0.7^0.5,0.7^0.5,0.85^0.5)) Sigma <- Sdv %*% A %*% Sdv No.Lines <- 80 Z <- rmvnorm(No.Lines,mean = c(15, 15.5, 16, 15.5, 17, 16.5, 16.0, 17, 16.6, 18, 16.3, 18), sigma = Sigma) Years <- c(rep(2014,20), rep(2015,20), rep(2016,20), rep(2017,20)) Gids <- c(1:No.Lines) Data.Example <- data.frame(cbind(Years,Gids,Z)) colnames(Data.Example) <- c("Years","Gids","Trait1","Trait2","Trait3","Trait4","Trait5","Trait6","Trait7","Trait8","Trait9","Trait10","Trait11","Trait12") Data.Example <- getTidyForm(Data.Example, onlyTrait = T) save(Data.Example, file = 'DataExample.RData')
load('DataExample.RData') head(Data.Example)
Data.Example <- getMatrixForm(Data.Example, onlyTrait = TRUE) head(Data.Example)
pm <- IBCF.Years(Data.Example, colYears = 1, Years.testing = c('2014', '2015', '2016'), Traits.testing = c('Trait1', 'Trait2', 'Trait3', 'Trait4', "Trait5"))
summary(pm) par(mai = c(2, 1, 1, 1)) barplot(pm, las = 2) barplot(pm, select = 'MAAPE', las = 2)
You can use the data sets in the package to test the functions
library(IBCF.MTME) data('Wheat_IBCF') head(Wheat_IBCF)
data('Year_IBCF') head(Year_IBCF)
First option, by the article paper
@article{IBCF2018, author = {Montesinos-L{\'{o}}pez, Osval A. and Luna-V{\'{a}}zquez, Francisco Javier and Montesinos-L{\'{o}}pez, Abelardo and Juliana, Philomin and Singh, Ravi and Crossa, Jos{\'{e}}}, doi = {10.3835/plantgenome2018.02.0013}, issn = {1940-3372}, journal = {The Plant Genome}, number = {3}, pages = {16}, title = {{An R Package for Multitrait and Multienvironment Data with the Item-Based Collaborative Filtering Algorithm}}, url = {https://dl.sciencesocieties.org/publications/tpg/abstracts/0/0/180013}, volume = {11}, year = {2018} }
Second option, by the manual package
citation('IBCF.MTME')
If you have any suggestions or feedback, I would love to hear about it. Feel free to report new issues in this link, also if you want to request a feature/report a bug, or make a pull request if you can contribute.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.