com.joliciel.talismane.machineLearning.ClassificationMultiModelTrainer Maven / Gradle / Ivy
///////////////////////////////////////////////////////////////////////////////
//Copyright (C) 2014 Joliciel Informatique
//
//This file is part of Talismane.
//
//Talismane is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//Talismane is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with Talismane. If not, see .
//////////////////////////////////////////////////////////////////////////////
package com.joliciel.talismane.machineLearning;
import java.io.File;
import java.util.List;
import java.util.Map;
/**
* Trains multiple models instead of a single model. This allows us to collect
* features a single time, and process them many times, in cases where feature
* collection is a costly activity. In order to avoid keeping all models in
* memory, models will be directly written to disk in a given directory.
*
* @author Assaf Urieli
*
*/
public interface ClassificationMultiModelTrainer extends ClassificationModelTrainer {
/**
* Return the ClassificationModel trained using the CorpusEventStream
* provided.
*
* @param corpusEventStream
* the event stream containing the events to be used for training
* @param featureDescriptors
* the feature descriptors required to apply this model to new data.
*/
public void trainModels(ClassificationEventStream corpusEventStream, List featureDescriptors);
/**
* Return the ClassificationModel trained using the CorpusEventStream
* provided.
*
* @param corpusEventStream
* the event stream containing the events to be used for training
* @param descriptors
* all of the descriptors required to perform analysis using this
* model (e.g. feature descriptors, etc.)
*/
public void trainModels(ClassificationEventStream corpusEventStream, Map> descriptors);
/**
* Set parameters for this trainer type.
*/
public void setParameterSets(List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy