Github user myui commented on a diff in the pull request:
https://github.com/apache/incubator-hivemall/pull/149#discussion_r190843344
--- Diff: core/src/main/java/hivemall/fm/FactorizationMachineUDTF.java ---
@@ -352,9 +352,13 @@ private static void writeBuffer(@Nonnull ByteBuffer
srcBuf, @Nonnull NioStateful
srcBuf.clear();
}
+ protected void checkInputVector(@Nonnull final Feature[] x) throws
HiveException {
+ _model.check(x);
+ }
+
public void train(@Nonnull final Feature[] x, final double y,
final boolean adaptiveRegularization) throws HiveException {
- _model.check(x);
+ checkInputVector(x);
try {
if (adaptiveRegularization) {
--- End diff --
I think there are no need to share `train` if `adaptiveRegularization` is
always be off for FFM and `early_stopping` is always off for FM. The logic in
train becomes complex.
---