📄 statisticssettings.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.Models.Statistics;
import java.util.Vector;
import com.prudsys.pdm.Core.MiningAttribute;
import com.prudsys.pdm.Core.MiningModel;
import com.prudsys.pdm.Core.MiningSettings;
/**
* Parameters for computing statistic-based models. <p>
*
* From CWM Data Mining. <p>
*
* Superclasses:
* <ul>
* <li> MiningSettings
* </ul>
* Constraints:
* <ul>
* <li> Function must specify "StatisticalAnalysis".
* </ul>
*
* Additions from PDM CWM extension. <p>
*
* References added:
* <ul>
* <li> <i>univariateTarget</i>: Reference MiningAttribute as Univariate Target. <br>
* - class: MiningAttribute <br>
* - multiplicity: exactly one
* <li> <i>multivariateTarget1</i>: Reference MiningAttribute as first Multivariate Target. <br>
* - class: MiningAttribute <br>
* - multiplicity: exactly one
* <li> <i>multivariateTarget2</i>: Reference MiningAttribute as second Multivariate Target. <br>
* - class: MiningAttribute <br>
* - multiplicity: exactly one
* </ul>
*
* @see MiningAttribute
*/
public class StatisticsSettings extends MiningSettings
{
private MiningAttribute univariateTarget;
private MiningAttribute multivariateTarget1;
private MiningAttribute multivariateTarget2;
private Vector grouping = new Vector();
/**
* @roseuid 3C5EAB760036
*/
public StatisticsSettings() {
this.setFunction( MiningModel.STATISTICAL_ANALYSIS_FUNCTION );
}
/**
* Verify settings. Call super class method (of MiningSettings) for
* verifying settings and checks whether at least one target attribute
* is defined. If settings are incomplete an illegal argument exception
* is thrown.
*
* @exception IllegalArgumentException exception that is thrown for incomplete settings
*/
public void verifySettings() throws IllegalArgumentException
{
super.verifySettings();
if( univariateTarget == null )
{
if( multivariateTarget1 == null || multivariateTarget2 == null )
{
throw new IllegalArgumentException( "Attribute Target can't be null." );
}
}
}
/**
* Get vector of grouping attributes (elements are of the type
* GroupingParameter).
*
* @return vector of grouping attributes
* @see GroupingParameter
*/
public Vector getGrouping()
{
return grouping;
}
/**
* Sets vector of grouping attributes (elements must be of the type
* GroupingParameter).
*
* @param grouping new vector of grouping attributes
* @see GroupingParameter
*/
public void setGrouping(Vector grouping)
{
this.grouping = grouping;
}
/**
* Returns univariate target attribute.
*
* @return univariate target attribute
*/
public MiningAttribute getUnivariateTarget() {
return univariateTarget;
}
/**
* Sets univariate target attribute.
*
* @param uniTarget new univariate target attribute
*/
public void setUnivariateTarget(MiningAttribute uniTarget) {
this.univariateTarget = uniTarget;
}
/**
* Returns first multivariate target attribute.
*
* @return first multivariate target attribute
*/
public MiningAttribute getMultivariateTarget1()
{
return multivariateTarget1;
}
/**
* Sets first multivariate target attribute.
*
* @param multivariateTarget1 first multivariate target attribute
*/
public void setMultivariateTarget1(MiningAttribute multivariateTarget1)
{
this.multivariateTarget1 = multivariateTarget1;
}
/**
* Returns second multivariate target attribute.
*
* @return second multivariate target attribute
*/
public MiningAttribute getMultivariateTarget2()
{
return multivariateTarget2;
}
/**
* Sets second multivariate target attribute.
*
* @param multivariateTarget2 second multivariate target attribute
*/
public void setMultivariateTarget2(MiningAttribute multivariateTarget2)
{
this.multivariateTarget2 = multivariateTarget2;
}
/**
* Returns settings as string.
*
* @return settings as string
*/
public String toString()
{
return "Statistics";
}
/**
* Returns settings as HTML string.
*
* @return settings as HTML string
*/
public String toHtmlString()
{
String description = "Model type:<br>Statistics<br>";
return description;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -