Negative Wilcoxon-Mann-Whitney statistic. More...
#include <shark/ObjectiveFunctions/NegativeAUC.h>
Public Member Functions | |
NegativeWilcoxonMannWhitneyStatistic (bool invert=false) | |
std::string | name () const |
From INameable: return the class name. More... | |
double | eval (Data< LabelType > const &target, Data< OutputType > const &prediction, unsigned int column) const |
Computes Wilcoxon-Mann-Whitney statistic. More... | |
double | eval (Data< LabelType > const &target, Data< OutputType > const &prediction) const |
Public Member Functions inherited from shark::AbstractCost< LabelType, OutputType > | |
virtual | ~AbstractCost () |
const Features & | features () const |
virtual void | updateFeatures () |
bool | hasFirstDerivative () const |
returns true when the first parameter derivative is implemented More... | |
bool | isLossFunction () const |
returns true when the cost function is in fact a loss function More... | |
double | operator() (Data< LabelType > const &targets, Data< OutputType > const &predictions) const |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
Additional Inherited Members | |
Public Types inherited from shark::AbstractCost< LabelType, OutputType > | |
enum | Feature |
list of features a cost function can have More... | |
typedef OutputType | OutputType |
typedef LabelType | LabelType |
typedef Batch< OutputType >::type | BatchOutputType |
typedef Batch< LabelType >::type | BatchLabelType |
typedef TypedFlags< Feature > | Features |
typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Protected Attributes inherited from shark::AbstractCost< LabelType, OutputType > | |
Features | m_features |
Negative Wilcoxon-Mann-Whitney statistic.
This class computes the Wilcoxon-Mann-Whitney statistic, which is an unbiased estimate of the area under the ROC curve.
See, for example: Corinna Cortes, Mehryar Mohri. Confidence Intervals for the Area under the ROC Curve. NIPS, 2004
The area is negated so that optimizing the AUC corresponds to a minimization task.
Definition at line 164 of file NegativeAUC.h.
|
inline |
Constructor.
invert | if set to true, the role of positive and negative class are switched |
Definition at line 169 of file NegativeAUC.h.
References shark::NegativeAUC< LabelType, OutputType >::m_invert.
|
inline |
Computes Wilcoxon-Mann-Whitney statistic.
target | interpreted as binary class label |
prediction | interpreted as binary class label |
column | indicates the column of the prediction vector interpreted as probability of positive class |
Definition at line 181 of file NegativeAUC.h.
|
inlinevirtual |
Evaluates the cost of predictions, given targets.
targets | target values |
predictions | predictions, typically made by a model |
Implements shark::AbstractCost< LabelType, OutputType >.
Definition at line 230 of file NegativeAUC.h.
References shark::dataDimension(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::NegativeAUC< LabelType, OutputType >::m_invert, shark::Data< Type >::numberOfElements(), and SHARK_RUNTIME_CHECK.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 174 of file NegativeAUC.h.