本文整理了Java中weka.core.Instances.toString()
方法的一些代码示例,展示了Instances.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instances.toString()
方法的具体详情如下:
包路径:weka.core.Instances
类名称:Instances
方法名:toString
[英]Returns the dataset as a string in ARFF format. Strings are quoted if they contain whitespace characters, or if they are a question mark.
[中]以ARFF格式的字符串形式返回数据集。如果字符串包含空格字符,或者是问号,则会引用字符串。
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns a string representing the dataset in the instance queue.
*
* @return the string representing the output data format
*/
protected String toStringFormat() {
if (m_DatasetFormat == null) {
return "";
}
return m_DatasetFormat.toString();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Returns a string representing the dataset in the instance queue.
*
* @return the string representing the output data format
*/
protected String toStringFormat() {
if (m_DatasetFormat == null) {
return "";
}
return m_DatasetFormat.toString();
}
代码示例来源:origin: com.googlecode.obvious/obviousx-weka
@Override
public String toString() {
return super.toString();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
public void inputFormat(Instances instanceInfo) {
if (m_Debug) {
System.err.println("InstanceTable::inputFormat()\n"
+ instanceInfo.toString());
}
m_Instances = instanceInfo;
}
代码示例来源:origin: Waikato/weka-trunk
public void inputFormat(Instances instanceInfo) {
if (m_Debug) {
System.err.println("InstanceTable::inputFormat()\n"
+ instanceInfo.toString());
}
m_Instances = instanceInfo;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
public void inputFormat(Instances instanceInfo) {
if (m_Debug) {
System.err.println("InstanceViewer::inputFormat()\n"
+ instanceInfo.toString());
}
if (m_Clear) {
clearOutput();
}
m_UpdateString += instanceInfo.toString();
updateOutput();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns either the net (if BIF format) or the generated instances
*
* @return either the net or the generated instances
*/
@Override
public String toString() {
if (m_bGenerateNet) {
return toXMLBIF03();
}
return m_Instances.toString();
} // toString
代码示例来源:origin: Waikato/weka-trunk
/**
* Returns either the net (if BIF format) or the generated instances
*
* @return either the net or the generated instances
*/
@Override
public String toString() {
if (m_bGenerateNet) {
return toXMLBIF03();
}
return m_Instances.toString();
} // toString
代码示例来源:origin: Waikato/weka-trunk
public void inputFormat(Instances instanceInfo) {
if (m_Debug) {
System.err.println("InstanceViewer::inputFormat()\n"
+ instanceInfo.toString());
}
if (m_Clear) {
clearOutput();
}
m_UpdateString += instanceInfo.toString();
updateOutput();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
public void inputFormat(Instances instanceInfo) {
if (b_Debug)
System.err.println("InstanceSavePanel::inputFormat()\n"
+instanceInfo.toString());
m_Count = 0;
count_Lab.setText(""+m_Count+" instances");
try {
outputWriter = new PrintWriter(new FileOutputStream(arffFile_Tex.getText()));
outputWriter.println(instanceInfo.toString());
if (b_Debug)
System.err.println("InstanceSavePanel::inputFormat() - written header");
} catch (Exception ex) {
outputWriter = null;
System.err.println("InstanceSavePanel::inputFormat(): "+ex.getMessage());
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Output a representation of this classifier
*
* @return a representation of this classifier
*/
public String toString() {
if (m_FilteredInstances == null) {
return "FilteredClassifier: No model built yet.";
}
String result = "FilteredClassifier using " + getClassifierSpec()
+ " on data filtered through " + getFilterSpec() + "\n\nFiltered Header\n"
+ m_FilteredInstances.toString() + "\n\nClassifier Model\n"
+ m_Classifier.toString();
return result;
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Output a representation of this classifier
*
* @return a representation of this classifier
*/
public String toString() {
if (m_FilteredInstances == null) {
return "FilteredClassifier: No model built yet.";
}
String result = "FilteredClassifier using " + getClassifierSpec()
+ " on data filtered through " + getFilterSpec() + "\n\nFiltered Header\n"
+ m_FilteredInstances.toString() + "\n\nClassifier Model\n"
+ m_Classifier.toString();
return result;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Called when the OK button is pressed
*/
@Override
public void okPressed() {
Instances current = m_viewerPanel.getInstances();
if (current != null) {
((DataGrid) getStepToEdit()).setData(current.toString());
} else {
((DataGrid) getStepToEdit()).setData("");
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Called when the OK button is pressed
*/
@Override
public void okPressed() {
Instances current = m_viewerPanel.getInstances();
if (current != null) {
((DataGrid) getStepToEdit()).setData(current.toString());
} else {
((DataGrid) getStepToEdit()).setData("");
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Accept a training set for displaying as text
*
* @param e a <code>TrainingSetEvent</code> value
*/
@Override
public synchronized void acceptTrainingSet(TrainingSetEvent e) {
TextEvent nt =
new TextEvent(e.getSource(), e.getTrainingSet().toString(), e
.getTrainingSet().relationName());
acceptText(nt);
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Accept a data set for displaying as text
*
* @param e a <code>DataSetEvent</code> value
*/
@Override
public synchronized void acceptDataSet(DataSetEvent e) {
TextEvent nt =
new TextEvent(e.getSource(), e.getDataSet().toString(), e.getDataSet()
.relationName());
acceptText(nt);
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Accept a test set for displaying as text
*
* @param e a <code>TestSetEvent</code> value
*/
@Override
public synchronized void acceptTestSet(TestSetEvent e) {
TextEvent nt =
new TextEvent(e.getSource(), e.getTestSet().toString(), e.getTestSet()
.relationName());
acceptText(nt);
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Accept a data set for displaying as text
*
* @param e a <code>DataSetEvent</code> value
*/
@Override
public synchronized void acceptDataSet(DataSetEvent e) {
TextEvent nt =
new TextEvent(e.getSource(), e.getDataSet().toString(), e.getDataSet()
.relationName());
acceptText(nt);
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Accept a training set for displaying as text
*
* @param e a <code>TrainingSetEvent</code> value
*/
@Override
public synchronized void acceptTrainingSet(TrainingSetEvent e) {
TextEvent nt =
new TextEvent(e.getSource(), e.getTrainingSet().toString(), e
.getTrainingSet().relationName());
acceptText(nt);
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Accept a test set for displaying as text
*
* @param e a <code>TestSetEvent</code> value
*/
@Override
public synchronized void acceptTestSet(TestSetEvent e) {
TextEvent nt =
new TextEvent(e.getSource(), e.getTestSet().toString(), e.getTestSet()
.relationName());
acceptText(nt);
}
内容来源于网络,如有侵权,请联系作者删除!