Randomforest: Function that implement the algorithm of Ensemble learning in...

Description Usage Arguments Value Examples

View source: R/random_forest.R

Description

Function that implement the algorithm of Ensemble learning in Random Forest

Usage

1
Randomforest(data, model_num, fweak = dt_reg)

Arguments

data

- list of data that fweak need

model_num

- the number of weak models you want to train and combine

fweak

- function that generates estimate from weak model based on input

Value

A list of

fitted_value

- fitted value on the training dataset based on the trained model

model_train

- a list of trained weak models

Examples

1
2
3
4
5
6
x <- matrix(rnorm(4000), 200, 20)
beta <- rnorm(5)
y <- x[, 1:length(beta)] %*% beta + rnorm(200)
data <- list(x = x, y = y)
model_num <- 100
Randomforest(data, model_num)

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