📄 dbscanclusteringoperatorresult.java
字号:
package xmu.hll.operation.result;
import xmu.hll.operation.operator.DBSCANClusteringOperator;
import com.prudsys.pdm.Core.MiningAttribute;
import com.prudsys.pdm.Core.MiningDataSpecification;
import com.prudsys.pdm.Core.MiningException;
import com.prudsys.pdm.Input.MiningStoredData;
import com.prudsys.pdm.Models.Clustering.ClusteringMiningModel;
import eti.bi.alphaminer.core.handler.ICaseHandler;
import eti.bi.alphaminer.operation.operator.INodeInfo;
import eti.bi.alphaminer.operation.result.OperatorResult;
import eti.bi.alphaminer.operation.result.view.PmmlView;
import eti.bi.alphaminer.patch.standard.operation.result.view.ClusteringDataView;
import eti.bi.alphaminer.patch.standard.operation.result.view.ClusteringGraphView;
import eti.bi.alphaminer.patch.standard.operation.result.view.ClusteringTreeView;
import eti.bi.alphaminer.vo.IBIData;
import eti.bi.alphaminer.vo.IBIModel;
import eti.bi.alphaminer.vo.IBIObject;
import eti.bi.common.Locale.Resource;
import eti.bi.exception.SysException;
public class DBSCANClusteringOperatorResult extends OperatorResult {
private static final long serialVersionUID = 0xc2c584a68aa94cdaL;
private DBSCANClusteringOperator m_ClusteringOperator;
private ClusteringMiningModel m_ClusteringModel;
private MiningDataSpecification m_MetaData;
private MiningStoredData m_MiningStoredData;
private String m_ModelPMMLPath;
private MiningAttribute m_Attributes[];
public DBSCANClusteringOperatorResult(String a_CaseID, String a_NodeID, String a_Name, INodeInfo a_NodeInfo, ICaseHandler a_CaseHandler) throws Exception {
super((new StringBuilder(String.valueOf(a_Name))).append(Resource.srcStr("Result")).toString(), a_CaseID, a_NodeID, a_NodeInfo, a_CaseHandler);
}
protected void init() throws Exception {}
protected void getContent() throws SysException {
m_ClusteringOperator = (DBSCANClusteringOperator)m_Operator;
IBIObject aBIObject = m_ClusteringOperator.getOutputBIObject();
if(aBIObject == null || aBIObject.getBIModel() == null || aBIObject.getBIData() == null) {
throw new SysException("The input BIObject is NULL");
}
IBIModel aBIModel = aBIObject.getBIModel();
IBIData aBIData = aBIObject.getBIData();
m_ClusteringModel = (ClusteringMiningModel)aBIModel.getMiningModel();
m_MetaData = aBIData.getMetaData();
m_MiningStoredData = aBIData.getMiningStoredData();
m_Attributes = m_MetaData.getAttributesArray();
try {
m_Operator.writeTempModelFile();
m_ModelPMMLPath = aBIModel.getTempBIModelPath();
}
catch(SysException e) {
e.printStackTrace();
}
}
protected void createResult() throws SysException, MiningException, InterruptedException {
ClusteringTreeView treeView = new ClusteringTreeView(m_ClusteringModel, m_Attributes);
ClusteringGraphView graphView = new ClusteringGraphView(m_ClusteringModel, m_Attributes);
addView(treeView);
addView(graphView);
PmmlView pmmlView = new PmmlView(m_ModelPMMLPath, this);
try {
pmmlView.preparePmml();
pmmlView.showPmml();
addView(pmmlView);
}
catch(SysException e) {
e.printStackTrace();
m_SystemMessageHandler.appendMessage(e.getMessage());
}
ClusteringDataView dataView = new ClusteringDataView(m_ClusteringOperator);
addView(dataView);
setClosable(true);
setMaximizable(true);
setResizable(true);
setSize(700, 500);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -