| Title: | Item Based Collaborative Filtering for Multi-Trait and Multi-Environment Data |
|---|---|
| Description: | Implements the item based collaborative filtering (IBCF) method for continues phenotypes in the context of plant breeding where data are collected for various traits that were studied in various environments proposed by Montesinos-López et al. (2017) <doi:10.1534/g3.117.300309>. |
| Authors: | Francisco Javier Luna-Vazquez [aut, cre] (ORCID: <https://orcid.org/0000-0002-5370-7152>), Osval Antonio Montesinos-Lopez [aut] (ORCID: <https://orcid.org/0000-0002-3973-6547>), Abelardo Montesinos-Lopez [aut], Jose Crossa [aut] (ORCID: <https://orcid.org/0000-0001-9429-5855>) |
| Maintainer: | Francisco Javier Luna-Vazquez <[email protected]> |
| License: | LGPL-3 |
| Version: | 1.6-0 |
| Built: | 2026-06-02 09:01:51 UTC |
| Source: | https://github.com/frahik/ibcf.mtme |
Barplot of the results from IBCFY object
## S3 method for class 'IBCFY' barplot(height, select = "Pearson", ...)## S3 method for class 'IBCFY' barplot(height, select = "Pearson", ...)
height |
|
select |
|
... |
Further arguments passed to or from other methods. |
This method consists of randomly dividing the training data set and the test data set. For each division, the approximation function is adjusted from the training data and calculates the output values for the test data set. The result corresponds to the arithmetic mean of the values obtained for the different divisions.
CV.RandomPart(DataSet, NPartitions = 10, PTesting = 0.35, Traits.testing = NULL, Set_seed = NULL)CV.RandomPart(DataSet, NPartitions = 10, PTesting = 0.35, Traits.testing = NULL, Set_seed = NULL)
DataSet |
|
NPartitions |
|
PTesting |
|
Traits.testing |
|
Set_seed |
|
List A list object with length of NPartitions, every index has a matrix , where is the number of NLines and is the number of NEnv NTraits. The values inside is 1 for training and 2 for testing.
## Not run: library(IBCF.MTME) data('Wheat_IBCF') CV.RandomPart(Wheat_IBCF) CV.RandomPart(Wheat_IBCF, NPartitions = 10) CV.RandomPart(Wheat_IBCF, Traits.testing = 'DH') CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35) CV.RandomPart(Wheat_IBCF, NPartitions = 10, Traits.testing = 'DH') CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35, Set_seed = 5) CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35, Traits.testing = 'DH') CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35, Traits.testing = 'DH', Set_seed = 5 ) ## End(Not run)## Not run: library(IBCF.MTME) data('Wheat_IBCF') CV.RandomPart(Wheat_IBCF) CV.RandomPart(Wheat_IBCF, NPartitions = 10) CV.RandomPart(Wheat_IBCF, Traits.testing = 'DH') CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35) CV.RandomPart(Wheat_IBCF, NPartitions = 10, Traits.testing = 'DH') CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35, Set_seed = 5) CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35, Traits.testing = 'DH') CV.RandomPart(Wheat_IBCF, NPartitions = 10, PTesting = .35, Traits.testing = 'DH', Set_seed = 5 ) ## End(Not run)
Tidy data format to Matrix format
getMatrixForm(Tidy_DataSet, onlyTrait = FALSE)getMatrixForm(Tidy_DataSet, onlyTrait = FALSE)
Tidy_DataSet |
|
onlyTrait |
|
A data.frame object with the $Response divided by $Traits columns.
## Not run: data('Wheat_IBCF') M <- getMatrixForm(Wheat_IBCF) ## End(Not run) ## Not run: data('Year_IBCF') M.Y <- getMatrixForm(Year_IBCF, onlyTrait = T) ## End(Not run)## Not run: data('Wheat_IBCF') M <- getMatrixForm(Wheat_IBCF) ## End(Not run) ## Not run: data('Year_IBCF') M.Y <- getMatrixForm(Year_IBCF, onlyTrait = T) ## End(Not run)
Matrix format to Tidy data format
getTidyForm(Matrix_DataSet, onlyTrait = FALSE)getTidyForm(Matrix_DataSet, onlyTrait = FALSE)
Matrix_DataSet |
A data.frame object with the response values divided in |
onlyTrait |
|
A data.frame object with the $Response divided by $Traits columns.
## Not run: data('Wheat_IBCF') M <- getMatrixForm(Wheat_IBCF) Tidy <- getTidyForm(M) ## End(Not run) ## Not run: data('Year_IBCF') M.Y <- getMatrixForm(Year_IBCF, onlyTrait = T) Tidy.Y <- getTidyForm(M.Y, onlyTrait = T) ## End(Not run)## Not run: data('Wheat_IBCF') M <- getMatrixForm(Wheat_IBCF) Tidy <- getTidyForm(M) ## End(Not run) ## Not run: data('Year_IBCF') M.Y <- getMatrixForm(Year_IBCF, onlyTrait = T) Tidy.Y <- getTidyForm(M.Y, onlyTrait = T) ## End(Not run)
Item Based Collaborative Filtering for multi-trait and multi-environment data.
IBCF(object, dec = 4)IBCF(object, dec = 4)
object |
|
dec |
|
A list with the next components
NPartitions |
|
predictions_Summary |
|
Predictions |
|
## Not run: library(IBCF.MTME) data('Wheat_IBCF') CV <- CV.RandomPart(Wheat_IBCF) IBCF(CV) ## End(Not run)## Not run: library(IBCF.MTME) data('Wheat_IBCF') CV <- CV.RandomPart(Wheat_IBCF) IBCF(CV) ## End(Not run)
The Item Based Collaborative Filtering for Multi-Trait and Multi-Environment Data (IBCF.MTME) package was developed to implement the item based collaborative filtering (IBCF) method for continues phenotypes in the context of plant breeding where data are collected for various traits that were studied in various environments. It is important to point out that the main difference of this package with the available packages that can implement IBCF is that this package was developed for continuous phenotypes which cannot be implemented in the current packages that can implement IBCF that only work for binary and ordinary phenotypes.
Item Based Collaborative Filtering for Years data
IBCF.Years(DataSet, colYears = 1, colID = 2, Years.testing = "", Traits.testing = "", dec = 4)IBCF.Years(DataSet, colYears = 1, colID = 2, Years.testing = "", Traits.testing = "", dec = 4)
DataSet |
|
colYears |
|
colID |
|
Years.testing |
|
Traits.testing |
|
dec |
|
A list with the next components
Year.testing |
|
Traits.testing |
|
Data_Obs_Pred |
|
predictions_Summary |
|
## Not run: library(IBCF.MTME) data('Year_IBCF') DataSet <- getMatrixForm(Year_IBCF, onlyTrait = TRUE) IBCF.Years(DataSet , Years.testing = c('2015', '2016'), Traits.testing = c('T5', 'T6')) ## End(Not run)## Not run: library(IBCF.MTME) data('Year_IBCF') DataSet <- getMatrixForm(Year_IBCF, onlyTrait = TRUE) IBCF.Years(DataSet , Years.testing = c('2015', '2016'), Traits.testing = c('T5', 'T6')) ## End(Not run)
Plot from IBCF object
## S3 method for class 'IBCF' plot(x, select = "Pearson", ...)## S3 method for class 'IBCF' plot(x, select = "Pearson", ...)
x |
|
select |
|
... |
Further arguments passed to or from other methods. |
Print IBCF information object
## S3 method for class 'IBCF' print(x, ...)## S3 method for class 'IBCF' print(x, ...)
x |
IBCF object |
... |
Further arguments passed to or from other methods. |
printeable object
Print IBCFY information object
## S3 method for class 'IBCFY' print(x, ...)## S3 method for class 'IBCFY' print(x, ...)
x |
IBCFY object |
... |
Further arguments passed to or from other methods. |
printeable object
Summary of IBCF object
## S3 method for class 'IBCF' summary(object, information = "compact", digits = 4, ...)## S3 method for class 'IBCF' summary(object, information = "compact", digits = 4, ...)
object |
|
information |
|
digits |
|
... |
Further arguments passed to or from other methods. |
Summary of IBCFY object
## S3 method for class 'IBCFY' summary(object, digits = 4, ...)## S3 method for class 'IBCFY' summary(object, digits = 4, ...)
object |
|
digits |
|
... |
Further arguments passed to or from other methods. |
The package includes a data set based on a portion of the data used in the study of Montesinos-Lopez, O. A.; Montesinos-Lopez, A.; Crossa, J.; Toledo, F. H.; Montesinos-Lopez, J. C.; Singh, P. & Salinas-Ruiz, J. (2017). A Bayesian Poisson-lognormal Model for Count Data for Multiple-Trait Multiple-Environment Genomic-Enabled Prediction. G3: Genes|Genomes|Genetics 7(5):1595–1606. http://doi.org/10.1534/g3.117.039974. The data set consists of 250 wheat lines evaluated in 3 environments and 4 distinct traits, i.e. 3000 observations.
data(Wheat_IBCF)data(Wheat_IBCF)
a TidyData format, 3000 row per 4 columns.
Montesinos-Lopez, O. A.
Dataset based on simulated data with the next code:
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
No.Lines <- 60
Z <- rmvnorm(No.Lines,mean=c(5,5.5,6,5.5,7,6.5,6.0,7,6.6,8,6.3,8),sigma=Sigma)
Years <- c(rep(2014,20),rep(2015,20),rep(2016,20))
Gids <- c(1:No.Lines)
Data.Final <- data.frame(cbind(Years,Gids,Z))
colnames(Data.Final) <- c("Years","Gids","T1","T2","T3","T4","T5","T6","T7","T8","T9","T10","T11","T12")
head(Data.Final)
Year_IBCF <- getTidyForm(Data.Final, onlyTrait = T)
data(Year_IBCF)data(Year_IBCF)
a TidyData format, 750 row per 4 columns.
Montesinos-Lopez, O. A.