de.hsheilbronn.mi.process.SvmClassifier Maven / Gradle / Ivy
/*-
* ========================LICENSE_START=================================
* zlibsvm-api
* %%
* Copyright (C) 2014 - 2016 Heilbronn University - Medical Informatics
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================LICENSE_END==================================
*/
package de.hsheilbronn.mi.process;
import de.hsheilbronn.mi.configuration.SvmType;
import de.hsheilbronn.mi.domain.SvmDocument;
import de.hsheilbronn.mi.exception.ClassificationCoreException;
import java.util.List;
/**
* A Classifier using LIBSVM for classification.
*
* @author rz
*/
public interface SvmClassifier {
/**
* Classifies the given documents.
*
* @param documents must not be null
or an empty {@link List list}.
* @param probabilityEstimates true
for probability estimates else false. Note well,
* that this is only supported by SVC or SVR SVMs(see {@link SvmType})
* @return classified documents
* @throws AssertionError Thrown if a given parameter is invalid.
* @throws ClassificationCoreException Thrown if the underlaying model does not support probability estimates.
*/
List classify(List documents, boolean probabilityEstimates);
}