Learn R Programming

D2MCS (version 1.0.1)

Accuracy: Computes the Accuracy measure.

Description

Computes the ratio of number of correct predictions to the total number of input samples.

Arguments

Super class

D2MCS::MeasureFunction -> Accuracy

Methods


Method new()

Method for initializing the object arguments during runtime.

Usage

Accuracy$new(performance.output = NULL)

Arguments

performance.output

An optional ConfMatrix used as basis to compute the performance.


Method compute()

The function computes the Accuracy achieved by the M.L. model.

Usage

Accuracy$compute(performance.output = NULL)

Arguments

performance.output

An optional ConfMatrix parameter to define the type of object used as basis to compute the Accuracy measure.

Details

This function is automatically invoke by the ClassificationOutput object.

Returns

A numeric vector of size 1 or NULL if an error occurred.


Method clone()

The objects of this class are cloneable with this method.

Usage

Accuracy$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

$$Accuracy = (Number Correct Predictions) / (Total Number of Predictions)$$

See Also

MeasureFunction, ClassificationOutput, ConfMatrix.