|
||||||||||
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.RaykarModel
public class Models.RaykarModel
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
|
boolean |
useClassPrior
|
boolean |
useWorkerPrior
|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
workersMap
|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
workersMapGold
|
protected Map<TypeWID,workersDataStruct<TypeQ,TypeR>> |
workersMapTune
|
Constructor Summary | |
---|---|
Models.RaykarModel()
|
Method Summary | |
---|---|
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 |
Pair<Double,Double> |
getPosClassBetaParam()
Get positive class Beta distribution parameters |
TypeR |
getPositiveClass()
Get Positive class |
TreeSet<TypeR> |
getResponseCategories()
Get valid response categories |
Map<TypeQ,TypeR> |
getTuneGT()
Get ground truth question response pairs from the tune partition |
Map<TypeWID,Pair<Pair<Double,Double>,Pair<Double,Double>>> |
getWorkerPriors()
Get worker priors |
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 |
hasPosClassBetaParam()
Check if positive class Beta distribution is set |
boolean |
hasPositiveClass()
Check for Postive Class |
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 |
hasWorkerPriors()
Checks if worker priors are supported |
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 |
boolean |
isSemiSupervisedModel()
Checks if algorithm is configured to run with 'light-supervision' |
boolean |
isSupervisedModel()
Checks if algorithm is configured to run with 'supervision' |
boolean |
isUnsupervisedModel()
Checks if algorithm is configured to run 'unsupervised' |
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 |
setPosClassBetaParam(Pair<Double,Double> posClassBetaParam)
Set positive class Beta distribution parameters |
void |
setPositiveClass(TypeR positiveClass)
Set positive class |
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 |
setWorkerPriors(Map<TypeWID,Pair<Pair<Double,Double>,Pair<Double,Double>>> workerPriors)
Set worker priors |
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 |
updateClassPriorParam(Pair<Double,Double> posClassBetaParam)
Update positive class prior |
void |
updateWorkerPriors(Map<TypeWID,Pair<Pair<Double,Double>,Pair<Double,Double>>> workerPriors)
Update worker priors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.square.qa.algorithms.AlgorithmInterface |
---|
getCombinedEstLabels, getGoldStandard, getResponseCategories, getTuneGT, getWorkersMap, getWorkersMapGold, getWorkersMapTune, hasCombinedEstLabels, hasGoldStandard, hasResponseCategories, hasTuneGT, hasWorkersMap, hasWorkersMapGold, hasWorkersMapTune, setCombinedEstLabels, setGoldStandard, setResponseCategories, setTuneGT, setWorkersMap, setWorkersMapGold, setWorkersMapTune |
Field Detail |
---|
public boolean useClassPrior
public boolean useWorkerPrior
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.RaykarModel()
Method Detail |
---|
public boolean isUnsupervisedModel()
ExtendedAlgorithmInterface
isUnsupervisedModel
in interface ExtendedAlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean isSemiSupervisedModel()
ExtendedAlgorithmInterface
isSemiSupervisedModel
in interface ExtendedAlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean isSupervisedModel()
ExtendedAlgorithmInterface
isSupervisedModel
in interface ExtendedAlgorithmInterface<TypeWID,TypeQ,TypeR>
public boolean hasWorkerPriors()
ExtendedAlgorithmInterface
hasWorkerPriors
in interface ExtendedAlgorithmInterface<TypeWID,TypeQ,TypeR>
public Map<TypeWID,Pair<Pair<Double,Double>,Pair<Double,Double>>> getWorkerPriors()
public void setWorkerPriors(Map<TypeWID,Pair<Pair<Double,Double>,Pair<Double,Double>>> workerPriors)
workerPriors
- is a Map from workers to priorspublic boolean hasPosClassBetaParam()
public Pair<Double,Double> getPosClassBetaParam()
public void setPosClassBetaParam(Pair<Double,Double> posClassBetaParam)
posClassBetaParam
- is a Pair of Doubles holding positive class beta parameterspublic void updateWorkerPriors(Map<TypeWID,Pair<Pair<Double,Double>,Pair<Double,Double>>> workerPriors)
workerPriors
- is a Map from workers to priorspublic void updateClassPriorParam(Pair<Double,Double> posClassBetaParam)
posClassBetaParam
- is a Pair of Doubles holding positive class beta parameterspublic boolean hasPositiveClass()
public TypeR getPositiveClass()
public void setPositiveClass(TypeR positiveClass)
positiveClass
- is of response type holding positive classpublic 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 |