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

Method setNumericName

JSAT/src/jsat/DataSet.java:65–77  ·  view source on GitHub ↗

Sets the unique name associated with the i 'th numeric attribute. All strings will be converted to lower case first. @param name the name to use @param i the i th attribute. @return true if the value was set, false if it was not set because an invalid index was giv

(String name, int i)

Source from the content-addressed store, hash-verified

63 * @return <tt>true</tt> if the value was set, <tt>false</tt> if it was not set because an invalid index was given .
64 */
65 public boolean setNumericName(String name, int i)
66 {
67 name = name.toLowerCase();
68
69 if(numericalVariableNames.contains(name))
70 return false;
71 else if(i < getNumNumericalVars() && i >= 0)
72 numericalVariableNames.set(i, name);
73 else
74 return false;
75
76 return true;
77 }
78
79 /**
80 * Returns the name used for the <tt>i</tt>'th numeric attribute.

Callers 1

loadArffFileMethod · 0.80

Calls 3

getNumNumericalVarsMethod · 0.95
containsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected