ActiveCrowdToolkit  0.1
CrowdsourcingModels.CBCC Class Reference

The CBCC model class. More...

Inheritance diagram for CrowdsourcingModels.CBCC:
CrowdsourcingModels.BCC

Public Member Functions

void SetCommunityCount (int CommunityCount)
 
 CBCC ()
 Creates a CBCC model instance. More...
 
override void CreateModel (int taskCount, int labelCount)
 Initializes the CBCC model. More...
 
virtual void CreateModel (int taskCount, int labelCount, int communityCount)
 Initializes the CBCC model with a number of communities. More...
 
override BCCPosteriors Infer (int[][] taskIndices, int[][] workerLabels, BCCPosteriors priors)
 Infers the posteriors of CBCC using the attached data. More...
 
- Public Member Functions inherited from CrowdsourcingModels.BCC
 BCC ()
 Creates a BCC model instance. More...
 
Dirichlet[] GetConfusionMatrixPrior ()
 Returns the confusion matrix prior of each worker. More...
 

Protected Member Functions

override void DefineVariablesAndRanges (int taskCount, int labelCount)
 Defines the variables and the ranges of CBCC. More...
 
override void DefineGenerativeProcess ()
 Defines the generative process of CBCC. More...
 
override void DefineInferenceEngine ()
 Initializes the CBCC inference engine. More...
 
override void AttachData (int[][] taskIndices, int[][] workerLabels)
 Attachs the data to the workers labels. More...
 
void AttachData (int[][] taskIndices, int[][] workerLabels, VectorGaussian[][] scoreConstraint, Discrete[] communityConstraint)
 Attachs the data to the workers labels and sets the constraints on the community score matrices and the community memberships (used for online training). More...
 
override void SetPriors (int workerCount, BCCPosteriors priors)
 Sets the priors of CBCC. More...
 
- Protected Member Functions inherited from CrowdsourcingModels.BCC
virtual void AttachData (int[][] taskIndices, int[][] workerLabels, Dirichlet[][] confusionMatrixPrior)
 Attachs the data to the workers labels with and sets the workers' confusion matrix priors. More...
 

Protected Attributes

Range m
 
VariableArray< int > Community
 
VariableArray< Discrete > CommunityInit
 
Variable< Vector > CommunityProb
 
VariableArray< VariableArray< Vector >, Vector[][]> ScoreMatrix
 
VariableArray< VariableArray< Vector >, Vector[][]> CommunityScoreMatrix
 
VariableArray< VariableArray< Vector >, Vector[][]> CommunityConfusionMatrix
 
Variable< PositiveDefiniteMatrix > NoiseMatrix = Variable.New<PositiveDefiniteMatrix>().Named("NoiseMatrix")
 
VariableArray< Discrete > CommunityConstraint
 
VariableArray< VariableArray< VectorGaussian >, VectorGaussian[][]> ScoreMatrixConstraint
 
VariableArray< VariableArray< VectorGaussian >, VectorGaussian[][]> CommunityScoreMatrixPrior
 
Variable< Dirichlet > CommunityProbPrior
 
- Protected Attributes inherited from CrowdsourcingModels.BCC
Range n
 
Range k
 
Range c
 
Range kn
 
Variable< int > WorkerCount
 
VariableArray< int > TrueLabel
 
VariableArray< int > WorkerTaskCount
 
VariableArray< VariableArray< int >, int[][]> WorkerTaskIndex
 
VariableArray< VariableArray< int >, int[][]> WorkerLabel
 
Variable< Vector > BackgroundLabelProb
 
VariableArray< VariableArray< Vector >, Vector[][]> WorkerConfusionMatrix
 
Variable< bool > Evidence
 
Variable< Dirichlet > BackgroundLabelProbPrior
 
VariableArray< VariableArray< Dirichlet >, Dirichlet[][]> ConfusionMatrixPrior
 
VariableArray< Discrete > TrueLabelConstraint
 
Variable< Bernoulli > EvidencePrior
 
InferenceEngine Engine
 

Properties

double NoisePrecision [get, set]
 The noise precision that generates the workers score matrix from the communities score matrix. More...
 
int CommunityCount [get, protected set]
 The number of communities. More...
 
Tuple< double, double >[] ScoreMeanParameters [get, set]
 The mean vector of the Gaussian distribution generating the community score matrices. More...
 
double[] ScorePrecisionParameters [get, set]
 The precision matrix of the Gaussian distribution generating the community score matrices. More...
 
double CommunityPseudoCount [get, set]
 The hyperparameter governing community membership. More...
 
VectorGaussian[][] CommunityScoreMatrixPriorObserved [get, protected set]
 The prior for the score matrices. More...
 
