fit_classification_random_forest: Fit classification random forest to 'klassets_response_xy'...

View source: R/response_xy.R

fit_classification_random_forestR Documentation

Fit classification random forest to klassets_response_xy object

Description

Fit classification random forest to klassets_response_xy object

Usage

fit_classification_random_forest(
  df,
  type = "prob",
  ntree = 500L,
  maxdepth = NULL,
  trace = FALSE,
  ...
)

Arguments

df

A object from sim_response_xy.

type

Type of prediction, one of prob, response, node.

ntree

Number of trees to grow for the forest.

maxdepth

Max depth of each trees.

trace

A logical indicating if a progress bar shall be printed while the forest grows.

...

Options for ranger::ranger.

Examples


set.seed(123)

df <- sim_response_xy(n = 1000, relationship = function(x, y) x**2 > sin(y))

plot(df)

dfcrf <- fit_classification_random_forest(df)

dfcrf

plot(dfcrf)


jbkunst/klassets documentation built on Dec. 7, 2022, 9:18 p.m.