IBCF.MTME

Item Based Collaborative Filtering For Multi-trait and Multi-environment Data [R Package - dev version]

https://github.com/frahik/ibcf.mtme

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords

bayesian-methods predictive-modeling r-package
Last synced: 6 months ago · JSON representation

Repository

Item Based Collaborative Filtering For Multi-trait and Multi-environment Data [R Package - dev version]

Basic Info
  • Host: GitHub
  • Owner: frahik
  • License: lgpl-3.0
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 453 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 4
  • Open Issues: 2
  • Releases: 0
Topics
bayesian-methods predictive-modeling r-package
Created about 8 years ago · Last pushed almost 7 years ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---

IBCF.MTME Logo

**I**tem **B**ased **C**ollaborative **F**ilterign For **M**ulti-**T**rait and **M**ulti-**E**nvironment Data in R - Development version `r packageVersion('IBCF.MTME')`.

[Last README update: `r format(Sys.Date())`]

Maturing Travis build status Appveyor build status Coverage Status LGPL, Version 3.0 Status of the Repo: Active Dowloads from the CRAN CRAN

# Table Of Contents - [NEWS](#news) - [Instructions](#instructions) - [Installation](#install) - [Load the package](#package) - [Example of Cross-validation with IBCF.MTME and external data](#example1) - [Load external data](#external-data) - [Generate a data set in tidy data](#generate-tidydata) - [Generate a Cross-validation](#generate-crossvalidation) - [Fitting the predictive model](#fit-model) - [Show some results](#results) - [Example of Years prediction with IBCF.Years Function](#example2) - [Loading your data](#external-data2) - [Transforming the data from Tidy data to matrix form](#generate-matrixform) - [Adjust the model](#adjust-model) - [Show some results](#results) - [Load available data from the package](#load-data) - [How to cite this package](#cite) - [Contributions](#contributions) - [Authors](#authors)

News of this version (`r packageVersion('IBCF.MTME')`)

* Fixed important issue with the predictions output. * Fixed compatibility with dplyr 0.8. * Fixed barplot function. See the last updates in [NEWS](NEWS.md).

Instructions for proper implementation

IBCF.MTME Logo

Installation

To complete installation of dev version of the package `IBCF.MTME` from GitHub, you must have previously installed the devtools package. ```{r installation, eval = FALSE} 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. ```{r, eval=FALSE} install.packages('IBCF.MTME') ```

Load the package

```{r} library(IBCF.MTME) ```

Example of Cross-validation with IBCF.MTME

Load available data from other package

```{r CVModel} library(BGLR) data(wheat) ```

Generate a new data set in tidy data form

```{r} 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) ```

Generate 10 partitions to do cross-validation

```{r} CrossV <- CV.RandomPart(pheno, NPartitions = 10, PTesting = 0.25, Set_seed = 123) ```

Fitting the predictive model

```{r} pm <- IBCF(CrossV) ```

Show some results

All the predictive model printed output: ```{r} pm ``` Predictions and observed data in tidy format ```{r} head(pm$predictions_Summary, 6) ``` Predictions and observed data in matrix format ```{r} head(pm$Data.Obs_Pred, 5) ``` Some plots ```{r} par(mai = c(2, 1, 1, 1)) plot(pm, select = 'Pearson') plot(pm, select = 'MAAPE') ```

Example of Years prediction with IBCF.Years Function

```{r YearsData, echo = FALSE, warning = FALSE} 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') ```

Loading your data

```{r} load('DataExample.RData') head(Data.Example) ```

Transforming the data from Tidy data to matrix form

```{r} Data.Example <- getMatrixForm(Data.Example, onlyTrait = TRUE) head(Data.Example) ```

Adjust the model

```{r Years} pm <- IBCF.Years(Data.Example, colYears = 1, Years.testing = c('2014', '2015', '2016'), Traits.testing = c('Trait1', 'Trait2', 'Trait3', 'Trait4', "Trait5")) ```

Show some results

```{r} summary(pm) par(mai = c(2, 1, 1, 1)) barplot(pm, las = 2) barplot(pm, select = 'MAAPE', las = 2) ```

Load available data from the package

You can use the data sets in the package to test the functions ```{r loadData} library(IBCF.MTME) data('Wheat_IBCF') head(Wheat_IBCF) ``` ```{r loadYearData} data('Year_IBCF') head(Year_IBCF) ```

Citation

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 ```{r} citation('IBCF.MTME') ```

Contributions

If you have any suggestions or feedback, I would love to hear about it. Feel free to report new issues in [this link](https://github.com/frahik/IBCF.MTME/issues/new), also if you want to request a feature/report a bug, or make a pull request if you can contribute.

Authors

- Francisco Javier Luna-Vázquez (Author, Maintainer) - Osval Antonio Montesinos-López (Author) - Abelardo Montesinos-López (Author) - José Crossa (Author)

Owner

  • Name: Francisco Javier Luna Vázquez
  • Login: frahik
  • Kind: user
  • Location: México

Software Engineer; Researcher and data science enthusiast. Contributor to several open source projects in Python and R.

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 151
  • Total Committers: 1
  • Avg Commits per committer: 151.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Francisco Javier Luna Vázquez f****k@g****m 151

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 0
  • Average time to close issues: about 10 hours
  • Average time to close pull requests: N/A
  • Total issue authors: 3
  • Total pull request authors: 0
  • Average comments per issue: 0.67
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • melissa-garcia (1)
  • frahik (1)
  • frahikLV (1)
Pull Request Authors
Top Labels
Issue Labels
bug (1) enhancement (1) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 231 last-month
  • Total docker downloads: 21,613
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: IBCF.MTME

Item Based Collaborative Filtering for Multi-Trait and Multi-Environment Data

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 231 Last month
  • Docker Downloads: 21,613
Rankings
Forks count: 12.8%
Stargazers count: 28.5%
Dependent packages count: 29.8%
Average: 31.7%
Dependent repos count: 35.5%
Downloads: 52.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.0 depends
  • dplyr * imports
  • lsa * imports
  • tidyr * imports
  • covr * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests