本文整理了Java中weka.core.Utils.arrayToString()
方法的一些代码示例,展示了Utils.arrayToString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.arrayToString()
方法的具体详情如下:
包路径:weka.core.Utils
类名称:Utils
方法名:arrayToString
[英]Returns the given Array in a string representation. Even though the parameter is of type "Object" one can hand over primitve arrays, e.g. int[3] or double[2][4].
[中]
代码示例来源:origin: Waikato/meka
/**
* Returns the keys as string.
*
* @return the keys
*/
public String toString() {
return Utils.arrayToString(m_Keys);
}
}
代码示例来源:origin: net.sf.meka/meka
/**
* Returns the keys as string.
*
* @return the keys
*/
public String toString() {
return Utils.arrayToString(m_Keys);
}
}
代码示例来源:origin: com.github.fracpete/multisearch-weka-package
/**
* Short description.
*
* @return the description
*/
public String toString() {
return Utils.arrayToString(m_Parameters);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* returns the coefficients in a string representation
*/
public String toString() {
return Utils.arrayToString(getCoefficients());
}
代码示例来源:origin: net.sf.meka/meka
/**
* initializes the creator, locates the props file with the Utils class.
*
* @throws Exception if loading of CREATOR_FILE fails
* @see #MEKA_CREATOR_FILE
*/
public GenericPropertiesCreator() throws Exception {
super(MEKA_CREATOR_FILE);
m_ExplicitPropsFile = false;
if (DEBUG)
System.out.println("start<GenericPropertiesCreator/find: " + MEKA_CREATOR_FILE + ">\n" + Utils.arrayToString(PropsUtils.find(MEKA_CREATOR_FILE)) + "\nend<GenericPropertiesCreator/find: + " + MEKA_CREATOR_FILE + ">\n");
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Generates random bytes and places them into a user-supplied byte array.
*
* @param bytes array to fill with random bytes
*/
public void nextBytes(byte[] bytes) {
super.nextBytes(bytes);
println("nextBytes=" + Utils.arrayToString(bytes));
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Generates random bytes and places them into a user-supplied byte array.
*
* @param bytes array to fill with random bytes
*/
public void nextBytes(byte[] bytes) {
super.nextBytes(bytes);
println("nextBytes=" + Utils.arrayToString(bytes));
}
代码示例来源:origin: Waikato/meka
/**
* initializes the creator, locates the props file with the Utils class.
*
* @throws Exception if loading of CREATOR_FILE fails
* @see #MEKA_CREATOR_FILE
*/
public GenericPropertiesCreator() throws Exception {
super(MEKA_CREATOR_FILE);
m_ExplicitPropsFile = false;
if (DEBUG)
System.out.println("start<GenericPropertiesCreator/find: " + MEKA_CREATOR_FILE + ">\n" + Utils.arrayToString(PropsUtils.find(MEKA_CREATOR_FILE)) + "\nend<GenericPropertiesCreator/find: + " + MEKA_CREATOR_FILE + ">\n");
}
代码示例来源:origin: Waikato/weka-trunk
/**
* returns the coefficients in a string representation
*/
public String toString() {
return Utils.arrayToString(getCoefficients());
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Generates a comment string that documentates the data generator. By default
* this string is added at the beginning of the produced output as ARFF file
* type, next after the options.
*
* @return string contains info about the generated rules
*/
@Override
public String generateStart() {
StringBuffer result;
int i;
result = new StringBuffer();
result.append("%\n");
result.append("% centroids:\n");
for (i = 0; i < getNumCentroids(); i++) {
result.append("% " + i + ".: " + Utils.arrayToString(m_centroids[i])
+ "\n");
}
result.append("%\n");
result.append("% centroidClasses: "
+ Utils.arrayToString(m_centroidClasses) + "\n");
result.append("%\n");
result.append("% centroidWeights: "
+ Utils.arrayToString(m_centroidWeights) + "\n");
result.append("%\n");
result.append("% centroidStdDevs: "
+ Utils.arrayToString(m_centroidStdDevs) + "\n");
result.append("%\n");
return result.toString();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Generates a comment string that documentates the data generator. By default
* this string is added at the beginning of the produced output as ARFF file
* type, next after the options.
*
* @return string contains info about the generated rules
*/
@Override
public String generateStart() {
StringBuffer result;
int i;
result = new StringBuffer();
result.append("%\n");
result.append("% centroids:\n");
for (i = 0; i < getNumCentroids(); i++) {
result.append("% " + i + ".: " + Utils.arrayToString(m_centroids[i])
+ "\n");
}
result.append("%\n");
result.append("% centroidClasses: "
+ Utils.arrayToString(m_centroidClasses) + "\n");
result.append("%\n");
result.append("% centroidWeights: "
+ Utils.arrayToString(m_centroidWeights) + "\n");
result.append("%\n");
result.append("% centroidStdDevs: "
+ Utils.arrayToString(m_centroidStdDevs) + "\n");
result.append("%\n");
return result.toString();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
result += ",";
result += "[" + arrayToString(Array.get(array, i)) + "]";
代码示例来源:origin: Waikato/weka-trunk
result += ",";
result += "[" + arrayToString(Array.get(array, i)) + "]";
代码示例来源:origin: net.sf.meka/meka
System.err.println("Failed to set options: " + Utils.arrayToString(args));
e.printStackTrace();
代码示例来源:origin: Waikato/meka
System.err.println("Failed to set options: " + Utils.arrayToString(args));
e.printStackTrace();
代码示例来源:origin: Waikato/weka-trunk
+ Utils.arrayToString(m_IndicesUnused));
代码示例来源:origin: com.github.fracpete/multisearch-weka-package
/**
* Returns a string representation of the dimension.
*
* @return a string representation
*/
public String toString() {
return "dimension: " + getLabel() + ", min: " + getMin() + ", max: " + getMax() + ", list: " + Utils.arrayToString(getList());
}
}
代码示例来源:origin: Waikato/meka
public static void main(String[] args) throws Exception {
if (args.length != 2)
throw new IllegalArgumentException("Required arguments: <train> <predict>");
System.out.println("Loading train: " + args[0]);
Instances train = DataSource.read(args[0]);
MLUtils.prepareData(train);
System.out.println("Loading predict: " + args[1]);
Instances predict = DataSource.read(args[1]);
MLUtils.prepareData(predict);
// compatible?
String msg = train.equalHeadersMsg(predict);
if (msg != null)
throw new IllegalStateException(msg);
System.out.println("Build BR classifier on " + args[0]);
BR classifier = new BR();
// further configuration of classifier
classifier.buildClassifier(train);
System.out.println("Use BR classifier on " + args[1]);
for (int i = 0; i < predict.numInstances(); i++) {
double[] dist = classifier.distributionForInstance(predict.instance(i));
System.out.println((i+1) + ": " + Utils.arrayToString(dist));
}
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* tests the commandline operation of the saver.
*/
public void testSaverCommandlineArgs() {
String[] options;
options = getCommandlineOptions(false);
try {
((OptionHandler) m_Saver).setOptions(options);
} catch (Exception e) {
e.printStackTrace();
fail("Command line test failed ('" + Utils.arrayToString(options)
+ "'): " + e.toString());
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* tests the commandline operation of the saver.
*/
public void testSaverCommandlineArgs() {
String[] options;
options = getCommandlineOptions(false);
try {
((OptionHandler) m_Saver).setOptions(options);
} catch (Exception e) {
e.printStackTrace();
fail("Command line test failed ('" + Utils.arrayToString(options)
+ "'): " + e.toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!