|
static void | RunActiveLearning (IList< Datum > data, string modelName, RunType runType, BCC model, TaskSelectionMethod taskSelectionMethod, WorkerSelectionMethod workerSelectionMethod, string resultsDir, int communityCount=-1, int initialNumLabelsPerTask=1, int numIncremData=1) |
| Runs the standard active learning procedure on a model instance and an input data set. More...
|
|
static void | RunParallelActiveLearning (IList< Datum > data, string[] modelName, RunType[] runType, BCC[] model, TaskSelectionMethod[] taskSelectionMethod, WorkerSelectionMethod[] workerSelectionMethod, int communityCount=-1, int initialNumLabelsPerTask=1, int numIncremData=1) |
| Runs the standard active learning procedure in parallel on an array of model instances and an input data set. More...
|
|
static void | DoSnapshot (List< double > accuracy, List< double > avgRecall, List< ActiveLearningResult > taskValue, Results results, string modelName, string suffix, string resultsDir, int projectInitialNumLabelsPerTask, double lipschitzConstant=-1) |
| Saves the results of the inference and the model's parameters on csv files. More...
|
|
static List< Datum > | GetSubdata (Dictionary< string, Datum[]> groupedRandomisedData, Dictionary< string, int > currentCounts, Dictionary< string, HashSet< string >> workersPerTask) |
| Returns a list of sub-data selected sequentially from the input data list. More...
|
|
static List< Datum > | GetNextData (Dictionary< string, Datum[]> groupedRandomisedData, List< Tuple< string, string, ActiveLearningResult >> labelValue, Dictionary< string, int > currentCounts, Dictionary< string, int > totalCounts, Dictionary< string, HashSet< string >> workersPerTask, int numIncremData) |
|
static Datum | GetRandomDatum (Dictionary< string, Datum[]> groupedRandomisedData, Dictionary< string, int > currentCounts, Dictionary< string, HashSet< string >> workersPerTask) |
|
static void | ResetAccuracyList () |
|
static void | ResetParallelAccuracyList (int numModels) |
|
Class of active learning functions
static void CrowdsourcingModels.ActiveLearning.RunActiveLearning |
( |
IList< Datum > |
data, |
|
|
string |
modelName, |
|
|
RunType |
runType, |
|
|
BCC |
model, |
|
|
TaskSelectionMethod |
taskSelectionMethod, |
|
|
WorkerSelectionMethod |
workerSelectionMethod, |
|
|
string |
resultsDir, |
|
|
int |
communityCount = -1 , |
|
|
int |
initialNumLabelsPerTask = 1 , |
|
|
int |
numIncremData = 1 |
|
) |
| |
|
inlinestatic |
Runs the standard active learning procedure on a model instance and an input data set.
- Parameters
-
data | The data. |
modelName | The model name. |
runType | The model run type. |
model | The model instance. |
taskSelectionMethod | The method for selecting tasks (Random / Entropy). |
workerSelectionMethod | The method for selecting workers (only Random is implemented). |
resultsDir | The directory to save the log files. |
communityCount | The number of communities (only for CBCC). |
initialNumLabelsPerTask | The initial number of exploratory labels that are randomly selected for each task. |
We create a list of task utilities
We create a list of worker utilities
Create a list of tuples <TaskId, WorkerId, ActiveLearningResult>
static void CrowdsourcingModels.ActiveLearning.RunParallelActiveLearning |
( |
IList< Datum > |
data, |
|
|
string[] |
modelName, |
|
|
RunType[] |
runType, |
|
|
BCC[] |
model, |
|
|
TaskSelectionMethod[] |
taskSelectionMethod, |
|
|
WorkerSelectionMethod[] |
workerSelectionMethod, |
|
|
int |
communityCount = -1 , |
|
|
int |
initialNumLabelsPerTask = 1 , |
|
|
int |
numIncremData = 1 |
|
) |
| |
|
inlinestatic |
Runs the standard active learning procedure in parallel on an array of model instances and an input data set.
- Parameters
-
data | The data. |
modelName | The model name. |
runType | The model run type. |
model | The model instance. |
taskSelectionMethod | The method for selecting tasks (Random / Entropy). |
workerSelectionMethod | The method for selecting workers (only Random is implemented). |
resultsDir | The directory to save the log files. |
communityCount | The number of communities (only for CBCC). |
initialNumLabelsPerTask | The initial number of exploratory labels that are randomly selected for each task. |
Main loop
Run through all the models
We create a list of worker utilities
Create a list of tuples <TaskId, WorkerId, ActiveLearningResult>