fda.usc (version 1.5.0)

summary.classif: Summarizes information from kernel classification methods.

Description

Summary function for classif.knn or classif.kernel.

Usage



# S3 method for classif
summary(object,…)
# S3 method for classif
print(x,digits = max(3, getOption("digits") - 3),…)

Arguments

object

Estimated by kernel classification.

x

Estimated by kernel classification.

digits

a non-null value for digits specifies the minimum number of significant digits to be printed in values. The default, NULL, uses getOption(digits).

Further arguments passed to or from other methods.

Value

Shows:

-Probability of correct classification by group prob.classification.
-Confusion matrix between the theoretical groups and estimated groups.
-Highest probability of correct classification max.prob.

If the object is returned from the function: classif.knn

-Vector of probability of correct classification by number of neighbors knn.
-Optimal number of neighbors: knn.opt.

If the object is returned from the function: classif.kernel

-Vector of probability of correct classification by banwidth h.
-Functional measure of closeness (optimal distance, h.opt).

object

Estimated by kernel classification.

Details

object from one of the following functions:

classif.knn
classif.kernel

See Also

See Also as: classif.knn, classif.kernel and summary.classif

Examples

Run this code
# NOT RUN {
data(phoneme)
mlearn<-phoneme[["learn"]]
glearn<-phoneme[["classlearn"]]
## Not run, time consuming
# out=classif.knn(glearn,mlearn,knn=c(3,5,7))
# summary.classif(out)
# out2=classif.kernel(glearn,mlearn,h=2^(0:5))
#summary.classif(out2)
# }

Run the code above in your browser using DataCamp Workspace