Skip to content

Commit 61a581c

Browse files
committed
Port "linear.cpp (check_parameter): only check value of p if L2R_L2LOSS_SVR."
Ported from cjlin1/liblinear@13d4a25
1 parent ed6c800 commit 61a581c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/de/bwaldvogel/liblinear/Linear.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ public static Model train(Problem prob, Parameter param) {
20562056
if (param.C <= 0) {
20572057
throw new IllegalArgumentException("C <= 0");
20582058
}
2059-
if (param.p < 0) {
2059+
if (param.p < 0 && param.solverType == L2R_L2LOSS_SVR) {
20602060
throw new IllegalArgumentException("p < 0");
20612061
}
20622062

0 commit comments

Comments
 (0)