MCPcopy Create free account
hub / github.com/WinVector/Logistic / toString

Method toString

src/com/winvector/opt/def/LinUtil.java:56–71  ·  view source on GitHub ↗
(final double[] x)

Source from the content-addressed store, hash-verified

54 }
55
56 public static String toString(final double[] x) {
57 final StringBuilder b = new StringBuilder();
58 if(x!=null) {
59 final Formatter formatter = new Formatter(b);
60 for(final double xi: x) {
61 if(b.length()>0) {
62 b.append("\t");
63 }
64 formatter.format("%g",xi);
65 formatter.flush();
66 }
67 } else {
68 b.append("null");
69 }
70 return b.toString();
71 }
72
73 public static String toString(final double[][] x) {
74 final StringBuilder b = new StringBuilder();

Callers 6

testTrainAccuracyMethod · 0.95
testTrainAccuracyMethod · 0.95
testVectorEncodingBMethod · 0.95
trainMethod · 0.95
runMethod · 0.95
toStringMethod · 0.95

Calls

no outgoing calls

Tested by 3

testTrainAccuracyMethod · 0.76
testTrainAccuracyMethod · 0.76
testVectorEncodingBMethod · 0.76