GARS_GA: The wrapper fuction to use GARS

Description Usage Arguments Value Author(s) Examples

View source: R/GARS_wrapper.R

Description

This function allows the users to run all GARS funtion at once. This is the easier and recommended way to use GARS.

Usage

1
2
3
4
5
GARS_GA(data, classes, chr.num = 1000, chr.len, generation = 500,
  co.rate = 0.8, mut.rate = 0.01, n.elit = 10, type.sel = c("RW",
  "TS"), type.co = c("one.p", "two.p"), type.one.p.co = c("I.quart",
  "II.quart", "III.quart"), n.gen.conv = 80, plots = c("yes", "no"),
  n.Feat_plot = 10, verbose = c("yes", "no"))

Arguments

data

A SummarizedExperiment object or a matrix or a data.frame. In case of matrix or data.frame:

  • Rows and Cols have to be, respectively, observations and features. The variables are tipically genes;

  • GARS also accept other -omic features as well as any continuous or factorial variables (e.g. sex, age, cholesterol level,...);

  • Usually the number of observation is << than the number of features

'

classes

The class vector

chr.num

The number of chromosomes to generate. Default is 1000

chr.len

The length of chromosomes. This value corresponds to the desired length of the feature set

generation

The maximum number of generations. Default is 1000

co.rate

The probability of each random couple of chromosomes to swap some parts. It must be between 0 and 1. Default is 0.8

mut.rate

The probability to apply a random mutation to each element. It must be between 0 and 1. Default is 0.01

n.elit

The number of best chromosomes to be selected by elitism. This number must be even. Default is 10

type.sel

The type of selection method; Roulette Wheel ("RW") and Tournament Selection ("TS") are allowed. Default is "RW"

type.co

The type of crossover method; one-point ("one.p") and two-point ("two.p") are allowed. Default is "one.p"

type.one.p.co

The position of the cromosome where performing the crossover, if "one.p" is selected. The first quartile ("I.quart"), the second quartile ("II.quart", i.e. the median) and the third quartile ("III.quart") are allowed. Default is "I.quart"

n.gen.conv

The number of consecutive generations with the same maximum fitness score.

plots

If graphs have to be plotted; "yes" or "no" are allowed. Default is "yes"

n.Feat_plot

The number of features to be plotted

verbose

If statistics have to be printed; "yes" or "no" are allowed. Default is "yes"

Value

A GarsSelectedFeatures object, containg:

data_red

a matrix of selected features

last_pop

a matrix containg the last chromosome population

pop_list

a list containing all the populations produced over the generations

fit_list

a numeric vector containing the maximum fitness scores, computed in each generation

Author(s)

Mattia Chiesa, Luca Piacentini

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# use example data:
data(GARS_data_norm)
data(GARS_classes)

res_ex <- GARS_GA(GARS_data_norm,
   GARS_classes,
   chr.num = 100,
   chr.len=10,
   generation = 5,
   co.rate = 0.8,
   mut.rate = 0.1,
   n.elit = 10,
   type.sel = "RW",
   type.co ="one.p",
   type.one.p.co = "II.quart",
   n.gen.conv = 80,
   plots = "no",
   verbose = "no")

BioinfoMonzino/GARS documentation built on Aug. 2, 2021, 1:08 a.m.