Package | Description |
---|---|
edu.umass.cs.surveyman |
Top level surveyman language package.
|
edu.umass.cs.surveyman.analyses |
Contains static and dynamic analysis structures and logic.
|
edu.umass.cs.surveyman.analyses.rules |
Contains available rules for the wellformedness check in static analysis.
|
edu.umass.cs.surveyman.input |
Contains the abstract lexing and parsing protocols and some concrete implementations.
|
edu.umass.cs.surveyman.input.csv |
Contains concrete implementations of AbstractLexer and AbstractParser for csv input.
|
edu.umass.cs.surveyman.input.exceptions |
Input exceptions
|
edu.umass.cs.surveyman.input.json |
Contains a concrete implementation AbstractParser for JSON input.
|
edu.umass.cs.surveyman.qc |
Contains quality control metrics.
|
edu.umass.cs.surveyman.qc.biases | |
edu.umass.cs.surveyman.qc.respondents | |
edu.umass.cs.surveyman.samples |
Contains sample programs for how to use SurveyMan programmatically.
|
edu.umass.cs.surveyman.server | |
edu.umass.cs.surveyman.survey |
Contains internal representations of survey component abstractions.
|
edu.umass.cs.surveyman.survey.exceptions |
Survey exceptions.
|
Modifier and Type | Method and Description |
---|---|
static void |
SurveyMan.analyze(Survey survey,
Analyses analyses,
Classifier classifier,
int n,
double granularity,
double alpha,
String outputFile,
String resultsfile,
boolean smoothing)
Analyzes the survey.
|
Modifier and Type | Method and Description |
---|---|
static Simulation.ROC |
Simulation.analyze(Survey survey,
List<? extends SurveyResponse> surveyResponses,
Classifier classifier,
double alpha)
Classifies bad actors and returns classification results for the mix of respondents provided.
|
abstract void |
AbstractRule.check(Survey survey) |
static DynamicAnalysis.Report |
DynamicAnalysis.dynamicAnalysis(Survey survey,
List<DynamicAnalysis.DynamicSurveyResponse> responses,
Classifier classifier,
boolean smoothing,
double alpha) |
SurveyDatum |
IQuestionResponse.getAnswer()
Convenience method for getting a single answer, if this question is marked exclusive (i.e., radio button).
|
SurveyDatum |
DynamicAnalysis.QuestionResponse.getAnswer() |
List<SurveyDatum> |
IQuestionResponse.getAnswers()
Convenience method for getting a list of answers, if the question is marked not exclusive (i.e., checkbox).
|
List<SurveyDatum> |
DynamicAnalysis.QuestionResponse.getAnswers() |
List<? extends SurveyResponse> |
ISurveyResponseReader.readSurveyResponses(Survey s,
Reader r) |
static List<DynamicAnalysis.DynamicSurveyResponse> |
DynamicAnalysis.readSurveyResponses(Survey s,
Reader r)
Parses the responses to survey s contained in r.
|
List<? extends SurveyResponse> |
DynamicAnalysis.DynamicSurveyResponse.readSurveyResponses(Survey s,
Reader r) |
static List<DynamicAnalysis.DynamicSurveyResponse> |
DynamicAnalysis.readSurveyResponses(Survey s,
String filename)
Parses the responses to survey s contained in the file named filename.
|
static List<SurveyResponse> |
Simulation.simulate(Survey survey,
int totalResponses,
double percentAdversaries,
RandomRespondent.AdversaryType adversaryType,
AbstractRespondent profile)
Simulates responses to a survey.
|
static StaticAnalysis.Report |
StaticAnalysis.staticAnalysis(Survey survey,
Classifier classifier,
int n,
double granularity,
double alpha,
RandomRespondent.AdversaryType adversaryType) |
static void |
StaticAnalysis.wellFormednessChecks(Survey survey) |
Constructor and Description |
---|
DynamicAnalysis.QuestionResponse(Survey s,
String quid,
int qpos)
QuestionResponse constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
NonEmptySurvey.check(Survey survey) |
void |
SampleHomogenousMaps.check(Survey survey) |
void |
Reachability.check(Survey survey) |
void |
NoTopLevelBranching.check(Survey survey) |
void |
ExclusiveBranching.check(Survey survey) |
void |
Compactness.check(Survey survey) |
void |
BranchTop.check(Survey survey) |
void |
BranchParadigm.check(Survey survey) |
void |
BranchForward.check(Survey survey) |
void |
BranchConsistency.check(Survey survey) |
static int |
BranchParadigm.ensureBranchParadigms(Block b) |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
AbstractParser.boolType(String thing,
String col)
Returns the internal boolean representation of a boolean-valued input to CSV or JSON.
|
abstract Survey |
AbstractParser.parse()
The main entry point.
|
protected static Boolean |
AbstractParser.parseBool(Boolean bool,
String col,
String entry,
int lineNo,
int colNo)
Parses the boolean input and ensures that boolean values are consistent across option entries.
|
protected void |
AbstractParser.propagateBranchParadigm(Block b)
Traverses the structure of the block and its sub-blocks to ensure that the block/branch type is properly set.
|
protected void |
AbstractParser.propagateBranchParadigms(Survey survey)
Iterates over the top-level blocks of the survey and calls
AbstractParser.propagateBranchParadigm(edu.umass.cs.surveyman.survey.Block) . |
Modifier and Type | Method and Description |
---|---|
HashMap<String,ArrayList<CSVEntry>> |
CSVLexer.lex(Reader reader) |
Survey |
CSVParser.parse()
Parses the csv lexed by the input to the CSVParser's constructor.
|
Constructor and Description |
---|
CSVLexer(Reader reader) |
CSVLexer(Reader reader,
String sep) |
CSVLexer(Reader reader,
String sep,
String encoding) |
CSVLexer(String filename) |
CSVLexer(String filename,
String sep) |
CSVLexer(String filename,
String sep,
String encoding) |
Modifier and Type | Class and Description |
---|---|
class |
BranchException |
class |
HeaderException
Inner/nested classes
|
class |
MalformedBlockException
Inner/nested classes
|
class |
MalformedBooleanException |
class |
OptionException |
class |
SyntaxException |
Modifier and Type | Method and Description |
---|---|
Survey |
JSONParser.parse()
Validates and parses the survey.
|
Modifier and Type | Method and Description |
---|---|
void |
Interpreter.answer(Question q,
List<SurveyDatum> aList)
Answers question q with some list of answers.
|
double |
QCMetrics.averagePathLength()
Simulates the survey for 5000 uniform random respondents and returns the average path length.
|
WordingBiasStruct |
QCMetrics.calculateWordingBiases(List<? extends SurveyResponse> responses,
double alpha)
Searches for significant wording biases observed in survey responses.
|
ClassifiedRespondentsStruct |
QCMetrics.classifyResponses(List<? extends SurveyResponse> responses,
Classifier classifier,
double alpha)
Classifies the input responses according to the classifier.
|
protected List<Double> |
QCMetrics.computeMeans(SurveyResponse sr,
List<? extends SurveyResponse> responses,
Classifier classifier) |
boolean |
QCMetrics.entropyClassification(SurveyResponse sr,
List<? extends SurveyResponse> responses,
double alpha)
Return true if the response is valid, on the basis of an entropy-based metric.
|
double |
QCMetrics.getEntropyForResponse(SurveyResponse surveyResponse) |
Map<Question,Map<Question,CorrelationStruct>> |
QCMetrics.getFrequenciesOfRandomCorrelation()
Simulates a survey of 100% random uniform respondents over sampleSize and calculates a prior on false correlation.
|
double |
QCMetrics.getLLForResponse(SurveyResponse surveyResponse) |
Question |
Interpreter.getNextQuestion()
Returns the next question, according to the status of the interpreter.
|
SurveyResponse |
Interpreter.getResponse()
Returns an empty survey response.
|
boolean |
QCMetrics.logLikelihoodClassification(SurveyResponse sr,
List<? extends SurveyResponse> responses,
double alpha)
Returns true if the response is valid, on the basis of the log likelihood.
|
void |
QCMetrics.lpoClassification(List<? extends SurveyResponse> responses,
double epsilon)
Computes the validity of the input responses, based on the "Least popular option" metric.
|
Modifier and Type | Method and Description |
---|---|
static OrderBiasStruct |
OrderBias.calculateOrderBiases(Survey survey,
List<? extends SurveyResponse> responses,
double alpha)
Searches for significant order biases observed in survey responses.
|
Modifier and Type | Method and Description |
---|---|
AbstractRespondent |
RandomRespondent.copy() |
abstract AbstractRespondent |
AbstractRespondent.copy()
Returns a copy of this respondent type.
|
Constructor and Description |
---|
RandomRespondent(Survey survey,
RandomRespondent.AdversaryType adversaryType) |
Modifier and Type | Method and Description |
---|---|
static void |
EntropyStressTest.addOption(Survey survey) |
static void |
EntropyStressTest.addQuestion(Survey survey) |
static Survey |
EntropyStressTest.createSurvey(int numquestions,
int optionsarity) |
static void |
QCMetricsComparison.dumpData(Survey survey,
List<? extends SurveyResponse> surveyResponses,
String clz,
boolean honestRespondent,
OutputStreamWriter osw) |
static void |
QCMetricsComparison.experiment0(Survey survey,
String filename,
List<? extends SurveyResponse>... surveyRespondentsLists) |
static void |
QCMetricsComparison.experiment1(Survey survey,
List<? extends SurveyResponse> honestRespondents,
List<? extends SurveyResponse> badActors) |
static void |
QCMetricsComparison.experiment3(Survey survey,
String filename,
int clusters,
List<? extends SurveyResponse>... responseLists) |
static void |
QCMetricsComparison.experiment4(Survey survey,
String filename,
List<? extends SurveyResponse>... responseLists) |
static void |
QCMetricsComparison.experiment5(Survey survey,
String filename,
List<? extends SurveyResponse>... responseLists) |
static float[][] |
QCMetricsComparison.generateFeaturesForExperiment1(Survey survey,
List<? extends SurveyResponse> responses) |
static void |
OrderBiasTest.main(String[] args) |
static void |
QCMetricsComparison.main(String[] args) |
static void |
EntropyStressTest.main(String[] args)
Execute `java -cp /path/to/surveyman.jar edu.umass.cs.surveyman.samples.EntropyStressTest`.
|
static Survey |
JudgementTask.makeSurvey() |
Modifier and Type | Method and Description |
---|---|
static void |
StaticAnalysisServer.analyzeRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static Survey |
StaticAnalysisServer.parseCSV(javax.servlet.http.HttpServletRequest request) |
static Survey |
StaticAnalysisServer.parseJSON(javax.servlet.http.HttpServletRequest request) |
Modifier and Type | Class and Description |
---|---|
static class |
Question.MalformedOptionException
Thrown by the Parser.
|
static class |
Question.OptionNotFoundException
Thrown whenever the user or system attempts to find an option by text, input cell, etc.
|
Modifier and Type | Method and Description |
---|---|
void |
Block.addBlock(Block b)
Method to add a subblock to this block programmatically.
|
void |
Question.addOption(String surfaceText)
Add an option with the input surface text.
|
void |
Question.addOption(String surfaceText,
boolean exclusive,
boolean ordered)
Adds an option to the question.
|
void |
Question.addOption(SurveyDatum surveyDatum)
Adds the input surveyDatum as an answer option to the question.
|
void |
Question.addOption(SurveyDatum surveyDatum,
Block branchTo)
Adds an answer option as part of a branch question.
|
void |
Question.addOption(SurveyDatum surveyDatum,
Block branchTo,
boolean exclusive,
boolean ordered)
Adds an answer option as part of a branch question.
|
void |
Question.addOption(SurveyDatum surveyDatum,
boolean exclusive,
boolean ordered)
Adds the input surveyDatum as an answer option to the question.
|
void |
Question.addOptions(String... surfaceTexts)
Adds options with the input surface text.
|
void |
Survey.addQuestion(Question q) |
void |
Block.addQuestion(Question q) |
void |
Survey.addQuestions(Question... surveyQuestions)
Adds the questions provided in the arguments to a top level block and adds this block to the survey.
|
void |
Block.addQuestions(Question... questions) |
Block |
Question.getBranchDest(SurveyDatum c)
Returns the branch destination for the input question.
|
SurveyDatum |
Question.getOptById(String oid)
Returns the answer option associated with this question having the input
SurveyDatum identifier. |
SurveyDatum[] |
Question.getOptListByIndex()
Returns a sorted array of the answer options.
|
Question |
Survey.getQuestionById(String quid)
Returns the
Question object associated with the input question identifier. |
Question |
Survey.getQuestionByLineNo(int lineno)
Returns the
Question that contains the associated input line number. |
Question |
Survey.getQuestionByText(String text)
Returns the
Question whose surface text corresponds with the input. |
String |
Survey.jsonize() |
protected String |
Question.jsonize() |
String |
Block.jsonize() |
static String |
Block.jsonize(List<Block> blockList) |
protected static String |
Question.jsonize(List<Question> questionList) |
protected String |
Question.jsonizeOrdering() |
void |
Block.propagateBranchParadigm()
Sets the appropriate
Block.BranchParadigm for all connected blocks. |
double |
Question.responseToDouble(List<OptTuple> opts,
boolean noise)
Converts a response to a double precision representation, for use in clustering.
|
void |
Question.setBranchDest(SurveyDatum c,
Block dest)
Sets the branch destination of this question at the input option to the input destination.
|
Constructor and Description |
---|
Survey(Question... surveyQuestions) |
Modifier and Type | Class and Description |
---|---|
class |
BlockException |
class |
BranchConsistencyException |
class |
DuplicateQuestions |
class |
EmptySurveyException
A Survey must have some content.
|
class |
QuestionConsistencyException |
class |
QuestionNotFoundException |
class |
UnreachableBlockException |
Copyright © 2015. All rights reserved.