private Frame execRapidsAndGetFrame(String astTree) { Val val = Rapids.exec(astTree); return register(val.getFrame()); }
public long rowsWithNa() { if( _rowsWithNa!=-1 ) return _rowsWithNa; String x = String.format("(na.omit %s)", _fr._key); Val res = Rapids.exec(x); Frame f = res.getFrame(); long cnt = _fr.numRows() - f.numRows(); f.delete(); return (_rowsWithNa=cnt); }
_train = Rapids.exec(String.format("(na.omit %s)", tranRebalanced._key)).getFrame(); // remove NA rows DKV.remove(tranRebalanced._key); checkMemoryFootPrint();
@Test public void calculateSingleNumberResultTest() { fr = new TestFrameBuilder() .withName("testFrame") .withColNames("ColA") .withVecTypes(Vec.T_NUM) .withDataForCol(0, ard(1, 2, 3)) .build(); String tree = "(sum (cols testFrame [0.0] ))"; Val val = Rapids.exec(tree); assertEquals(val.getNum(), 6.0, 1e-5); }
@Test public void changeKeyFrameTest() { Frame res = null; try { fr = new TestFrameBuilder() .withName("testFrame") .withColNames("ColA") .withVecTypes(Vec.T_NUM) .withDataForCol(0, ard(1, 2)) .build(); String tree = "( append testFrame 42 'appended' )"; Val val = Rapids.exec(tree); res = val.getFrame(); res._key = fr._key; DKV.put(fr._key, res); } finally { res.delete(); } }
model = job.trainModel().get(); String s = "(tmp= py_4 (rows (cols_py " + model._output._representation_key + " [0 1]) (tmp= py_3 (| (| (| (| (| (== (tmp= py_2 " + acs_zcta_fr._key + ") \"10065\") (== py_2 \"11219\")) (== py_2 \"66753\")) (== py_2 \"84104\")) (== py_2 \"94086\")) (== py_2 \"95014\")))))"; Val val = Rapids.exec(s); } catch (Throwable t) { t.printStackTrace();
Frame withAppendedFrame = Rapids.exec(tree).getFrame(); withAppendedFrame._key = Key.make(); DKV.put(withAppendedFrame);
_train = Rapids.exec(String.format("(na.omit %s)", tranRebalanced._key)).getFrame(); // remove NA rows DKV.remove(tranRebalanced._key);
Frame tmp = Rapids.exec(ast).getFrame(); pred2labels = tmp.vecs()[0]; cm = ConfusionMatrixTest.buildCM(labels, pred2labels);
private Frame execRapidsAndGetFrame(String astTree) { Val val = Rapids.exec(astTree); return register(val.getFrame()); }
public long rowsWithNa() { if( _rowsWithNa!=-1 ) return _rowsWithNa; String x = String.format("(na.omit %s)", _fr._key); Val res = Rapids.exec(x); Frame f = res.getFrame(); long cnt = _fr.numRows() - f.numRows(); f.delete(); return (_rowsWithNa=cnt); }
_train = Rapids.exec(String.format("(na.omit %s)", tranRebalanced._key)).getFrame(); // remove NA rows DKV.remove(tranRebalanced._key); checkMemoryFootPrint();
_train = Rapids.exec(String.format("(na.omit %s)", tranRebalanced._key)).getFrame(); // remove NA rows DKV.remove(tranRebalanced._key);