/GARVaS

Stat 243 Final Project: Genetic Algorithm for Regression Variable Selection (GARVaS)

Primary LanguageRMIT LicenseMIT

Genetic Algorithm for Regression Variable Selection (GARVaS)

R implementation of a genetic algorithm for variable selection in linear and generalized linear regression models.

Authors

Dependencies

GARVaS is developed in RStudio and depends on several packages for documentation generation and unit testing. Please make sure the following packages are installed in your R distribution:

  • devtools
  • testthat
  • roxygen2
  • knitr

Structure

All code should go into R/genetic.R. The primary function is select and at the conclusion of this project will be the only exportable function from this package. Please adhere to Hadley Wickham's style guide for function definitions.

Each function should be documented using the roxygen style. Please see genetic.R for an example. Once the proper docstrings are written out, the documentation should be generated by running devtools::document().

The function test will eventually contain all the unit tests. For the time being (and to simplify the workflow), unit tests should go into tests/testthat/test-####.R file where #### should represent a particular functionality being tested. Multiple unit tests can go into the same file, so please group all tests relating to the same functionality. All tests can be executed at once by running devtools::test(). Please see the tests/testthat/test-generic.R for an example of a unit test and the testing documentation for available options.

The project writeup will go into vignettes\synopsis.Rmd, which is an RMarkdown file that can be compiled into HTML or PDF. This file will contain the description of the algorithm, some useful examples, and documentation of contributions from the authors.

Acknowlegements

Hadley Wickham's R packages book provides all the necessary tutorials for creating packages and was heavily referenced during the creation of GARVaS.