本文整理了Java中water.fvec.Frame.swap()
方法的一些代码示例,展示了Frame.swap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Frame.swap()
方法的具体详情如下:
包路径:water.fvec.Frame
类名称:Frame
方法名:swap
暂无
代码示例来源:origin: h2oai/h2o-2
while( ncats < len && vecs[ncats].isEnum() ) ncats++;
while( len > 0 && !vecs[len-1].isEnum() ) len--;
if( ncats < len-1 ) fr.swap(ncats,len-1);
代码示例来源:origin: h2oai/h2o-3
@Test public void testIris1() { // test that getting sparseRows and denseRows produce the same results
Frame fr = parse_test_file(Key.make("a.hex"), "smalldata/iris/iris_wheader.csv");
fr.swap(1,4);
Model.InteractionPair[] ips = Model.InteractionPair.generatePairwiseInteractionsFromList(0, 1);
DataInfo di=null;
try {
di = new DataInfo(
fr.clone(), // train
null, // valid
1, // num responses
true, // use all factor levels
DataInfo.TransformType.NONE, // predictor transform
DataInfo.TransformType.NONE, // response transform
true, // skip missing
false, // impute missing
false, // missing bucket
false, // weight
false, // offset
false, // fold
Model.InteractionSpec.allPairwise(new String[]{fr.name(0),fr.name(1)}) // interactions
);
checker(di,false);
} finally {
fr.delete();
if( di!=null ) {
di.dropInteractions();
di.remove();
}
}
}
代码示例来源:origin: h2oai/h2o-3
@Test public void testIris2() { // test that getting sparseRows and denseRows produce the same results
Frame fr = parse_test_file(Key.make("a.hex"), "smalldata/iris/iris_wheader.csv");
fr.swap(1,4);
Model.InteractionPair[] ips = Model.InteractionPair.generatePairwiseInteractionsFromList(0, 1);
DataInfo di=null;
try {
di = new DataInfo(
fr.clone(), // train
null, // valid
1, // num responses
true, // use all factor levels
DataInfo.TransformType.STANDARDIZE, // predictor transform
DataInfo.TransformType.NONE, // response transform
true, // skip missing
false, // impute missing
false, // missing bucket
false, // weight
false, // offset
false, // fold
Model.InteractionSpec.allPairwise(new String[]{fr.name(0),fr.name(1)}) // interactions
);
checker(di,true);
} finally {
fr.delete();
if( di!=null ) {
di.dropInteractions();
di.remove();
}
}
}
代码示例来源:origin: h2oai/h2o-3
try {
fr = parse_test_file(Key.make("a.hex"), "smalldata/iris/iris_wheader.csv");
fr.swap(3, 4);
代码示例来源:origin: h2oai/h2o-3
@Test public void testIris3() { // test that getting sparseRows and denseRows produce the same results
Frame fr = parse_test_file(Key.make("a.hex"), "smalldata/iris/iris_wheader.csv");
fr.swap(2,4);
Model.InteractionPair[] ips = Model.InteractionPair.generatePairwiseInteractionsFromList(0, 1, 2, 3);
DataInfo di=null;
try {
di = new DataInfo(
fr.clone(), // train
null, // valid
1, // num responses
true, // use all factor levels
DataInfo.TransformType.STANDARDIZE, // predictor transform
DataInfo.TransformType.NONE, // response transform
true, // skip missing
false, // impute missing
false, // missing bucket
false, // weight
false, // offset
false, // fold
Model.InteractionSpec.allPairwise(new String[]{fr.name(0),fr.name(1),fr.name(2),fr.name(3)}) // interactions
);
checker(di,true);
} finally {
fr.delete();
if( di!=null ) {
di.dropInteractions();
di.remove();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!