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 Problem
constructProblem
(List<Double> vy, List<Feature[]> vx, int max_index, double bias) private void
private void
private void
double
getBias()
(package private) int
(package private) boolean
static void
void
parse_command_line
(String[] argv) static Problem
readProblem
(File file, double bias) Deprecated.static Problem
readProblem
(File file, Charset charset, double bias) Deprecated.usereadProblem(Path, Charset, double)
insteadstatic Problem
readProblem
(InputStream inputStream, double bias) static Problem
readProblem
(InputStream inputStream, Charset charset, double bias) void
readProblem
(String filename) void
readProblem
(String filename, double bias) void
readProblem
(Path path) static Problem
readProblem
(Path path, double bias) reads a problem from LibSVM formatstatic Problem
readProblem
(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:
IOException
InvalidInputDataException
-
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:
IOException
InvalidInputDataException
-
readProblem
public static Problem readProblem(Path path, Charset charset, double bias) throws IOException, InvalidInputDataException - Throws:
IOException
InvalidInputDataException
-
readProblem
public static Problem readProblem(InputStream inputStream, double bias) throws IOException, InvalidInputDataException - Throws:
IOException
InvalidInputDataException
-
readProblem
public static Problem readProblem(InputStream inputStream, Charset charset, double bias) throws IOException, InvalidInputDataException - Throws:
IOException
InvalidInputDataException
-
readProblem
- Throws:
IOException
InvalidInputDataException
-
readProblem
- Throws:
IOException
InvalidInputDataException
-
readProblem
- Throws:
IOException
InvalidInputDataException
-
addToArray
private static int[] addToArray(int[] array, int newElement) -
addToArray
private static double[] addToArray(double[] array, double newElement) -
constructProblem
-
run
- Throws:
IOException
InvalidInputDataException
-
isFindParameters
boolean isFindParameters() -
getNumFolds
int getNumFolds()
-
readProblem(Path, double)
instead