001/** 002 * DeepNetts is pure Java Deep Learning Library with support for Backpropagation 003 * based learning and image recognition. 004 * 005 * Copyright (C) 2017 Zoran Sevarac <sevarac@gmail.com> 006 * 007 * This file is part of DeepNetts. 008 * 009 * DeepNetts is free software: you can redistribute it and/or modify 010 * it under the terms of the GNU General Public License as published by 011 * the Free Software Foundation, either version 3 of the License, or 012 * (at your option) any later version. 013 * 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Public License for more details. 017 * 018 * You should have received a copy of the GNU General Public License 019 * along with this program. If not, see <https://www.gnu.org/licenses/>.package deepnetts.core; 020 */ 021 022package javax.visrec.ml.eval; 023 024/** 025 * Evaluation method for specified types of machine learning model and data set. 026 * All evaluators implement this interface. 027 * 028 * @param <MODEL_CLASS> Model class 029 * @param <DATASET_CLASS> Data set class 030 * 031 * @author Zoran Sevarac 032 * @since 1.0 033 */ 034@FunctionalInterface 035public interface Evaluator<MODEL_CLASS, DATASET_CLASS> { 036 037 /** 038 * Evaluate a model with specified test set. 039 * 040 * @param model A model to evaluate 041 * @param testSet Data to use for evaluation 042 * @return evaluation metrics for the model for the specified test set 043 */ 044 public EvaluationMetrics evaluate(MODEL_CLASS model, DATASET_CLASS testSet); 045 046}