fit_model: Function that gets results from weak model

Description Usage Arguments Value Examples

View source: R/EnsembleFuns.R

Description

Function that gets results from weak model

Usage

1

Arguments

fweak

- function that generates estimate from weak model based on input

parallel

- logical value, true if its results will be combined in parallel

data

- list of data that fweak need

Value

The new trained results based on the weak model.

Examples

1
2
3
4
5
6
7
fweak <- function(x, y){
  lm(y ~ -1 + x)$coefficients
}
data <- list(x = matrix(rnorm(1000), 200, 5))
parallel <- TRUE
data$y <- data$x %*% rnorm(5) + rnorm(200, 0, 3)
fit_model(fweak, parallel, data)

StevenBoys/Ensemblelearn documentation built on Dec. 11, 2019, 2:06 a.m.