Github user myui commented on a diff in the pull request:
https://github.com/apache/incubator-hivemall/pull/149#discussion_r191645232
--- Diff:
core/src/test/java/hivemall/fm/FieldAwareFactorizationMachineUDTFTest.java ---
@@ -256,6 +256,19 @@ public void testEarlyStopping() throws HiveException,
IOException {
cumulativeLoss > udtf._validationState.getCumulativeLoss());
}
+ @Test(expected = IllegalArgumentException.class)
+ public void testUnsupportedAdaptiveRegularizationOption() throws
Exception {
+
TestUtils.testGenericUDTFSerialization(FieldAwareFactorizationMachineUDTF.class,
+ new ObjectInspector[] {
+ ObjectInspectorFactory.getStandardListObjectInspector(
+
PrimitiveObjectInspectorFactory.javaStringObjectInspector),
+
PrimitiveObjectInspectorFactory.javaDoubleObjectInspector,
+ ObjectInspectorUtils.getConstantObjectInspector(
+
PrimitiveObjectInspectorFactory.javaStringObjectInspector,
+ "-seed 43 -adaptive_regularization")},
+ new Object[][] {{Arrays.asList("0:1:-2", "1:2:-1"), 1.0}});
--- End diff --
Better to compare accuracy against the default regularization. In general,
it should be better than the default one.
---