weka.classifiers.meta.multisearch.PerformanceCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multisearch-weka-package Show documentation
Show all versions of multisearch-weka-package Show documentation
Parameter optimization similar to GridSearch.
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/*
* PerformanceCache.java
* Copyright (C) 2008-2010 University of Waikato, Hamilton, New Zealand
*/
package weka.classifiers.meta.multisearch;
import java.io.Serializable;
import java.util.Hashtable;
import weka.core.setupgenerator.Point;
/**
* Represents a simple cache for performance objects.
*
* @author fracpete (fracpete at waikato dot ac dot nz)
* @version $Revision: 5156 $
*/
public class PerformanceCache
implements Serializable {
/** for serialization. */
private static final long serialVersionUID = 5838863230451530252L;
/** the cache for points in the space that got calculated. */
protected Hashtable m_Cache = new Hashtable();
/**
* returns the ID string for a cache item.
*
* @param cv the number of folds in the cross-validation
* @param values the point in the space
* @return the ID string
*/
protected String getID(int cv, Point