public class SurveyMan extends Object
make package
from the
top level of the directory. Then call java -jar target/surveyman-x.y.jar
, which will print out
instructions for running survey programs, the kinds of arguments you should use, etc.
If you are using SurveyMan programmatically, look at the description of how main is called.Modifier and Type | Field and Description |
---|---|
static org.apache.logging.log4j.Logger |
LOGGER
If SurveyMan is not called as a command line program, then this class simply provides a single instance of the
logger.
|
Modifier and Type | Method and Description |
---|---|
static void |
analyze(Survey survey,
Analyses analyses,
Classifier classifier,
int n,
double granularity,
double alpha,
String outputFile,
String resultsfile,
boolean smoothing)
Analyzes the survey.
|
static void |
main(String[] args)
The main entry point for the program.
|
public static final org.apache.logging.log4j.Logger LOGGER
public static void analyze(Survey survey, Analyses analyses, Classifier classifier, int n, double granularity, double alpha, String outputFile, String resultsfile, boolean smoothing) throws IOException, SurveyException, com.github.fge.jsonschema.core.exceptions.ProcessingException
survey
- The survey object.analyses
- The type of analysis to run: static or dynamic.classifier
- The type of classifier to use for bad actors.n
- The total number of respondents to simulate (if running static analysis).granularity
- The granularity of random respondents to increment by, for static analysis.alpha
- The cutoff.outputFile
- The file to write results to.resultsfile
- The file containing results from running a survey (if running dynamic analyses).smoothing
- Boolean indicating whether the system should use Laplace smoothing for question options.IOException
com.github.fge.jsonschema.core.exceptions.ProcessingException
SurveyException
public static void main(String[] args)
AbstractLexer lexer = new CSVLexer("my_survey.csv", ",");
AbstractParser parser = new CSVParser(lexer);
Survey survey = parser.parse();
AbstractRule.getDefaultRules();
SurveyMan.analyze(survey, analyses, classifier, n, granularity, alpha, outputfile, resultsfile, smoothing);
args
- Arguments the top-level program. Execute java -jar target/surveyman-x.y.jar
for guidance.Copyright © 2015. All rights reserved.