Learn R Programming

sits (version 0.13.0)

.sits_keras_binary_class: Adjust keras prediction for the binary classification case

Description

For binary classification, the prediction function produces only one column (the probability of label 1). For compatibility with the code in the sits package, this function includes a second column in the prediction values to match the results of multi-class classification.

Usage

.sits_keras_binary_class(prediction)

Arguments

prediction

Predicted values from the keras model for the binary classification case (data.table with one column)

Value

Data.table with an additional column for multi-class compatibility