- 138
- 0
- 约3.4万字
- 约 104页
- 2022-10-17 发布于重庆
- 举报
Note on nominal classes: If youre interested in the distribution over all the classes, use the method distributionForInstance(Instance). This method returns a double array with the probability for each class. The returned double value from classifyInstance (or the index in the array returned by distributionForInstance) is just the index for the string values in the attribute. I.e., if you want the string representation for the above returned class label clsLabel, then you can, e.g., print it like this: System.out.println(clsLabel + - + unlabeled.classAttribute().value((int) clsLabel)); WEKA教程完整版(新)全文共104页,当前为第95页。 Building a Clusterer Batch 和分类器用buildClassifier(Instances) 建立类似,聚类(器)用buildClusterer(Instances) 建立。下列代码片段(code snippet )实现了EM聚类算法,最大迭代次数为100 import weka.clusterers.EM; ... String[] options = new String[2]; options[0] = -I; // max. iterations options[1] = 100; EM clusterer = new EM(); // new instance of clusterer clusterer.setOptions(options); // set the options clusterer.buildClusterer(data); // build the clusterer WEKA教程完整版(新)全文共104页,当前为第96页。 Building a Clusterer Incremental 实现了weka.clusterers.UpdateableClusterer接口的聚类器可以进行增量聚类。 训练增量式聚类器的过程: Call buildClusterer(Instances) with the structure of the dataset (may or may not contain any actual data rows). Subsequently call the updateClusterer(Instance) method to feed the clusterer one by one. Call updateFinished() after all Instance objects have been processed, for the clusterer to perform additional computations. WEKA教程完整版(新)全文共104页,当前为第97页。 示例 // load data ArffLoader loader = new ArffLoader(); loader.setFile(new File(/some/where/data.arff)); Instances structure = loader.getStructure(); ? // train Cobweb Cobweb cw = new Cobweb(); cw.buildClusterer(structure); Instance current; while ((current = loader.getNextInstance(structure)) != null) cw.updateClusterer(current); cw.updateFinished(); WEKA教程完整版(新)全文共104页,当前为第98页。 Evaluating a clusterer 可用ClusterEvaluation 类评价一个聚类器。以下代码片段输出了算法发
您可能关注的文档
- (完整版)授权声明-教育部留学服务中心.doc
- (完整版)有趣的不倒翁教学设计.doc
- (完整版)浙教版八年级上科学知识点总结-推荐文档.doc
- 《戴维宁定理》-说课.ppt
- 《儿科护理学》课程标准.doc
- 《肩肘倒立》单元教学计划.doc
- 《跨境电商实务》教案(2020).docx
- 《图形创意》教案课件.doc
- 《组合图形的面积》数学教案(精选5篇).docx
- 【智能数据与零售】零售业数字化营销的未来.pptx
- 2026年中国窗饰产品市场全景调查与市场供需预测报告.docx
- 2026年中国船舶水下清洗行业深度研究报告:市场需求预测、进入壁垒及投资风险.docx
- 2026年中国船用绞车行业运行态势及十五五盈利前景预测报告.docx
- 2026年中国橱柜行业深度调研报告.docx
- 2026年中国船用绞车市场深度调研及投资前景战略分析报告.docx
- 2026年中国船用配套设备市场发展策略及投资潜力可行性预测报告.docx
- 2026年中国储能材料行业运营态势与投资前景预测分析报告.docx
- 2026年中国储氢材料行业运营现状及发展规划分析报告.docx
- 2026年中国传真机市场深度研究及投资前景咨询报告.docx
- 2026年中国储能变流器(PCS)产业深度评估与发展前景趋势分析研究报告.docx
原创力文档

文档评论(0)