Package de.bwaldvogel.liblinear
Class Train
java.lang.Object
de.bwaldvogel.liblinear.Train
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static double[]addToArray(double[] array, double newElement) private static int[]addToArray(int[] array, int newElement) private static ProblemconstructProblem(List<Double> vy, List<Feature[]> vx, int max_index, double bias) private voidprivate voidprivate voiddoublegetBias()(package private) int(package private) booleanstatic voidvoidparse_command_line(String[] argv) static ProblemreadProblem(File file, double bias) Deprecated.static ProblemreadProblem(File file, Charset charset, double bias) Deprecated.usereadProblem(Path, Charset, double)insteadstatic ProblemreadProblem(InputStream inputStream, double bias) static ProblemreadProblem(InputStream inputStream, Charset charset, double bias) voidreadProblem(String filename) voidreadProblem(String filename, double bias) voidreadProblem(Path path) static ProblemreadProblem(Path path, double bias) reads a problem from LibSVM formatstatic ProblemreadProblem(Path path, Charset charset, double bias) private void
-
Field Details
-
bias
private double bias -
find_parameters
private boolean find_parameters -
C_specified
private boolean C_specified -
P_specified
private boolean P_specified -
solver_specified
private boolean solver_specified -
cross_validation
private boolean cross_validation -
inputFilename
-
modelFilename
-
nr_fold
private int nr_fold -
param
-
prob
-
-
Constructor Details
-
Train
public Train()
-
-
Method Details
-
main
- Throws:
IOExceptionInvalidInputDataException
-
do_find_parameters
private void do_find_parameters() -
do_cross_validation
private void do_cross_validation() -
exit_with_help
private void exit_with_help() -
getProblem
-
getBias
public double getBias() -
getParameter
-
parse_command_line
-
readProblem
public static Problem readProblem(File file, double bias) throws IOException, InvalidInputDataException Deprecated.usereadProblem(Path, double)insteadreads a problem from LibSVM format- Parameters:
file- the SVM file- Throws:
IOException- obviously in case of any I/O exception ;)InvalidInputDataException- if the input file is not correctly formatted
-
readProblem
public static Problem readProblem(Path path, double bias) throws IOException, InvalidInputDataException reads a problem from LibSVM format- Throws:
IOException- obviously in case of any I/O exception ;)InvalidInputDataException- if the input file is not correctly formatted
-
readProblem
public static Problem readProblem(File file, Charset charset, double bias) throws IOException, InvalidInputDataException Deprecated.usereadProblem(Path, Charset, double)instead- Throws:
IOExceptionInvalidInputDataException
-
readProblem
public static Problem readProblem(Path path, Charset charset, double bias) throws IOException, InvalidInputDataException - Throws:
IOExceptionInvalidInputDataException
-
readProblem
public static Problem readProblem(InputStream inputStream, double bias) throws IOException, InvalidInputDataException - Throws:
IOExceptionInvalidInputDataException
-
readProblem
public static Problem readProblem(InputStream inputStream, Charset charset, double bias) throws IOException, InvalidInputDataException - Throws:
IOExceptionInvalidInputDataException
-
readProblem
- Throws:
IOExceptionInvalidInputDataException
-
readProblem
- Throws:
IOExceptionInvalidInputDataException
-
readProblem
- Throws:
IOExceptionInvalidInputDataException
-
addToArray
private static int[] addToArray(int[] array, int newElement) -
addToArray
private static double[] addToArray(double[] array, double newElement) -
constructProblem
-
run
- Throws:
IOExceptionInvalidInputDataException
-
isFindParameters
boolean isFindParameters() -
getNumFolds
int getNumFolds()
-
readProblem(Path, double)instead