Data mapping class. This class manages the mapping between the data (which is in the form of task, worker ids, and labels) and the model data (which is in term of indices).
More...
|
| DataMapping (IEnumerable< Datum > data, int numCommunities=-1, int labelMin=int.MaxValue, int labelMax=int.MinValue) |
| Creates a data mapping. More...
|
|
int[][] | GetTaskIndicesPerWorkerIndex (IEnumerable< Datum > data) |
| Returns the matrix of the task indices (columns) of each worker (rows). More...
|
|
int[][] | GetLabelsPerWorkerIndex (IEnumerable< Datum > data) |
| Returns the matrix of the labels (columns) of each worker (rows). More...
|
|
Dictionary< string, int?> | GetGoldLabelsPerTaskId () |
| Returns the the gold labels of each task. More...
|
|
Dictionary< string, int?> | GetRandomLabelPerTaskId (IList< Datum > data) |
|
int[] | GetGoldLabelsPerTaskIndex () |
|
double[][] | GetTimeSpentPerWorkerIndex (IEnumerable< Datum > data) |
|
List< Datum > | BuildDataFromAssignedLabels (Dictionary< string, int?> AssignedLabels, IList< Datum > OriginalData) |
|
int[] | GetMajorityVotesPerTaskIndex () |
| For each task, gets the majority vote label if it is unique. More...
|
|
Dictionary< string, int?> | GetMajorityVotesPerTaskId (IList< Datum > data) |
| For each task Id, gets the majority vote label if it is unique. More...
|
|
Discrete[] | GetVoteDistribPerTaskIndex () |
| For each task, gets the empirical label distribution. More...
|
|
Data mapping class. This class manages the mapping between the data (which is in the form of task, worker ids, and labels) and the model data (which is in term of indices).
CrowdsourcingModels.DataMapping.DataMapping |
( |
IEnumerable< Datum > |
data, |
|
|
int |
numCommunities = -1 , |
|
|
int |
labelMin = int.MaxValue , |
|
|
int |
labelMax = int.MinValue |
|
) |
| |
|
inline |
Creates a data mapping.
- Parameters
-
data | The data. |
numCommunities | The number of communities. |
labelMin | The lower bound of the labels range. |
labelMax | The upper bound of the labels range. |
Dictionary<string, int?> CrowdsourcingModels.DataMapping.GetGoldLabelsPerTaskId |
( |
| ) |
|
|
inline |
Returns the the gold labels of each task.
- Returns
- The dictionary keyed by task id and the value is the gold label.
int [][] CrowdsourcingModels.DataMapping.GetLabelsPerWorkerIndex |
( |
IEnumerable< Datum > |
data | ) |
|
|
inline |
Returns the matrix of the labels (columns) of each worker (rows).
- Parameters
-
- Returns
- The matrix of the labels (columns) of each worker (rows).
Dictionary<string, int?> CrowdsourcingModels.DataMapping.GetMajorityVotesPerTaskId |
( |
IList< Datum > |
data | ) |
|
|
inline |
For each task Id, gets the majority vote label if it is unique.
- Returns
- The dictionary of majority vote labels indexed by task id.
int [] CrowdsourcingModels.DataMapping.GetMajorityVotesPerTaskIndex |
( |
| ) |
|
|
inline |
For each task, gets the majority vote label if it is unique.
- Returns
- The list of majority vote labels.
int [][] CrowdsourcingModels.DataMapping.GetTaskIndicesPerWorkerIndex |
( |
IEnumerable< Datum > |
data | ) |
|
|
inline |
Returns the matrix of the task indices (columns) of each worker (rows).
- Parameters
-
- Returns
- The matrix of the task indices (columns) of each worker (rows).
Discrete [] CrowdsourcingModels.DataMapping.GetVoteDistribPerTaskIndex |
( |
| ) |
|
|
inline |
For each task, gets the empirical label distribution.
- Returns
Dictionary<string, int> CrowdsourcingModels.DataMapping.CommunityIdToIndex |
The mapping from the community id to the community index.
string [] CrowdsourcingModels.DataMapping.CommunityIndexToId |
The mapping from the community index to the community id.
int CrowdsourcingModels.DataMapping.LabelMax |
The upper bound of the labels range.
int CrowdsourcingModels.DataMapping.LabelMin |
The lower bound of the labels range.
Dictionary<string, int> CrowdsourcingModels.DataMapping.TaskIdToIndex |
The mapping from the task id to the task index.
string [] CrowdsourcingModels.DataMapping.TaskIndexToId |
The mapping from the task index to the task id.
Dictionary<string, int> CrowdsourcingModels.DataMapping.WorkerIdToIndex |
The mapping from the worker id to the worker index.
string [] CrowdsourcingModels.DataMapping.WorkerIndexToId |
The mapping from the worker index to the worker id.
IEnumerable<Datum> CrowdsourcingModels.DataMapping.Data |
|
get |
The enumerable list of data.
IEnumerable<Datum> CrowdsourcingModels.DataMapping.DataWithGold |
|
get |
The filtered enumerable list of data with gold labels.
int CrowdsourcingModels.DataMapping.LabelCount |
|
get |
The number of label values.
int CrowdsourcingModels.DataMapping.TaskCount |
|
get |
int CrowdsourcingModels.DataMapping.WorkerCount |
|
get |
The documentation for this class was generated from the following file:
- C:/Users/Matteo/Source/Repos/active-crowd/CrowdsourcingModels/DataMapping.cs