water.fvec.Frame.delete()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中water.fvec.Frame.delete()方法的一些代码示例,展示了Frame.delete()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Frame.delete()方法的具体详情如下:
包路径:water.fvec.Frame
类名称:Frame
方法名:delete

Frame.delete介绍

[英]Actually remove/delete all Vecs from memory, not just from the Frame.
[中]

代码示例

代码示例来源:origin: h2oai/h2o-3

@AfterClass
 public static void cleanUp() {
  if(_abcd != null)  _abcd.delete();
  if(_prostateTrainUpsampled != null) _prostateTrainUpsampled.delete();
  if(_prostateTest != null) _prostateTest.delete();
  if(_prostateTrain != null) _prostateTrain.delete();
  if(_airlinesTrain != null) _airlinesTrain.delete();
  if(_airlinesTest != null) _airlinesTest.delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

@AfterClass
public static void cleanUp() {
 if(_covtype != null)  _covtype.delete();
 if(_train != null) _train.delete();
 if(_test != null) _test.delete();
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
  for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
   map.getValue().delete();
  }
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
 for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
  map.getValue().delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
 for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
  map.getValue().delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
  for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
   map.getValue().delete();
  }
 }
}

代码示例来源:origin: h2oai/h2o-3

@Override
public void stop() {
 for (Frame f : tempFrames) f.delete();
 tempFrames = null;
 if (null == jobs) return; // already stopped
 for (Job j : jobs) j.stop();
 for (Job j : jobs) j.get(); // Hold until they all completely stop.
 jobs = null;
 // TODO: add a failsafe, if we haven't marked off as much work as we originally intended?
 // If we don't, we end up with an exceptional completion.
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
 for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
  map.getValue().delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
 for( Map.Entry<String, Frame> map : encodingMap.entrySet()) {
  map.getValue().delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
 for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
  map.getValue().delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
  for( Map.Entry<String, Frame> map : encodingMap.entrySet()) {
   map.getValue().delete();
  }
 }
}

代码示例来源:origin: h2oai/h2o-3

private void encodingMapCleanUp(Map<String, Frame> encodingMap) {
 for (Map.Entry<String, Frame> map : encodingMap.entrySet()) {
  map.getValue().delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

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);
}

代码示例来源:origin: h2oai/h2o-3

@After
public void afterEach() {
 if (fr != null) fr.delete();
}

代码示例来源:origin: h2oai/h2o-3

@After
public void afterEach() {
 if (fr != null) fr.delete();
}

代码示例来源:origin: h2oai/h2o-3

@After
public void afterEach() {
 if (fr != null) fr.delete();
}

代码示例来源:origin: h2oai/h2o-3

@After
public void afterEach() {
 if (fr != null) fr.delete();
}

代码示例来源:origin: h2oai/h2o-3

private GLMModel prepareGLMModel(String dataset, String[] ignoredColumns, String response, GLMModel.GLMParameters.Family family) {
 Frame f = parse_test_file(dataset);
 try {
  GLMModel.GLMParameters params = new GLMModel.GLMParameters();
  params._train = f._key;
  params._ignored_columns = ignoredColumns;
  params._response_column = response;
  params._family = family;
  return new GLM(params).trainModel().get();
 } finally {
  if (f!=null) f.delete();
 }
}

代码示例来源:origin: h2oai/h2o-3

private static Frame selectByPredicate(Frame fr, Frame predicateFrame) {
 String[] names = fr.names().clone();
 byte[] types = fr.types().clone();
 String[][] domains = fr.domains().clone();
 fr.add("predicate", predicateFrame.anyVec());
 Frame filtered = new Frame.DeepSelect().doAll(types, fr).outputFrame(Key.<Frame>make(), names, domains);
 predicateFrame.delete();
 fr.remove("predicate");
 return filtered;
}

代码示例来源:origin: h2oai/h2o-3

@Test
public void categoricalTargetHasCardinalityOfTwoTest() {
 String targetColumnName = "ColC";
 fr = new TestFrameBuilder()
     .withName("testFrame")
     .withColNames( targetColumnName)
     .withVecTypes(Vec.T_CAT)
     .withDataForCol(0, ar("2", "6", "6", "6", "6", "2"))
     .build();
 assertEquals(2, fr.vec(0).cardinality());
 fr.delete();
}

相关文章