public class Problem extends Object
Describes the problem
For example, if we have the following training data:LABEL ATTR1 ATTR2 ATTR3 ATTR4 ATTR5 ----- ----- ----- ----- ----- ----- 1 0 0.1 0.2 0 0 2 0 0.1 0.3 -1.2 0 1 0.4 0 0 0 0 2 0 0.1 0 1.4 0.5 3 -0.1 -0.2 0.1 1.1 0.1 and bias = 1, then the components of problem are: l = 5 n = 6 y -> 1 2 1 2 3 x -> [ ] -> (2,0.1) (3,0.2) (6,1) (-1,?) [ ] -> (2,0.1) (3,0.3) (4,-1.2) (6,1) (-1,?) [ ] -> (1,0.4) (6,1) (-1,?) [ ] -> (2,0.1) (4,1.4) (5,0.5) (6,1) (-1,?) [ ] -> (1,-0.1) (2,-0.2) (3,0.1) (4,1.1) (5,0.1) (6,1) (-1,?)
Modifier and Type | Class and Description |
---|---|
static class |
Problem.LibLinearSolverType |
Modifier and Type | Field and Description |
---|---|
double |
bias
If bias >= 0, we assume that one additional feature is added to the
end of each data instance
|
gnu.trove.map.hash.TObjectIntHashMap<String> |
featureDict |
gnu.trove.map.hash.TIntObjectHashMap<String> |
featureInverseDict |
int |
l
the number of training data
|
int |
n
the number of features (including the bias feature if bias >= 0)
|
LibLinearFeature[][] |
x
array of sparse feature nodes
|
double[] |
y
an array containing the target values
|
Constructor and Description |
---|
Problem(Dataset dataset,
String reprentationName,
Label label,
Problem.LibLinearSolverType solverType) |
public gnu.trove.map.hash.TObjectIntHashMap<String> featureDict
public gnu.trove.map.hash.TIntObjectHashMap<String> featureInverseDict
public int l
public int n
public double[] y
public LibLinearFeature[][] x
public double bias
public Problem(Dataset dataset, String reprentationName, Label label, Problem.LibLinearSolverType solverType)
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.