PClassifierInfo Class Reference

Detailed Description

The PClassifierInfo class holds information about classifier and designed for conversion between class indexes and class labels.

The following information is store in the class

  • classification labels (ex. male, female)
  • confidence threshold
  • "unknown" label

Definition at line 35 of file PClassifierInfo.h.

#include <PClassifierInfo.h>

Constructor & Destructor Documentation

◆ PClassifierInfo() [1/3]

PClassifierInfo::PClassifierInfo ( )

Default constructor crates empty PClassifierInfo.

◆ PClassifierInfo() [2/3]

PClassifierInfo::PClassifierInfo ( const PStringList classLabels,
float  threshold = 0,
const PString unknownLabel = "unknown" 
)
explicit

Constructs a PClassifierInfo from a gender type and a gender confidence.

◆ PClassifierInfo() [3/3]

PClassifierInfo::PClassifierInfo ( const PClassifierInfo other)
explicit

Constructs a shared copy of other.

◆ ~PClassifierInfo()

PClassifierInfo::~PClassifierInfo ( )
override

Destroys this object.

Member Function Documentation

◆ GetClassLabel()

const PString& PClassifierInfo::GetClassLabel ( int32  classIndex) const

Get class label ("unknown" label has classIndex=-1).

◆ GetClassLabels()

const PStringList& PClassifierInfo::GetClassLabels ( ) const

Get list of class labels.

◆ GetNumClasses()

int32 PClassifierInfo::GetNumClasses ( ) const

Get number of classes.

◆ GetThreshold()

float PClassifierInfo::GetThreshold ( ) const

Get threshold.

◆ operator=()

PClassifierInfo& PClassifierInfo::operator= ( const PClassifierInfo other)

Performs a shared copy of other to this object.