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

Method toString

JSAT/src/jsat/classifiers/DataPoint.java:179–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 }
178
179 @Override
180 public String toString()
181 {
182 StringBuilder sb = new StringBuilder();
183 if(containsNumericalData())
184 {
185 sb.append("Numerical: ");
186 sb.append(numericalValues.toString());
187 }
188
189 if(containsCategoricalData())
190 {
191 sb.append(" Categorical: ");
192 for(int i = 0; i < categoricalValues.length; i++)
193 {
194 sb.append(categoricalData[i].getOptionName(categoricalValues[i]));
195 sb.append(",");
196 }
197 }
198
199
200 return sb.toString();
201 }
202
203 /**
204 * Creates a deep clone of this data point, such that altering either data point does not effect the other one.

Callers

nothing calls this directly

Calls 4

containsNumericalDataMethod · 0.95
getOptionNameMethod · 0.80
toStringMethod · 0.65

Tested by

no test coverage detected