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

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

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

Frame.extractFrame介绍

暂无

代码示例

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

final Frame l2 = adaptFrm.extractFrame(x, y);
onlyAdaptFrm.delete();
return l2;

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

@Override protected Frame predictScoreImpl(Frame orig, Frame adaptedFr, String destination_key, final Job j, boolean computeMetrics, CFuncRef customMetricFunc) {
 Frame adaptFrm = new Frame(adaptedFr);
 for(int i = 0; i < _parms._nv; i++)
  adaptFrm.add("PC"+String.valueOf(i+1),adaptFrm.anyVec().makeZero());
 new MRTask() {
  @Override public void map( Chunk chks[] ) {
   if (isCancelled() || j != null && j.stop_requested()) return;
   double tmp [] = new double[_output._names.length];
   double preds[] = new double[_parms._nv];
   for( int row = 0; row < chks[0]._len; row++) {
    double p[] = score0(chks, row, tmp, preds);
    for( int c=0; c<preds.length; c++ )
     chks[_output._names.length+c].set(row, p[c]);
   }
   if (j !=null) j.update(1);
  }
 }.doAll(adaptFrm);
 // Return the projection into right singular vector (V) space
 int x = _output._names.length, y = adaptFrm.numCols();
 Frame f = adaptFrm.extractFrame(x, y); // this will call vec_impl() and we cannot call the delete() below just yet
 f = new Frame(Key.<Frame>make(destination_key), f.names(), f.vecs());
 DKV.put(f);
 makeMetricBuilder(null).makeModelMetrics(this, orig, null, null);
 return f;
}

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

@Override
protected Frame predictScoreImpl(Frame origFr, Frame adaptedFr, String destination_key, final Job j, boolean computeMetrics, CFuncRef customMetricFunc) {
 Frame adaptFrm = new Frame(adaptedFr);
 for(int i = 0; i < _parms._k; i++)
  adaptFrm.add("PC"+String.valueOf(i+1),adaptFrm.anyVec().makeZero());
 new MRTask() {
  @Override public void map( Chunk chks[] ) {
   if (isCancelled() || j != null && j.stop_requested()) return;
   double tmp [] = new double[_output._names.length];
   double preds[] = new double[_parms._k];
   for( int row = 0; row < chks[0]._len; row++) {
    double p[] = score0(chks, row, tmp, preds);
    for( int c=0; c<preds.length; c++ )
     chks[_output._names.length+c].set(row, p[c]);
   }
   if (j != null) j.update(1);
  }
 }.doAll(adaptFrm);
 // Return the projection into principal component space
 int x = _output._names.length, y = adaptFrm.numCols();
 Frame f = adaptFrm.extractFrame(x, y); // this will call vec_impl() and we cannot call the delete() below just yet
 f = new Frame(Key.<Frame>make(destination_key), f.names(), f.vecs());
 DKV.put(f);
 makeMetricBuilder(null).makeModelMetrics(this, origFr, null, null);
 return f;
}

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

Frame f = adaptFrm.extractFrame(x, y); // this will call vec_impl() and we cannot call the delete() below just yet

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

Frame ret = adaptFrm.extractFrame(x, y);
Scope.exit();
return ret;

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

Frame f = adaptFrm.extractFrame(x, y); //this will call vec_impl() and we cannot call the delete() below just yet
onlyAdaptFrm.delete();
return f;

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

Frame ret = adaptFrm.extractFrame(x, y);
onlyAdaptFrm.delete();
if (resp != null) ret.prepend(responseName(), resp);

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

Frame f = fullFrm.extractFrame(x, y);  // this will call vec_impl() and we cannot call the delete() below just yet

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

qfrm = ayqfrm.extractFrame(ncolA + _parms._nv, ayqfrm.numCols());
qfrm = new Frame(Key.<Frame>make(), qfrm.names(), qfrm.vecs());
DKV.put(qfrm);

代码示例来源:origin: ai.h2o/h2o-algos

@Override protected Frame predictScoreImpl(Frame orig, Frame adaptedFr, String destination_key, final Job j, boolean computeMetrics, CFuncRef customMetricFunc) {
 Frame adaptFrm = new Frame(adaptedFr);
 for(int i = 0; i < _parms._nv; i++)
  adaptFrm.add("PC"+String.valueOf(i+1),adaptFrm.anyVec().makeZero());
 new MRTask() {
  @Override public void map( Chunk chks[] ) {
   if (isCancelled() || j != null && j.stop_requested()) return;
   double tmp [] = new double[_output._names.length];
   double preds[] = new double[_parms._nv];
   for( int row = 0; row < chks[0]._len; row++) {
    double p[] = score0(chks, row, tmp, preds);
    for( int c=0; c<preds.length; c++ )
     chks[_output._names.length+c].set(row, p[c]);
   }
   if (j !=null) j.update(1);
  }
 }.doAll(adaptFrm);
 // Return the projection into right singular vector (V) space
 int x = _output._names.length, y = adaptFrm.numCols();
 Frame f = adaptFrm.extractFrame(x, y); // this will call vec_impl() and we cannot call the delete() below just yet
 f = new Frame(Key.<Frame>make(destination_key), f.names(), f.vecs());
 DKV.put(f);
 makeMetricBuilder(null).makeModelMetrics(this, orig, null, null);
 return f;
}

代码示例来源:origin: ai.h2o/h2o-algos

@Override
protected Frame predictScoreImpl(Frame origFr, Frame adaptedFr, String destination_key, final Job j, boolean computeMetrics, CFuncRef customMetricFunc) {
 Frame adaptFrm = new Frame(adaptedFr);
 for(int i = 0; i < _parms._k; i++)
  adaptFrm.add("PC"+String.valueOf(i+1),adaptFrm.anyVec().makeZero());
 new MRTask() {
  @Override public void map( Chunk chks[] ) {
   if (isCancelled() || j != null && j.stop_requested()) return;
   double tmp [] = new double[_output._names.length];
   double preds[] = new double[_parms._k];
   for( int row = 0; row < chks[0]._len; row++) {
    double p[] = score0(chks, row, tmp, preds);
    for( int c=0; c<preds.length; c++ )
     chks[_output._names.length+c].set(row, p[c]);
   }
   if (j != null) j.update(1);
  }
 }.doAll(adaptFrm);
 // Return the projection into principal component space
 int x = _output._names.length, y = adaptFrm.numCols();
 Frame f = adaptFrm.extractFrame(x, y); // this will call vec_impl() and we cannot call the delete() below just yet
 f = new Frame(Key.<Frame>make(destination_key), f.names(), f.vecs());
 DKV.put(f);
 makeMetricBuilder(null).makeModelMetrics(this, origFr, null, null);
 return f;
}

代码示例来源:origin: ai.h2o/h2o-algos

Frame f = adaptFrm.extractFrame(x, y); // this will call vec_impl() and we cannot call the delete() below just yet

代码示例来源:origin: ai.h2o/h2o-algos

Frame ret = adaptFrm.extractFrame(x, y);
Scope.exit();
return ret;

代码示例来源:origin: ai.h2o/h2o-algos

Frame f = fullFrm.extractFrame(x, y);  // this will call vec_impl() and we cannot call the delete() below just yet

代码示例来源:origin: ai.h2o/h2o-algos

qfrm = ayqfrm.extractFrame(ncolA + _parms._nv, ayqfrm.numCols());
qfrm = new Frame(Key.<Frame>make(), qfrm.names(), qfrm.vecs());
DKV.put(qfrm);

相关文章