MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / writeCatVar

Method writeCatVar

JSAT/src/jsat/ARFFLoader.java:300–310  ·  view source on GitHub ↗
(PrintWriter writer, CategoricalData cate)

Source from the content-addressed store, hash-verified

298 }
299
300 private static void writeCatVar(PrintWriter writer, CategoricalData cate)
301 {
302 writer.write("@ATTRIBUTE " + cate.getCategoryName().replaceAll("\\s+", "-") + " {" );
303 for(int i = 0; i < cate.getNumOfCategories(); i++)
304 {
305 if(i != 0)
306 writer.write(",");
307 writer.write(addQuotes(cate.getOptionName(i)));
308 }
309 writer.write("}\n");
310 }
311
312
313 /**

Callers 1

writeArffFileMethod · 0.95

Calls 5

addQuotesMethod · 0.95
getNumOfCategoriesMethod · 0.80
getOptionNameMethod · 0.80
writeMethod · 0.45
getCategoryNameMethod · 0.45

Tested by

no test coverage detected