/** * Creates default parameters. */ public CMMParams() { minFF = new DoubleParam(this, "minFF", "min feature frequency", ParamValidators.gt(0)); setDefault(minFF, 2.0); numFeatures = new IntParam(this, "numFeatures", "number of features used in feature hashing", ParamValidators.gt(0)); setDefault(numFeatures, 1000); regParam = new DoubleParam(this, "regParam", "regularization parameter", ParamValidators.gtEq(0d)); setDefault(regParam, 0.0); maxIter = new IntParam(this, "maxIter", "max number of iterations", ParamValidators.gt(0)); setDefault(maxIter, 100); tolerance = new DoubleParam(this, "tolerance", "convergence tolerance of iterations", ParamValidators.gt(0)); setDefault(tolerance, 1E-5); markovOrder = new IntParam(this, "markovOrder", "Markov order of the model", ParamValidators.gt(0)); setDefault(markovOrder, 1); }
/** * Creates default parameters. */ public TransitionClassifierParams() { minFF = new DoubleParam(this, "minFF", "min feature frequency", ParamValidators.gt(0)); setDefault(minFF, 2.0); numFeatures = new IntParam(this, "numFeatures", "number of features used in feature hashing", ParamValidators.gt(0)); setDefault(numFeatures, 1000); regParam = new DoubleParam(this, "regParam", "regularization parameter", ParamValidators.gtEq(0d)); setDefault(regParam, 0.0); maxIter = new IntParam(this, "maxIter", "max number of iterations", ParamValidators.gt(0)); setDefault(maxIter, 100); tolerance = new DoubleParam(this, "tolerance", "convergence tolerance of iterations", ParamValidators.gt(0)); setDefault(tolerance, 1E-5); }
private void init() { myIntParam_ = new IntParam(this, "myIntParam", "this is an int param", ParamValidators.gt(0)); myDoubleParam_ = new DoubleParam(this, "myDoubleParam", "this is a double param", ParamValidators.inRange(0.0, 1.0)); List<String> validStrings = Arrays.asList("a", "b"); myStringParam_ = new Param<>(this, "myStringParam", "this is a string param", ParamValidators.inArray(validStrings)); myDoubleArrayParam_ = new DoubleArrayParam(this, "myDoubleArrayParam", "this is a double param"); setDefault(myIntParam(), 1); setDefault(myDoubleParam(), 0.5); setDefault(myDoubleArrayParam(), new double[]{1.0, 2.0}); }
private void init() { myIntParam_ = new IntParam(this, "myIntParam", "this is an int param", ParamValidators.gt(0)); myDoubleParam_ = new DoubleParam(this, "myDoubleParam", "this is a double param", ParamValidators.inRange(0.0, 1.0)); List<String> validStrings = Arrays.asList("a", "b"); myStringParam_ = new Param<>(this, "myStringParam", "this is a string param", ParamValidators.inArray(validStrings)); myDoubleArrayParam_ = new DoubleArrayParam(this, "myDoubleArrayParam", "this is a double param"); setDefault(myIntParam(), 1); setDefault(myDoubleParam(), 0.5); setDefault(myDoubleArrayParam(), new double[]{1.0, 2.0}); }
private void init() { myIntParam_ = new IntParam(this, "myIntParam", "this is an int param", ParamValidators.gt(0)); myDoubleParam_ = new DoubleParam(this, "myDoubleParam", "this is a double param", ParamValidators.inRange(0.0, 1.0)); List<String> validStrings = Arrays.asList("a", "b"); myStringParam_ = new Param<>(this, "myStringParam", "this is a string param", ParamValidators.inArray(validStrings)); myDoubleArrayParam_ = new DoubleArrayParam(this, "myDoubleArrayParam", "this is a double param"); setDefault(myIntParam(), 1); setDefault(myDoubleParam(), 0.5); setDefault(myDoubleArrayParam(), new double[]{1.0, 2.0}); }