📄 evaluationmatrix.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.
*/
/*
* Created on 2005-1-27
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package eti.bi.alphaminer.patch.standard.operation.operator;
/**
* @author fxu
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class EvaluationMatrix {
private String m_ModelName;
private String m_DataName;
private String[] m_ClassNames;
private String[] m_StatisticsNames;
private double[][] m_ConfusionMatrixElements;
private double[][] m_StatisticsMatrixElements;
private double m_OverallPrecision;
private int m_ClassNumber;
private int m_StatisticsQuantityNumber;
public EvaluationMatrix(){
}
public EvaluationMatrix(String modelName,
String dataName,
String [] classNames,
String [] statisticsNames){
m_ModelName = modelName;
m_DataName = dataName;
m_ClassNames = (String [])classNames.clone();
m_StatisticsNames = (String [])statisticsNames.clone();
m_ClassNumber = m_ClassNames.length;
m_StatisticsQuantityNumber = m_StatisticsNames.length;
if(m_ClassNumber > 0){
m_ConfusionMatrixElements = new double[m_ClassNumber][m_ClassNumber];
}
if(m_ClassNumber > 0 && m_StatisticsQuantityNumber > 0){
m_StatisticsMatrixElements = new double[m_ClassNumber][m_StatisticsQuantityNumber];
}
m_OverallPrecision = -1;
}
/**
* @return Returns the m_ClassNames.
*/
public String[] getM_ClassNames() {
return m_ClassNames;
}
/**
* @param classNames The m_ClassNames to set.
*/
public void setM_ClassNames(String[] classNames) {
m_ClassNames = classNames;
}
/**
* @return Returns the m_ConfusionMatrixElements.
*/
public double[][] getM_ConfusionMatrixElements() {
return m_ConfusionMatrixElements;
}
/**
* @param confusionMatrixElements The m_ConfusionMatrixElements to set.
*/
public void setM_ConfusionMatrixElements(double[][] confusionMatrixElements) {
m_ConfusionMatrixElements = confusionMatrixElements;
}
/**
* @return Returns the m_DataName.
*/
public String getM_DataName() {
return m_DataName;
}
/**
* @param dataName The m_DataName to set.
*/
public void setM_DataName(String dataName) {
m_DataName = dataName;
}
/**
* @return Returns the m_ModelName.
*/
public String getM_ModelName() {
return m_ModelName;
}
/**
* @param modelName The m_ModelName to set.
*/
public void setM_ModelName(String modelName) {
m_ModelName = modelName;
}
/**
* @return Returns the m_StatisticsMatrixElements.
*/
public double[][] getM_StatisticsMatrixElements() {
return m_StatisticsMatrixElements;
}
/**
* @param statisticsMatrixElements The m_StatisticsMatrixElements to set.
*/
public void setM_StatisticsMatrixElements(
double[][] statisticsMatrixElements) {
m_StatisticsMatrixElements = statisticsMatrixElements;
}
/**
* @return Returns the m_StatisticsNames.
*/
public String[] getM_StatisticsNames() {
return m_StatisticsNames;
}
/**
* @param statisticsNames The m_StatisticsNames to set.
*/
public void setM_StatisticsNames(String[] statisticsNames) {
m_StatisticsNames = statisticsNames;
}
/**
* @return Returns the m_OverallPrecision.
*/
public double getM_OverallPrecision() {
return m_OverallPrecision;
}
/**
* @param overallPrecision The m_OverallPrecision to set.
*/
public void setM_OverallPrecision(double overallPrecision) {
m_OverallPrecision = overallPrecision;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -