本文整理了Java中water.fvec.Frame.hasNAs()
方法的一些代码示例,展示了Frame.hasNAs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Frame.hasNAs()
方法的具体详情如下:
包路径:water.fvec.Frame
类名称:Frame
方法名:hasNAs
暂无
代码示例来源:origin: h2oai/h2o-3
@Override
public void init(boolean expensive) {
super.init(expensive);
if (_parms._max_iterations < 1 || _parms._max_iterations > 1e6) {
error("_max_iterations", "max_iterations must be between 1 and 1e6 inclusive");
}
if (_train == null) {
return;
}
_ncolExp = hex.util.LinearAlgebraUtils.numColsExp(_train,_parms._use_all_factor_levels);
// if (_ncolExp < 2) error("_train", "_train must have more than one column when categoricals are expanded");
// TODO: Initialize _parms._k = min(ncolExp(_train), nrow(_train)) if not set
int k_min = (int)Math.min(_ncolExp, _train.numRows());
if (_parms._k < 1) {
_parms._k = k_min;
warn("_k", "_k is set to be "+k_min);
} else if (_parms._k > k_min) {
error("_k", "_k must be between 1 and " + k_min);
}
if (!_parms._use_all_factor_levels && _parms._pca_method == PCAParameters.Method.GLRM) {
error("_use_all_factor_levels", "GLRM only implemented for _use_all_factor_levels = true");
}
if (_parms._pca_method != PCAParameters.Method.GLRM && expensive && error_count() == 0) {
if (!(_train.hasNAs()) || _parms._impute_missing) {
checkMemoryFootPrint(); // perform memory check here if dataset contains no NAs or if impute_missing enabled
}
}
}
代码示例来源:origin: h2oai/h2o-3
@Override public void init(boolean expensive) {
super.init(expensive);
if (_parms._max_iterations < 1)
error("_max_iterations", "max_iterations must be at least 1");
if(_train == null) return;
if (_callFromGLRM) // when used to initialize GLRM, need to treat binary numeric columns with binary loss as numeric columns
_ncolExp = _glrmModel._output._catOffsets[_glrmModel._output._catOffsets.length-1]+_glrmModel._output._nnums;
else
_ncolExp = LinearAlgebraUtils.numColsExp(_train,_parms._use_all_factor_levels);
if (_ncolExp > MAX_COLS_EXPANDED) {
warn("_train", "_train has " + _ncolExp + " columns when categoricals are expanded. " +
"Algorithm may be slow.");
}
if(_parms._nv < 1 || _parms._nv > _ncolExp)
error("_nv", "Number of right singular values must be between 1 and " + _ncolExp);
if (expensive && error_count() == 0) {
if (!(_train.hasNAs()) || _parms._impute_missing) {
checkMemoryFootPrint(); // perform memory check here if dataset contains no NAs or if impute_missing enabled
}
}
}
代码示例来源:origin: h2oai/h2o-3
boolean frameHasNas = tranRebalanced.hasNAs();
代码示例来源:origin: h2oai/h2o-3
if ((!_parms._impute_missing) && tranRebalanced.hasNAs()) { // remove NAs rows
tinfo = new DataInfo(_train, _valid, 0, _parms._use_all_factor_levels, _parms._transform,
DataInfo.TransformType.NONE, /* skipMissing */ !_parms._impute_missing, /* imputeMissing */
DKV.put(dinfo._key, dinfo);
if (!_parms._impute_missing && tranRebalanced.hasNAs()) {
代码示例来源:origin: h2oai/h2o-3
_state = new ComputationState(_job, _parms, _dinfo, null, nclasses());
boolean skippingRows = (_parms._missing_values_handling == MissingValuesHandling.Skip && _train.hasNAs());
if (hasWeightCol() || skippingRows) { // need to re-compute means and sd
boolean setWeights = skippingRows;// && _parms._lambda_search && _parms._alpha[0] > 0;
代码示例来源:origin: ai.h2o/h2o-algos
@Override public void init(boolean expensive) {
super.init(expensive);
if (_parms._max_iterations < 1)
error("_max_iterations", "max_iterations must be at least 1");
if(_train == null) return;
if (_callFromGLRM) // when used to initialize GLRM, need to treat binary numeric columns with binary loss as numeric columns
_ncolExp = _glrmModel._output._catOffsets[_glrmModel._output._catOffsets.length-1]+_glrmModel._output._nnums;
else
_ncolExp = LinearAlgebraUtils.numColsExp(_train,_parms._use_all_factor_levels);
if (_ncolExp > MAX_COLS_EXPANDED) {
warn("_train", "_train has " + _ncolExp + " columns when categoricals are expanded. " +
"Algorithm may be slow.");
}
if(_parms._nv < 1 || _parms._nv > _ncolExp)
error("_nv", "Number of right singular values must be between 1 and " + _ncolExp);
if (expensive && error_count() == 0) {
if (!(_train.hasNAs()) || _parms._impute_missing) {
checkMemoryFootPrint(); // perform memory check here if dataset contains no NAs or if impute_missing enabled
}
}
}
代码示例来源:origin: ai.h2o/h2o-algos
@Override
public void init(boolean expensive) {
super.init(expensive);
if (_parms._max_iterations < 1 || _parms._max_iterations > 1e6) {
error("_max_iterations", "max_iterations must be between 1 and 1e6 inclusive");
}
if (_train == null) {
return;
}
_ncolExp = hex.util.LinearAlgebraUtils.numColsExp(_train,_parms._use_all_factor_levels);
// if (_ncolExp < 2) error("_train", "_train must have more than one column when categoricals are expanded");
// TODO: Initialize _parms._k = min(ncolExp(_train), nrow(_train)) if not set
int k_min = (int)Math.min(_ncolExp, _train.numRows());
if (_parms._k < 1) {
_parms._k = k_min;
warn("_k", "_k is set to be "+k_min);
} else if (_parms._k > k_min) {
error("_k", "_k must be between 1 and " + k_min);
}
if (!_parms._use_all_factor_levels && _parms._pca_method == PCAParameters.Method.GLRM) {
error("_use_all_factor_levels", "GLRM only implemented for _use_all_factor_levels = true");
}
if (_parms._pca_method != PCAParameters.Method.GLRM && expensive && error_count() == 0) {
if (!(_train.hasNAs()) || _parms._impute_missing) {
checkMemoryFootPrint(); // perform memory check here if dataset contains no NAs or if impute_missing enabled
}
}
}
代码示例来源:origin: ai.h2o/sparkling-water-ml
if (user_points.hasNAs()) {
error("_initial_weights", "Initial weights cannot contain missing values.");
代码示例来源:origin: ai.h2o/h2o-algos
boolean frameHasNas = tranRebalanced.hasNAs();
代码示例来源:origin: ai.h2o/h2o-algos
if ((!_parms._impute_missing) && tranRebalanced.hasNAs()) { // remove NAs rows
tinfo = new DataInfo(_train, _valid, 0, _parms._use_all_factor_levels, _parms._transform,
DataInfo.TransformType.NONE, /* skipMissing */ !_parms._impute_missing, /* imputeMissing */
DKV.put(dinfo._key, dinfo);
if (!_parms._impute_missing && tranRebalanced.hasNAs()) {
代码示例来源:origin: ai.h2o/h2o-algos
_state = new ComputationState(_job, _parms, _dinfo, null, nclasses());
boolean skippingRows = (_parms._missing_values_handling == MissingValuesHandling.Skip && _train.hasNAs());
if (hasWeightCol() || skippingRows) { // need to re-compute means and sd
boolean setWeights = skippingRows;// && _parms._lambda_search && _parms._alpha[0] > 0;
内容来源于网络,如有侵权,请联系作者删除!