
org.ranksys.javafm.learner.FMLearner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JavaFM Show documentation
Show all versions of JavaFM Show documentation
Java 8 Factorization Machines Library.
The newest version!
/*
* Copyright (C) 2016 RankSys http://ranksys.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.ranksys.javafm.learner;
import org.ranksys.javafm.FM;
import org.ranksys.javafm.data.FMData;
/**
* Learner of factorisation machines.
*
* @author Saúl Vargas ([email protected])
*/
public interface FMLearner {
public double error(FM fm, D test);
/**
* Learns a pre-initialised factorisation machine. Reports the error on the test set.
*
* @param fm pre-initialised factorisation machine
* @param train train set
* @param test test set
*/
public void learn(FM fm, D train, D test);
/**
* Learns a pre-initialised factorisation machine. Reports the error on the train set.
*
* @param fm pre-initialised factorisation machine
* @param train train set
*/
public default void learn(FM fm, D train) {
learn(fm, train, train);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy