water.Key.remove()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(117)

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

Key.remove介绍

暂无

代码示例

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

@Override protected Futures remove_impl( Futures fs ) {
 if (_output._init_key != null) _output._init_key.remove(fs);
 if (_output._x_factor_key !=null) _output._x_factor_key.remove(fs);
 if (_output._representation_key != null) _output._representation_key.remove(fs);
 return super.remove_impl(fs);
}

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

@Override protected Futures remove_impl( Futures fs ) {
 if (null != _output._u_key)
  _output._u_key.remove(fs);
 if (null != _output._v_key)
  _output._v_key.remove(fs);
 return super.remove_impl(fs);
}

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

@Override protected Futures remove_impl( Futures fs ) {
 for (Key[] ks : _output._treeKeys)
  for (Key k : ks)
   if( k != null ) k.remove(fs);
 for (Key[] ks : _output._treeKeysAux)
  for (Key k : ks)
   if( k != null ) k.remove(fs);
 if (_output._calib_model != null)
  _output._calib_model.remove(fs);
 return super.remove_impl(fs);
}

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

@Override
protected Futures remove_impl(Futures fs) {
 if (_exemplar_assignment_vec_key!=null)
  _exemplar_assignment_vec_key.remove();
 return super.remove_impl(fs);
}

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

/**
 * Delete everything in the DKV that this points to.  We currently need to be able to call this after deleteWithChildren().
 */
void delete() {
 for (Key k : leaderboard_set_metrics.keySet())
  k.remove();
 remove();
}

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

public void deleteBaseModelPredictions() {
 if (_output._base_model_predictions_keys != null) {
  for (Key<Frame> key : _output._base_model_predictions_keys) {
   if (_output._levelone_frame_id != null && key.get() != null)
    Frame.deleteTempFrameAndItsNonSharedVecs(key.get(), _output._levelone_frame_id);
   else
    key.remove();
  }
  _output._base_model_predictions_keys = null;
 }
}

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

@Override protected Futures remove_impl(Futures fs) {
 if (_output.weights != null && _output.biases != null) {
  for (Key k : _output.weights) if (k!=null) k.remove(fs);
  for (Key k : _output.biases) if (k!=null) k.remove(fs);
 }
 if (actual_best_model_key!=null) DKV.remove(actual_best_model_key);
 DKV.remove(model_info().data_info()._key, fs);
 deleteElasticAverageModels();
 return super.remove_impl(fs);
}

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

/**
 * Same as delete() but also deletes all Objects made from this instance.
 */
void deleteWithChildren() {
 leaderboard.deleteWithChildren();
 for (Key<Grid> gridKey : gridKeys)
  gridKey.remove();
 // If the Frame was made here (e.g. buildspec contained a path, then it will be deleted
 if (buildSpec.input_spec.training_frame == null) {
  origTrainingFrame.delete();
 }
 if (buildSpec.input_spec.validation_frame == null && validationFrame != null) {
  validationFrame.delete();
 }
 if (buildSpec.input_spec.leaderboard_frame == null && leaderboardFrame != null) {
  leaderboardFrame.delete();
 }
 delete();
}

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

preds.delete();
xvalKey.remove();

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

@Test public void testQuantilesRange() {
 int nbins = 13;
 int nbins_cats = nbins;
 byte isInt = 0;
 double min = 1;
 double maxEx = 6.900000000000001;
 long seed = 1234;
 SharedTreeModel.SharedTreeParameters.HistogramType histoType = SharedTreeModel.SharedTreeParameters.HistogramType.QuantilesGlobal;
 double[] splitPts = new double[]{1,1.5,2,2.5,3,4,5,6.1,6.2,6.3,6.7,6.8,6.85};
 Key k = Key.make();
 DKV.put(new DHistogram.HistoQuantiles(k,splitPts));
 DHistogram hist = new DHistogram("myhisto",nbins,nbins_cats,isInt,min,maxEx,0,histoType,seed,k);
 hist.init();
 assert(hist.binAt(0)==min);
 assert(hist.binAt(nbins-1)<maxEx);
 assert(hist.bin(min) == 0);
 assert(hist.bin(maxEx-1e-15) == nbins-1);
 k.remove();
}

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

gbm.deleteCrossValidationModels();
gbm.delete();
for (Key k : gbm._output._cross_validation_predictions) k.remove();
gbm._output._cross_validation_holdout_predictions_frame_id.remove();

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

parms._train.remove();
parms._valid.remove();
if( gbm != null ) gbm.delete();
Scope.exit();

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

if (gbm!=null) gbm.delete();
if (tfr!=null) tfr.delete();
if (ksplits[0]!=null) ksplits[0].remove();
if (ksplits[1]!=null) ksplits[1].remove();
Scope.exit();

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

if (drf!=null) drf.delete();
if (tfr!=null) tfr.delete();
if (ksplits[0]!=null) ksplits[0].remove();
if (ksplits[1]!=null) ksplits[1].remove();
Scope.exit();

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

Assert.assertArrayEquals(ard(ard(349, 44), ard(43, 64)), cm);
} finally {
 parms._train.remove();
 parms._valid.remove();
 if( gbm != null ) gbm.delete();
 Scope.exit();

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

parms._train.remove();
if( gbm  != null ) gbm .delete();
if( pred != null ) pred.remove();

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

parms._train.remove();
if( gbm  != null ) gbm .delete();
if( pred != null ) pred.remove();

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

gbm1.deleteCrossValidationModels();
gbm1.delete();
gbm1._output._cross_validation_fold_assignment_frame_id.remove();

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

parms._train.remove();
if( gbm  != null ) gbm .delete();
if( pred != null ) pred.remove();

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

@Test public void testGBMPredict() {
 GBMModel gbm = null;
 GBMModel.GBMParameters parms = new GBMModel.GBMParameters();
 Frame pred=null, res=null;
 Scope.enter();
 try {
  Frame train = parse_test_file("smalldata/gbm_test/ecology_model.csv");
  train.remove("Site").remove();     // Remove unique ID
  int ci = train.find("Angaus");
  Scope.track(train.replace(ci, train.vecs()[ci].toCategoricalVec()));   // Convert response 'Angaus' to categorical
  DKV.put(train);                    // Update frame after hacking it
  parms._train = train._key;
  parms._response_column = "Angaus"; // Train on the outcome
  parms._distribution = DistributionFamily.multinomial;
  gbm = new GBM(parms).trainModel().get();
  pred = parse_test_file("smalldata/gbm_test/ecology_eval.csv" );
  pred.remove("Angaus").remove();    // No response column during scoring
  res = gbm.score(pred);
  // Build a POJO, validate same results
  Assert.assertTrue(gbm.testJavaScoring(pred, res, 1e-15));
 } finally {
  parms._train.remove();
  if( gbm  != null ) gbm .delete();
  if( pred != null ) pred.remove();
  if( res  != null ) res .remove();
  Scope.exit();
 }
}

相关文章