Dirichlet CommunityProbPriorObserved [get, protected set]
 The prior for community membership. More...
 
- Properties inherited from CrowdsourcingModels.BCC
int LabelCount [get]
 The number of label values. More...
 
int TaskCount [get]
 The number of tasks. More...
 
double InitialWorkerBelief [get, set]
 
int NumberOfIterations [get, set]
 The number of inference iterations. More...
 

Detailed Description

The CBCC model class.

Constructor & Destructor Documentation

CrowdsourcingModels.CBCC.CBCC ( )
inline

Creates a CBCC model instance.

Member Function Documentation

override void CrowdsourcingModels.CBCC.AttachData ( int  taskIndices[][],
int  workerLabels[][] 
)
inlineprotectedvirtual

Attachs the data to the workers labels.

Parameters
taskIndicesThe matrix of the task indices (columns) of each worker (rows).
workerLabelsThe matrix of the labels (columns) of each worker (rows).

Reimplemented from CrowdsourcingModels.BCC.

void CrowdsourcingModels.CBCC.AttachData ( int  taskIndices[][],
int  workerLabels[][],
VectorGaussian  scoreConstraint[][],
Discrete[]  communityConstraint 
)
inlineprotected

Attachs the data to the workers labels and sets the constraints on the community score matrices and the community memberships (used for online training).

Parameters
taskIndicesThe matrix of the task indices (columns) of each worker (rows).
workerLabelsThe matrix of the labels (columns) of each worker (rows).
scoreConstraintThe constraint of the community score matrices.
communityConstraintThe constraint of the workers community membership.
override void CrowdsourcingModels.CBCC.CreateModel ( int  taskCount,
int  labelCount 
)
inlinevirtual

Initializes the CBCC model.

Parameters
taskCountThe number of tasks.
labelCountThe number of labels.

Reimplemented from CrowdsourcingModels.BCC.

virtual void CrowdsourcingModels.CBCC.CreateModel ( int  taskCount,
int  labelCount,
int  communityCount 
)
inlinevirtual

Initializes the CBCC model with a number of communities.

Parameters
taskCountThe number of tasks.
labelCountThe number of labels.
communityCountThe number of communities.
override void CrowdsourcingModels.CBCC.DefineGenerativeProcess ( )
inlineprotectedvirtual

Defines the generative process of CBCC.

Reimplemented from CrowdsourcingModels.BCC.

override void CrowdsourcingModels.CBCC.DefineInferenceEngine ( )
inlineprotectedvirtual

Initializes the CBCC inference engine.

Reimplemented from CrowdsourcingModels.BCC.

override void CrowdsourcingModels.CBCC.DefineVariablesAndRanges ( int  taskCount,
int  labelCount 
)
inlineprotectedvirtual

Defines the variables and the ranges of CBCC.

Parameters
taskCountThe number of tasks.
labelCountThe number of labels.

Reimplemented from CrowdsourcingModels.BCC.

override BCCPosteriors CrowdsourcingModels.CBCC.Infer ( int  taskIndices[][],
int  workerLabels[][],
BCCPosteriors  priors 
)
inlinevirtual

Infers the posteriors of CBCC using the attached data.

Parameters
taskIndicesThe matrix of the task indices (columns) of each worker (rows).
workerLabelsThe matrix of the labels (columns) of each worker (rows).
priorsThe priors.
Returns

Reimplemented from CrowdsourcingModels.BCC.

override void CrowdsourcingModels.CBCC.SetPriors ( int  workerCount,
BCCPosteriors  priors 
)
inlineprotectedvirtual

Sets the priors of CBCC.

Parameters
workerCountThe number of workers.
priorsThe priors.

Reimplemented from CrowdsourcingModels.BCC.

Property Documentation

int CrowdsourcingModels.CBCC.CommunityCount
getprotected set

The number of communities.

Dirichlet CrowdsourcingModels.CBCC.CommunityProbPriorObserved
getprotected set

The prior for community membership.

double CrowdsourcingModels.CBCC.CommunityPseudoCount
getset

The hyperparameter governing community membership.

VectorGaussian [][] CrowdsourcingModels.CBCC.CommunityScoreMatrixPriorObserved
getprotected set

The prior for the score matrices.

double CrowdsourcingModels.CBCC.NoisePrecision
getset

The noise precision that generates the workers score matrix from the communities score matrix.

Tuple<double, double> [] CrowdsourcingModels.CBCC.ScoreMeanParameters
getset

The mean vector of the Gaussian distribution generating the community score matrices.

double [] CrowdsourcingModels.CBCC.ScorePrecisionParameters
getset

The precision matrix of the Gaussian distribution generating the community score matrices.


The documentation for this class was generated from the following file: