All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weka.classifiers.functions.supportVector.Puk Maven / Gradle / Ivy

Go to download

The Waikato Environment for Knowledge Analysis (WEKA), a machine learning workbench. This version represents the developer version, the "bleeding edge" of development, you could say. New functionality gets added to this version.

There is a newer version: 3.9.6
Show newest version
/*
 *   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 .
 */

/*
 *    Puk.java
 *    Copyright (C) 2007-2012 University of Waikato, Hamilton, New Zealand
 *
 */

package weka.classifiers.functions.supportVector;

import java.util.Collections;
import java.util.Enumeration;
import java.util.Vector;

import weka.core.Capabilities;
import weka.core.Capabilities.Capability;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.Option;
import weka.core.RevisionUtils;
import weka.core.TechnicalInformation;
import weka.core.TechnicalInformation.Field;
import weka.core.TechnicalInformation.Type;
import weka.core.TechnicalInformationHandler;
import weka.core.Utils;

/**
 *  The Pearson VII function-based universal kernel.
*
* For more information see:
*
* B. Uestuen, W.J. Melssen, L.M.C. Buydens (2006). Facilitating the application * of Support Vector Regression by using a universal Pearson VII function based * kernel. Chemometrics and Intelligent Laboratory Systems. 81:29-40. *

* * * Valid options are: *

* *

 * -D
 *  Enables debugging output (if available) to be printed.
 *  (default: off)
 * 
* *
 * -C <num>
 *  The size of the cache (a prime number), 0 for full cache and 
 *  -1 to turn it off.
 *  (default: 250007)
 * 
* *
 * -O <num>
 *  The Omega parameter.
 *  (default: 1.0)
 * 
* *
 * -S <num>
 *  The Sigma parameter.
 *  (default: 1.0)
 * 
* * * * @author Bernhard Pfahringer ([email protected]) * @version $Revision: 14512 $ */ public class Puk extends CachedKernel implements TechnicalInformationHandler { /** for serialization */ private static final long serialVersionUID = 1682161522559978851L; /** The precalculated dotproducts of <inst_i,inst_i> */ protected double m_kernelPrecalc[]; /** Omega for the Puk kernel. */ protected double m_omega = 1.0; /** Sigma for the Puk kernel. */ protected double m_sigma = 1.0; /** Cached factor for the Puk kernel. */ protected double m_factor = 1.0; /** * default constructor - does nothing. */ public Puk() { super(); } /** * Constructor. Initializes m_kernelPrecalc[]. * * @param data the data to use * @param cacheSize the size of the cache * @param omega the exponent * @param sigma the bandwidth * @throws Exception if something goes wrong */ public Puk(Instances data, int cacheSize, double omega, double sigma) throws Exception { super(); setCacheSize(cacheSize); setOmega(omega); setSigma(sigma); buildKernel(data); } /** * Returns a string describing the kernel * * @return a description suitable for displaying in the explorer/experimenter * gui */ @Override public String globalInfo() { return "The Pearson VII function-based universal kernel.\n\n" + "For more information see:\n\n" + getTechnicalInformation().toString(); } /** * Returns an instance of a TechnicalInformation object, containing detailed * information about the technical background of this class, e.g., paper * reference or book this class is based on. * * @return the technical information about this class */ @Override public TechnicalInformation getTechnicalInformation() { TechnicalInformation result; result = new TechnicalInformation(Type.ARTICLE); result.setValue(Field.AUTHOR, "B. Uestuen and W.J. Melssen and L.M.C. Buydens"); result.setValue(Field.YEAR, "2006"); result .setValue( Field.TITLE, "Facilitating the application of Support Vector Regression by using a universal Pearson VII function based kernel"); result.setValue(Field.JOURNAL, "Chemometrics and Intelligent Laboratory Systems"); result.setValue(Field.VOLUME, "81"); result.setValue(Field.PAGES, "29-40"); result.setValue(Field.PDF, "http://www.cac.science.ru.nl/research/publications/PDFs/ustun2006.pdf"); return result; } /** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration




© 2015 - 2024 Weber Informatics LLC | Privacy Policy