WSF
WsfBayesClassifier Class Reference

#include <WsfBayesClassifier.hpp>

Inheritance diagram for WsfBayesClassifier:
Collaboration diagram for WsfBayesClassifier:

Public Member Functions

 WsfBayesClassifier ()
 WsfBayesClassifier (const WsfBayesClassifier &aSrc)=default
WsfBayesClassifieroperator= (const WsfBayesClassifier &)=delete
 ~WsfBayesClassifier () override=default
WsfTrackClassifierClone () override
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (double aSimTime)
TrackAccessorGetTrackAccessor (const WsfTrack &aTrack) override
 We need to parse a track once and re-use the data a lot.
void CreateClassList (const TrackAccessor &aTrack, ClassificationReportList &aClassificationReportList) override
 Create a list of probable classifications for the track.
void Classify (const TrackAccessor &aTrackAccessor, const ClassificationReportList &aClassificationList, ClassificationReport &aClassificationReport) override
 The realistic Bayes classifier just selects the best candidate.
Public Member Functions inherited from WsfTrackClassifier
 WsfTrackClassifier ()
 WsfTrackClassifier (const WsfTrackClassifier &aSrc)=default
WsfTrackClassifieroperator= (const WsfTrackClassifier &)=delete
virtual ~WsfTrackClassifier ()=default

Protected Member Functions

bool ReadCsv (const std::string &aFileName)
void AddDataRow (const std::string &aEntityType, const std::vector< ColumnPair > &aAttributeNamePairs, const std::vector< AttributePair > &aAttributeValuePairs)
void Test () override

Friends

class WsfBayesClassification

Additional Inherited Members

Protected Attributes inherited from WsfTrackClassifier
bool mDebug

Detailed Description

A track classifier that is a Bayesian Classifier, which is not the same thing as a Bayesian (network) engine. It uses configured data sources to determine probabilities of being entity types This class creates a instantiation, which protects all the utility classes it uses.

Constructor & Destructor Documentation

◆ WsfBayesClassifier() [1/2]

WsfBayesClassifier::WsfBayesClassifier ( )

◆ WsfBayesClassifier() [2/2]

WsfBayesClassifier::WsfBayesClassifier ( const WsfBayesClassifier & aSrc)
default

References WsfBayesClassifier().

◆ ~WsfBayesClassifier()

WsfBayesClassifier::~WsfBayesClassifier ( )
overridedefault

Member Function Documentation

◆ AddDataRow()

void WsfBayesClassifier::AddDataRow ( const std::string & aEntityType,
const std::vector< ColumnPair > & aAttributeNamePairs,
const std::vector< AttributePair > & aAttributeValuePairs )
protected

The given lists are matched in order, i.e., name[0] equates to value[0]. FYI The name list is re-used for all rows.

References WsfEntityPrototype::AddAttributeProtoRange(), WsfEntityPrototype::AddAttributeProtoSigma(), ColumnPair::mFirst, ColumnPair::mSecond, WsfEntityPrototype::mTypeName, and WsfEntityPrototype::mTypeNameID.

Referenced by ReadCsv(), and ~WsfBayesClassifier().

◆ Classify()

void WsfBayesClassifier::Classify ( const TrackAccessor & aTrackAccessor,
const ClassificationReportList & aCandidateEntitylist,
ClassificationReport & aClassificationReport )
overridevirtual

The realistic Bayes classifier just selects the best candidate.

First a call to createList. Then that list is passed in here.

Reimplemented from WsfTrackClassifier.

References ClassificationReport::mEntityTypeId, and ClassificationReport::mTypeScore.

Referenced by Test().

◆ Clone()

WsfTrackClassifier * WsfBayesClassifier::Clone ( )
overridevirtual

◆ CreateClassList()

void WsfBayesClassifier::CreateClassList ( const TrackAccessor & aTrack,
ClassificationReportList & aClassificationReportList )
overridevirtual

Create a list of probable classifications for the track.

This default impl creates a list of one, which contains truth.

Reimplemented from WsfTrackClassifier.

Referenced by Test().

◆ GetTrackAccessor()

TrackAccessor * WsfBayesClassifier::GetTrackAccessor ( const WsfTrack & aTrack)
overridevirtual

We need to parse a track once and re-use the data a lot.

Even for a classifier subclass, the accessor is needed first for each prototype to create the list; then it is needed for gating. This function enables re-use.

Reimplemented from WsfTrackClassifier.

References WsfTrackAccessorDeep::SetTrack().

Referenced by Test().

◆ Initialize()

bool WsfBayesClassifier::Initialize ( double aSimTime)
virtual

Referenced by ~WsfBayesClassifier().

◆ operator=()

WsfBayesClassifier & WsfBayesClassifier::operator= ( const WsfBayesClassifier & )
delete

References WsfBayesClassifier().

◆ ProcessInput()

bool WsfBayesClassifier::ProcessInput ( UtInput & aInput)
overridevirtual

◆ ReadCsv()

bool WsfBayesClassifier::ReadCsv ( const std::string & aFileName)
protected

Read a data table to populate the entity prototypes It's possible and common to use multiple tables to populate the same entity type; the attributes will be merged.

References AddDataRow(), WsfTrackClassifier::mDebug, AttributePair::mFirst, ColumnPair::mFirst, AttributePair::mSecond, and ColumnPair::mSecond.

Referenced by ProcessInput(), and ~WsfBayesClassifier().

◆ Test()

◆ WsfBayesClassification

friend class WsfBayesClassification
friend

References WsfBayesClassification.

Referenced by WsfBayesClassification.


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved