public class Simulation extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Simulation.ROC |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
smoothing |
| Constructor and Description |
|---|
Simulation() |
| Modifier and Type | Method and Description |
|---|---|
static Simulation.ROC |
analyze(Survey survey,
List<? extends SurveyResponse> surveyResponses,
Classifier classifier,
double alpha)
Classifies bad actors and returns classification results for the mix of respondents provided.
|
static List<SurveyResponse> |
simulate(Survey survey,
int totalResponses,
double percentAdversaries,
RandomRespondent.AdversaryType adversaryType,
AbstractRespondent profile)
Simulates responses to a survey.
|
public static List<SurveyResponse> simulate(Survey survey, int totalResponses, double percentAdversaries, RandomRespondent.AdversaryType adversaryType, AbstractRespondent profile) throws SurveyException
survey - The survey to simulate.totalResponses - The total number of responses we want to simulate.percentAdversaries - The percentage of random actors we want to simulate.adversaryType - The type of adversary we want to test against.profile - An instance of the type of honest respondent we want to simulate.SurveyExceptionpublic static Simulation.ROC analyze(Survey survey, List<? extends SurveyResponse> surveyResponses, Classifier classifier, double alpha) throws SurveyException
survey - The survey we wish to simulate.surveyResponses - The set of responses we wish to analyze. This will typically be a mix of some simulated
responses.classifier - The classification method to use.alpha - A double between 0 and 1 used for various purposes by the classifiers. Sometimes alpha is used to
define a confidence region. Sometimes it is used to define some small difference between real
numers. Its exact meaning is determined by the classification method indicated by the classifier
argument.SurveyExceptionCopyright © 2015. All rights reserved.