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

Method advance

test/com/winvector/logistic/RExample.java:27–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 }
26
27 private void advance() {
28 next = null;
29 while((next==null)&&(i<rawdat.length)) {
30 final int category = rawdat[i][dim-1]>0.5?1:0;
31 final double[] vec = new double[dim];
32 vec[0] = 1.0;
33 for(int j=0;j<dim-1;++j) {
34 if(rawdat[i][j]!=0.0) {
35 vec[j+1] = rawdat[i][j];
36 }
37 }
38 next = new SparseExampleRow(new SparseSemiVec(vec),1.0,category);
39 ++i;
40 }
41 }
42
43 @Override
44 public boolean hasNext() {

Callers 2

SIMethod · 0.95
nextMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected