com.github.bentorfs.ai.common.FunctionLearner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ai-algorithms Show documentation
Show all versions of ai-algorithms Show documentation
A collection of well-known AI and machine learning algorithms
The newest version!
package com.github.bentorfs.ai.common;
import java.util.List;
/**
* Generic interface for a function learning algorithm.
*
* The attributes of the shown values must have a proper hashcode/equals, of course.
*
* @author betorfs
*
* @param
* The type of the attributes
* @param
* The type of the target output
*/
public interface FunctionLearner {
/**
* Predict the value for the given list of attributes, based on the examples seen so far
*/
public T predictValue(List attributes);
/**
* Show the learner an example, containing its list of attributes, and the target value
*/
public void showExample(T value, List attributes);
}