randomforest_fit1: Function that implement one weak model of Random Forest based...

Description Usage Arguments Value Examples

View source: R/random_forest.R

Description

Function that implement one weak model of Random Forest based on the resample of the features

Usage

1
randomforest_fit1(data, fweak = dt_reg, fea_len = NULL)

Arguments

data

- list of data that fweak need

fweak

- function that generates estimate from weak model based on input, its default value is dt_reg

fea_len

- the number of features we sample each time, its default value is null

Value

A trained model function based on the one implementation of the weak model, whose input is the independent variables.

Examples

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

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