|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectliblinear.Problem
public class Problem
Problem 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,?)
| Field Summary | |
|---|---|
double |
bias
If bias >= 0, we assume that one additional feature is added to the end of each data instance |
int |
l
the number of training data |
int |
n
the number of features (including the bias feature if bias >= 0) |
FeatureNode[][] |
x
array of sparse feature nodes |
int[] |
y
an array containing the target values |
| Constructor Summary | |
|---|---|
Problem()
|
|
| Method Summary | |
|---|---|
static Problem |
readFromFile(java.io.File file,
double bias)
see Train.readProblem(File, double) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int l
public int n
public int[] y
public FeatureNode[][] x
public double bias
| Constructor Detail |
|---|
public Problem()
| Method Detail |
|---|
public static Problem readFromFile(java.io.File file,
double bias)
throws java.io.IOException,
InvalidInputDataException
Train.readProblem(File, double)
java.io.IOException
InvalidInputDataException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||