📄 miningalgorithmspecification.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 Valentine Stepanenko (valentine.stepanenko@zsoft.ru)
* @version 1.0
*/
package com.prudsys.pdm.Core;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Vector;
import com.prudsys.pdm.Utils.AlgorithmSpecification.AlgorithmParameter;
import com.prudsys.pdm.Utils.AlgorithmSpecification.AlgorithmSpecification;
import com.prudsys.pdm.Utils.AlgorithmSpecification.MiningAlgorithms;
import eti.bi.alphaminer.operation.operator.INodeInfo;
import eti.bi.common.System.SysConfig;
/**
* MiningAlgorithmSpecification is a collection of MiningAlgorithmParameter that
* drive the MiningModel.
*/
public class MiningAlgorithmSpecification extends com.prudsys.pdm.Cwm.Core.Class
{
// -----------------------------------------------------------------------
// Variables declarations
// -----------------------------------------------------------------------
/** Name of the mining algorithm. Now inherited from ModelElement. */
// private String name;
/** Function type of the mining algorithm. */
private String function;
/** Algorithm type of the mining algorithm. */
private String algorithm;
/** Class path of the mining algorithm class. */
private String classname;
/** Version of the mining algorithm. */
private String version;
/** Description of the mining algorithm. */
private String description;
/** Array of the mining algorithm parameters of the mining algorithm. */
private MiningAlgorithmParameter inputAttribute[];
/** Path of the algorithms XML file. */
private static URL algorithmsFileURL;
// -----------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------
/**
* Empty constructor.
*/
public MiningAlgorithmSpecification()
{
}
// -----------------------------------------------------------------------
// Getter and setter methods
// -----------------------------------------------------------------------
/**
* Returns function name of algorithm.
*
* @return function name
*/
public String getFunction()
{
return function;
}
/**
* Sets new function name of algorithm.
*
* @param function new function name
*/
public void setFunction(String function)
{
this.function = function;
}
/**
* Returns algorithm type name.
*
* @return algorithm type name
*/
public String getAlgorithm()
{
return algorithm;
}
/**
* Sets algorithm type name.
*
* @param algorithm new algorithm type name
*/
public void setAlgorithm(String algorithm)
{
this.algorithm = algorithm;
}
/**
* Returns fully qualified class name of algorithm.
*
* @return class name of algorithm
*/
public String getClassname()
{
return classname;
}
/**
* Sets new class name of algorithm.
*
* @param classname new class name of algorithm
*/
public void setClassname(String classname)
{
this.classname = classname;
}
/**
* Returns version of algorithm.
*
* @return version of algorithm
*/
public String getVersion()
{
return version;
}
/**
* Sets version of algorithm.
*
* @param version new version of algorithm
*/
public void setVersion(String version)
{
this.version = version;
}
/**
* Returns description of algorithm.
*
* @return description of algorithm
*/
public String getDescription()
{
return description;
}
/**
* Sets description of algorithm.
*
* @param description new description of algorithm
*/
public void setDescription(String description)
{
this.description = description;
}
/**
* Returns mining parameters of algorithm.
*
* @return mining parameters of algorithm
*/
public MiningAlgorithmParameter[] getInputAttribute()
{
return inputAttribute;
}
/**
* Sets mining parameters of algorithm.
*
* @param inputAttribute new mining parameters of algorithm
*/
public void setInputAttribute(MiningAlgorithmParameter[] inputAttribute)
{
this.inputAttribute = inputAttribute;
}
/**
* Change default file name of the algorithms specification xml file
* @param newAlgorithmsFileURL - new URL
*/
public static void setAlgorithmsFileNURL(URL newAlgorithmsFileURL)
{
algorithmsFileURL = newAlgorithmsFileURL;
}
/**
* Assigns new value to a mining algorithm parameter (MAP).
*
* @param miningAlgorithmParameterName name of MAP
* @param miningAlgorithmParameterValue new value of MAP
* @return true if MAP found and value set, otherwise false
*/
public boolean setMAPValue(String miningAlgorithmParameterName,
String miningAlgorithmParameterValue) {
if (inputAttribute == null || miningAlgorithmParameterName == null)
return false;
for (int i = 0; i < inputAttribute.length; i++) {
if (inputAttribute[i].getName().equals(miningAlgorithmParameterName)) {
inputAttribute[i].setValue(miningAlgorithmParameterValue);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -