store_classification: Store results from ranger classification training and...

Description Usage Arguments Value

View source: R/ranger_classification.R

Description

This function extracts information from the ranger objects generated by training or prediction and stores them in a data.frame. It calls the functions 'classification_metrics' and 'prediction_accuracy' to generate metrics on classification performance for each class.

Usage

1
2
3
4
5
6
7
8
store_classification(
  trained_rf,
  predicted_rf = NULL,
  confusion_matrix,
  n_classes,
  step,
  ...
)

Arguments

trained_rf

the ranger object generated by training with 'ranger()'

predicted_rf

the ranger object generated by prediction with 'predict()', (default: 'NULL')

confusion_matrix

the confusion matrix obtained from 'trained_rf$confusion.matrix' or generated for 'predicted_rf'

n_classes

the number of classes for classification

step

character declaring whether 'training' or 'prediction' occurs

...

parameters passed on to 'prediction_accuracy'

Value

A data frame with one row per ranger run and class


RJ333/phyloseq2ML documentation built on June 2, 2020, 9:25 p.m.