Skip to contents

The StatisticResults_KNN_class class is used to store the results of a KNN classification model.

Usage

StatisticResults_KNN_class(model = list())

# S3 method for class 'StatisticResults_KNN_class'
validate_object(x)

# S3 method for class 'StatisticResults_KNN_class'
get_model_data(x)

# S3 method for class 'StatisticResults_KNN_class'
test(x, data)

# S3 method for class 'StatisticResults_KNN_class'
predict(x, data)

Arguments

model

A list containing the KNN model and its conditions.

x

A StatisticResults_KNN_class object.

data

A data frame containing the new data to test or predict.

Methods (by generic)

  • validate_object(StatisticResults_KNN_class): Validate the StatisticResults_KNN_class object, returns NULL if valid.

  • get_model_data(StatisticResults_KNN_class): Get the model data.

  • test(StatisticResults_KNN_class): Test new data using the KNN model.

  • predict(StatisticResults_KNN_class): Predict new data using the KNN model.