本文整理了Java中water.fvec.Frame.checksum()
方法的一些代码示例,展示了Frame.checksum()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Frame.checksum()
方法的具体详情如下:
包路径:water.fvec.Frame
类名称:Frame
方法名:checksum
[英]64-bit checksum of the checksums of the vecs. SHA-265 checksums of the chunks are XORed together. Since parse always parses the same pieces of files into the same offsets in some chunk this checksum will be consistent across reparses.
[中]VEC校验和的64位校验和。SHA-265块的校验和被XOR在一起。由于parse总是将相同的文件片段解析到某个块中相同的偏移量中,因此该校验和在重解析中是一致的。
代码示例来源:origin: h2oai/h2o-3
/**
*
*/
public Leaderboard(String project_name, UserFeedback userFeedback, Frame leaderboardFrame, String sort_metric) {
this._key = make(idForProject(project_name));
this.project_name = project_name;
this.userFeedback = userFeedback;
this.leaderboardFrame = leaderboardFrame;
this.leaderboardFrameChecksum = leaderboardFrame == null ? 0 : leaderboardFrame.checksum();
this.sort_metric = sort_metric == null ? null : sort_metric.toLowerCase();
}
代码示例来源:origin: h2oai/h2o-2
@Override
public String getId() {
return Long.toHexString(((Frame)DKV.get(frame).get()).checksum());
}
代码示例来源:origin: h2oai/h2o-3
protected Key<Frame> buildPredsKey(Model model, Frame frame) {
return frame == null || model == null ? null : buildPredsKey(model._key, model.checksum(), frame._key, frame.checksum());
}
代码示例来源:origin: h2oai/h2o-3
public Key<Frame> gen_representation_key(Frame fr) {
if ((_parms.train() != null) && (fr.checksum() == _parms.train().checksum()) && fr._key.equals(_parms.train()._key)) // use training X factor here.
return _output._representation_key;
else
return Key.make("GLRMLoading_"+fr._key);
}
代码示例来源:origin: h2oai/h2o-3
static Leaderboard getOrMakeLeaderboard(String project_name, UserFeedback userFeedback, Frame leaderboardFrame, String sort_metric) {
Leaderboard exists = DKV.getGet(Key.make(idForProject(project_name)));
if (null != exists) {
exists.userFeedback = userFeedback;
exists.leaderboardFrame = leaderboardFrame;
if (sort_metric != null) {
exists.sort_metric = sort_metric.toLowerCase();
exists.sort_decreasing = exists.sort_metric.equals("auc");
}
exists.leaderboardFrameChecksum = leaderboardFrame == null ? 0 : leaderboardFrame.checksum();
DKV.put(exists);
return exists;
}
Leaderboard newLeaderboard = new Leaderboard(project_name, userFeedback, leaderboardFrame, sort_metric);
DKV.put(newLeaderboard);
return newLeaderboard;
}
代码示例来源:origin: h2oai/h2o-3
private static double[] getMetrics(String metric, IcedHashMap<Key<ModelMetrics>, ModelMetrics> leaderboard_set_metrics, Frame leaderboardFrame, Model[] models) {
double[] other_metrics = new double[models.length];
int i = 0;
for (Model m : models) {
// If leaderboard frame exists, get metrics from there
if (leaderboardFrame != null) {
//System.out.println("@@@@@@@@@@@@@ Leaderboard frame metrics @@@@@@@@@@@@@");
other_metrics[i++] = ModelMetrics.getMetricFromModelMetric(leaderboard_set_metrics.get(ModelMetrics.buildKey(m, leaderboardFrame)), metric);
} else {
// otherwise use cross-validation metrics
//System.out.println("@@@@@@@@@@@@@ Cross-validation frame metrics @@@@@@@@@@@@@");
Key model_key = m._key;
long model_checksum = m.checksum();
Key frame_key = m._output._cross_validation_metrics.frame()._key;
long frame_checksum = m._output._cross_validation_metrics.frame().checksum();
other_metrics[i++] = ModelMetrics.getMetricFromModelMetric(leaderboard_set_metrics.get(ModelMetrics.buildKey(model_key, model_checksum, frame_key, frame_checksum)), metric);
}
}
return other_metrics;
}
代码示例来源:origin: h2oai/h2o-3
this.weightsColumn = trainingFrame.vec(buildSpec.input_spec.weights_column);
this.userFeedback.info(Stage.DataImport, "training frame: " + this.trainingFrame.toString().replace("\n", " ") + " checksum: " + this.trainingFrame.checksum());
if (null != this.validationFrame) {
this.userFeedback.info(Stage.DataImport, "validation frame: " + this.validationFrame.toString().replace("\n", " ") + " checksum: " + this.validationFrame.checksum());
} else {
this.userFeedback.info(Stage.DataImport, "validation frame: NULL");
this.userFeedback.info(Stage.DataImport, "leaderboard frame: " + this.leaderboardFrame.toString().replace("\n", " ") + " checksum: " + this.leaderboardFrame.checksum());
} else {
this.userFeedback.info(Stage.DataImport, "leaderboard frame: NULL");
代码示例来源:origin: h2oai/h2o-3
frAfterGbm = gbm._parms.train();
Assert.assertEquals(train.checksum(),frAfterGbm.checksum());
frAfterDrf= drf._parms.train();
Assert.assertEquals(train.checksum(),frAfterDrf.checksum());
代码示例来源:origin: ai.h2o/h2o-automl
/**
*
*/
public Leaderboard(String project_name, UserFeedback userFeedback, Frame leaderboardFrame, String sort_metric) {
this._key = make(idForProject(project_name));
this.project_name = project_name;
this.userFeedback = userFeedback;
this.leaderboardFrame = leaderboardFrame;
this.leaderboardFrameChecksum = leaderboardFrame == null ? 0 : leaderboardFrame.checksum();
this.sort_metric = sort_metric == null ? null : sort_metric.toLowerCase();
}
代码示例来源:origin: ai.h2o/h2o-algos
private Key<Frame> buildPredsKey(Model model, Frame frame) {
return frame == null || model == null ? null : buildPredsKey(model._key, model.checksum(), frame._key, frame.checksum());
}
代码示例来源:origin: ai.h2o/h2o-algos
public Key<Frame> gen_representation_key(Frame fr) {
if ((_parms.train() != null) && (fr.checksum() == _parms.train().checksum()) && fr._key.equals(_parms.train()._key)) // use training X factor here.
return _output._representation_key;
else
return Key.make("GLRMLoading_"+fr._key);
}
代码示例来源:origin: ai.h2o/h2o-automl
static Leaderboard getOrMakeLeaderboard(String project_name, UserFeedback userFeedback, Frame leaderboardFrame, String sort_metric) {
Leaderboard exists = DKV.getGet(Key.make(idForProject(project_name)));
if (null != exists) {
exists.userFeedback = userFeedback;
exists.leaderboardFrame = leaderboardFrame;
if (sort_metric != null) {
exists.sort_metric = sort_metric.toLowerCase();
exists.sort_decreasing = exists.sort_metric.equals("auc");
}
exists.leaderboardFrameChecksum = leaderboardFrame == null ? 0 : leaderboardFrame.checksum();
DKV.put(exists);
return exists;
}
Leaderboard newLeaderboard = new Leaderboard(project_name, userFeedback, leaderboardFrame, sort_metric);
DKV.put(newLeaderboard);
return newLeaderboard;
}
代码示例来源:origin: ai.h2o/h2o-automl
private static double[] getMetrics(String metric, IcedHashMap<Key<ModelMetrics>, ModelMetrics> leaderboard_set_metrics, Frame leaderboardFrame, Model[] models) {
double[] other_metrics = new double[models.length];
int i = 0;
for (Model m : models) {
// If leaderboard frame exists, get metrics from there
if (leaderboardFrame != null) {
//System.out.println("@@@@@@@@@@@@@ Leaderboard frame metrics @@@@@@@@@@@@@");
other_metrics[i++] = ModelMetrics.getMetricFromModelMetric(leaderboard_set_metrics.get(ModelMetrics.buildKey(m, leaderboardFrame)), metric);
} else {
// otherwise use cross-validation metrics
//System.out.println("@@@@@@@@@@@@@ Cross-validation frame metrics @@@@@@@@@@@@@");
Key model_key = m._key;
long model_checksum = m.checksum();
Key frame_key = m._output._cross_validation_metrics.frame()._key;
long frame_checksum = m._output._cross_validation_metrics.frame().checksum();
other_metrics[i++] = ModelMetrics.getMetricFromModelMetric(leaderboard_set_metrics.get(ModelMetrics.buildKey(model_key, model_checksum, frame_key, frame_checksum)), metric);
}
}
return other_metrics;
}
代码示例来源:origin: ai.h2o/h2o-automl
this.weightsColumn = trainingFrame.vec(buildSpec.input_spec.weights_column);
this.userFeedback.info(Stage.DataImport, "training frame: " + this.trainingFrame.toString().replace("\n", " ") + " checksum: " + this.trainingFrame.checksum());
if (null != this.validationFrame) {
this.userFeedback.info(Stage.DataImport, "validation frame: " + this.validationFrame.toString().replace("\n", " ") + " checksum: " + this.validationFrame.checksum());
} else {
this.userFeedback.info(Stage.DataImport, "validation frame: NULL");
this.userFeedback.info(Stage.DataImport, "leaderboard frame: " + this.leaderboardFrame.toString().replace("\n", " ") + " checksum: " + this.leaderboardFrame.checksum());
} else {
this.userFeedback.info(Stage.DataImport, "leaderboard frame: NULL");
内容来源于网络,如有侵权,请联系作者删除!