📄 regparameters.java
字号:
/*
* 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 2 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: XELOPES Data Mining Library
* Description: The XELOPES library is an open platform-independent and data-source-independent library for Embedded Data Mining.
* Copyright: Copyright (c) 2002 Prudential Systems Software GmbH
* Company: ZSoft (www.zsoft.ru), Prudsys (www.prudsys.com)
* @author Michael Thess
* @author Victor Borichev
* @author Valentine Stepanenko (valentine.stepanenko@zsoft.ru)
* @version 1.0
*/
package com.prudsys.pdm.Models.Regression.SVM.Algorithms.RegularizationNetworks;
/**
* Parameters of regularization network.
*
*/
class RegParameters {
// Regularization network type:
public static final int C_SVC = 0;
public static final int NU_SVC = 1;
public static final int ONE_CLASS = 2;
public static final int EPSILON_SVR = 3;
public static final int NU_SVR = 4;
public static final int SPARSE_GRIDS = 5;
// Kernel type:
public static final int LINEAR = 0;
public static final int POLY = 1;
public static final int RBF = 2;
public static final int SIGMOID = 3;
// Grid type (only for sparse grids):
public static final int TENSOR_PRODUCT = 0;
public static final int SIMPLICIAL = 1;
// Types:
public int reg_type; // type of regularization network
public int kernel_type; // kernel type
public int grid_type; // grid type of sparse grids
// Parameters of the approximation functions:
public double degree; // for poly
public double gamma; // for poly/rbf/sigmoid
public double coef0; // for poly/sigmoid
public int level; // level of sparse grids
// These parameters are for training only:
public double cache_size; // in MB
public double eps; // stopping criteria
public double C; // for C_SVC, EPSILON_SVR, NU_SVR, SPARSE GRIDS
public int nr_weight; // for C_SVC
public int[] weight_label; // for C_SVC
public double[] weight; // for C_SVC
public double nu; // for NU_SVC, ONE_CLASS, and NU_SVR
public double p; // for EPSILON_SVR
public int shrinking; // use the shrinking heuristics
/**
* Constructor sets parameters to default values
* using the operation resetParameters().
*/
public RegParameters() {
resetParameters();
}
/**
* Resets the parameters to the default values.
*/
public void resetParameters() {
// Default values:
reg_type = C_SVC;
kernel_type = RBF;
grid_type = SIMPLICIAL;
degree = 3;
gamma = 0; // 1/k
coef0 = 0;
level = 0;
nu = 0.5;
cache_size = 40;
C = 1;
eps = 1e-3;
p = 0.1;
shrinking = 1;
nr_weight = 0;
weight_label = new int[0]; //0
weight = new double[0]; //0
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -