|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.square.qa.utilities.constructs.Models.BayesModel
public class Models.BayesModel
Field Summary | |
---|---|
protected Map<TypeQ,Pair<TypeR,Map<TypeR,Double>>> |
combinedEstLabels
|
protected Map<TypeQ,TypeR> |
goldStandard
|
protected TreeSet<TypeR> |
responseCategories
|
protected Map<TypeQ,TypeR> |
tuneGT
|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
workersMap
|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
workersMapGold
|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
workersMapTune
|
Constructor Summary | |
---|---|
Models.BayesModel()
|
Method Summary | |
---|---|
void |
computeDefaultNewWorkerConfusion()
Compute default worker confusion map |
Map<TypeQ,Pair<TypeR,Map<TypeR,Double>>> |
getCombinedEstLabels()
Get computed/partially-computed results |
Map<TypeQ,TypeR> |
getGoldStandard()
Get ground truth question response pairs from the gold partition |
double |
getLapAlpha()
Get Laplacian alpha smoothing parameter |
double |
getLapBeta()
Get Laplacian beta smoothing parameter |
Map<TypeR,Map<TypeR,Double>> |
getNewWorkerConfusion()
Get default worker confusion map |
TreeSet<TypeR> |
getResponseCategories()
Get valid response categories |
Map<TypeQ,TypeR> |
getTuneGT()
Get ground truth question response pairs from the tune partition |
Map<TypeWID,Map<TypeR,Map<TypeR,Double>>> |
getWorkerConfustionMaps()
Get worker confusion maps |
Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
getWorkersMap()
Get all responses stored for each worker |
Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
getWorkersMapGold()
Get worker responses from the Gold partition |
Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
getWorkersMapTune()
Get worker responses from the Tune partition |
boolean |
hasCombinedEstLabels()
Checks if results are computed |
boolean |
hasGoldStandard()
Checks if gold standard is used by the algorithm (supervised) |
boolean |
hasLapAlpha()
Check is Laplacian alpha smoothing parameter is loaded |
boolean |
hasLapBeta()
Check is Laplacian beta smoothing parameter is loaded |
boolean |
hasNewWorkerConfusion()
Check presence of confusion map default for new workers |
boolean |
hasResponseCategories()
Checks for presence of response categories |
boolean |
hasTuneGT()
Checks if ground truth for tune partition is used by the algorithm (lightly-supervised) |
boolean |
hasWorkerConfusionMaps()
Check for presence of worker confusion maps |
boolean |
hasWorkersMap()
Checks for presence of worker responses from the evaluation partition |
boolean |
hasWorkersMapGold()
Checks for presence of worker responses from the gold partition |
boolean |
hasWorkersMapTune()
Checks for presence of worker responses from the tune partition |
void |
setCombinedEstLabels(Map<TypeQ,Pair<TypeR,Map<TypeR,Double>>> combinedEstLabels)
Load computed/partially-computed results |
void |
setGoldStandard(Map<TypeQ,TypeR> goldStandard)
Set ground truth question response pairs from the gold partition |
void |
setLapAlpha(double lapAlpha)
Set Laplacian alpha smoothing parameter |
void |
setLapBeta(double lapBeta)
Set Laplacian beta smoothing parameter |
void |
setNewWorkerConfusion(HashMap<TypeR,Map<TypeR,Double>> newWorkerConfusionMap)
Set default worker confusion map |
void |
setResponseCategories(TreeSet<TypeR> responseCategories)
Set response categories |
void |
setTuneGT(Map<TypeQ,TypeR> tuneGT)
Set ground truth question response pairs from the tune partition |
void |
setWorkerConfusionMaps(Map<TypeWID,Map<TypeR,Map<TypeR,Double>>> workerConfusionMaps)
Set worker confusion maps |
void |
setWorkersMap(Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMap)
Set responses to questions for each worker |
void |
setWorkersMapGold(Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMapGold)
Set worker responses from the Gold partition |
void |
setWorkersMapTune(Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMapTune)
Set worker responses from the Tune partition |
void |
updateWorkerConfusionMaps(Map<TypeWID,Map<TypeR,Map<TypeR,Double>>> workerConfusionMaps)
Update worker confusion maps |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMap
protected TreeSet<TypeR> responseCategories
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMapTune
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMapGold
protected Map<TypeQ,TypeR> tuneGT
protected Map<TypeQ,TypeR> goldStandard
protected Map<TypeQ,Pair<TypeR,Map<TypeR,Double>>> combinedEstLabels
Constructor Detail |
---|
public Models.BayesModel()
Method Detail |
---|
public boolean hasWorkerConfusionMaps()
public Map<TypeWID,Map<TypeR,Map<TypeR,Double>>> getWorkerConfustionMaps()
public void setWorkerConfusionMaps(Map<TypeWID,Map<TypeR,Map<TypeR,Double>>> workerConfusionMaps)
workerConfusionMaps
- is Map from workers to confusion mapspublic void updateWorkerConfusionMaps(Map<TypeWID,Map<TypeR,Map<TypeR,Double>>> workerConfusionMaps)
workerConfusionMaps
- is Map form workers to confusion mapspublic boolean hasLapAlpha()
public double getLapAlpha()
public void setLapAlpha(double lapAlpha)
lapAlpha
- is a double holding Laplacian alpha smoothing parameterpublic boolean hasLapBeta()
public double getLapBeta()
public void setLapBeta(double lapBeta)
lapBeta
- is a double holding Laplacian beta smoothing parameterpublic boolean hasNewWorkerConfusion()
public Map<TypeR,Map<TypeR,Double>> getNewWorkerConfusion()
public void setNewWorkerConfusion(HashMap<TypeR,Map<TypeR,Double>> newWorkerConfusionMap)
newWorkerConfusionMap
- is a Map from responses to confusion mapspublic void computeDefaultNewWorkerConfusion()
public Map<TypeWID,workersDataStruct<TypeQ,TypeR>> getWorkersMap()
AlgorithmInterface
getWorkersMap
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setWorkersMap(Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMap)
AlgorithmInterface
setWorkersMap
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
workersMap
- is a Map from Worker ID to a worker object holding questions and responsespublic TreeSet<TypeR> getResponseCategories()
AlgorithmInterface
getResponseCategories
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setResponseCategories(TreeSet<TypeR> responseCategories)
AlgorithmInterface
setResponseCategories
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
responseCategories
- is a TreeSet of TypeRpublic Map<TypeWID,workersDataStruct<TypeQ,TypeR>> getWorkersMapTune()
AlgorithmInterface
getWorkersMapTune
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setWorkersMapTune(Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMapTune)
AlgorithmInterface
setWorkersMapTune
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
workersMapTune
- is a Map from workers to objects containing worker questions and responsespublic Map<TypeWID,workersDataStruct<TypeQ,TypeR>> getWorkersMapGold()
AlgorithmInterface
getWorkersMapGold
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setWorkersMapGold(Map<TypeWID,workersDataStruct<TypeQ,TypeR>> workersMapGold)
AlgorithmInterface
setWorkersMapGold
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
workersMapGold
- is a Map from workers to objects containing worker questions and responsespublic Map<TypeQ,TypeR> getTuneGT()
AlgorithmInterface
getTuneGT
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setTuneGT(Map<TypeQ,TypeR> tuneGT)
AlgorithmInterface
setTuneGT
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
tuneGT
- is a Map from questions to responsespublic Map<TypeQ,TypeR> getGoldStandard()
AlgorithmInterface
getGoldStandard
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setGoldStandard(Map<TypeQ,TypeR> goldStandard)
AlgorithmInterface
setGoldStandard
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
goldStandard
- is a Map from questions to responsespublic boolean hasWorkersMap()
AlgorithmInterface
hasWorkersMap
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasWorkersMapTune()
AlgorithmInterface
hasWorkersMapTune
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasWorkersMapGold()
AlgorithmInterface
hasWorkersMapGold
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasResponseCategories()
AlgorithmInterface
hasResponseCategories
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasGoldStandard()
AlgorithmInterface
hasGoldStandard
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasTuneGT()
AlgorithmInterface
hasTuneGT
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public Map<TypeQ,Pair<TypeR,Map<TypeR,Double>>> getCombinedEstLabels()
AlgorithmInterface
getCombinedEstLabels
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasCombinedEstLabels()
AlgorithmInterface
hasCombinedEstLabels
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
public void setCombinedEstLabels(Map<TypeQ,Pair<TypeR,Map<TypeR,Double>>> combinedEstLabels)
AlgorithmInterface
setCombinedEstLabels
in interface AlgorithmInterface<TypeWID,TypeQ,TypeR>
combinedEstLabels
- is a Map from questions to Pair of predicted response and response probabilities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |