forked from YahooArchive/samoa
-
Notifications
You must be signed in to change notification settings - Fork 1
Learner
Albert Bifet edited this page Oct 18, 2013
·
4 revisions
Learners are implemented in SAMOA as sub-topologies.
public interface Learner extends Serializable{
public void init(TopologyBuilder topologyBuilder, Instances dataset);
public Processor getInputProcessor();
public Stream getResultStream();
}
When a Task
object is initiated via init()
, the method init(...)
of Learner
is called, and the topology is added to the global topology of the task.
To create a new learner, it is only needed to add streams, processors and their connections to the topology in init(...)
, specify what is the processor that will manage the input stream of the learner in getInputProcessor()
, and finally, specify what is going to be the output stream of the learner with getResultStream()
.