本文整理汇总了Java中ml.options.Options类的典型用法代码示例。如果您正苦于以下问题:Java Options类的具体用法?Java Options怎么用?Java Options使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Options类属于ml.options包,在下文中一共展示了Options类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import ml.options.Options; //导入依赖的package包/类
public static void main(final String[] arguments)
{
final Options options = new Options(arguments, Multiplicity.ZERO_OR_ONE);
final OptionSet defaultOptions = options.getSet();
defaultOptions.addOption("f", false, Separator.BLANK, Multiplicity.ONCE);
defaultOptions.addOption("v", Multiplicity.ZERO_OR_ONE);
if (!options.check(false, false))
{
out.println("ERROR: " + options.getCheckErrors());
System.exit(-1);
}
out.println("File path/name is " + defaultOptions.getOption("f").getResultValue(0));
out.println("Verbosity is set to " + defaultOptions.isSet("v"));
}
示例2: L1NMF
import ml.options.Options; //导入依赖的package包/类
public L1NMF(Options options) {
maxIter = options.maxIter;
epsilon = options.epsilon;
gamma = options.gamma;
mu = options.mu;
verbose = options.verbose;
calc_OV = options.calc_OV;
nClus = options.nClus;
}
示例3: NMF
import ml.options.Options; //导入依赖的package包/类
public NMF() {
Options options = new Options();
nClus = options.nClus;
maxIter = options.maxIter;
epsilon = options.epsilon;
verbose = options.verbose;
calc_OV = options.calc_OV;
gamma = 0;
mu = 0;
}
示例4: main
import ml.options.Options; //导入依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
double[][] data = {{1, 2, 3, 2},
{4, 2, 3, 6},
{5, 1, 4, 1}};
double[][] depVars = {{3, 2},
{2, 3},
{1, 4}};
Options options = new Options();
options.maxIter = 600;
options.lambda = 0.1;
options.verbose = !true;
options.calc_OV = !true;
options.epsilon = 1e-5;
Regression LASSO = new LASSO(options);
LASSO.feedData(data);
LASSO.feedDependentVariables(depVars);
tic();
LASSO.train();
fprintf("Elapsed time: %.3f seconds\n\n", toc());
fprintf("Projection matrix:\n");
display(LASSO.W);
Matrix Yt = LASSO.predict(data);
fprintf("Predicted dependent variables:\n");
display(Yt);
}
示例5: Regression
import ml.options.Options; //导入依赖的package包/类
public Regression(Options options) {
ny = 0;
p = 0;
n = 0;
X = null;
Y = null;
W = null;
this.epsilon = options.epsilon;
this.maxIter = options.maxIter;
}
示例6: TemporalLASSO
import ml.options.Options; //导入依赖的package包/类
public TemporalLASSO(Options options, int gType) {
this.options = options;
this.gType = gType;
}
示例7: ReflectedLogisticRegression
import ml.options.Options; //导入依赖的package包/类
public ReflectedLogisticRegression(Options options) {
this.options = options;
}
示例8: TemporalLogisticRegression
import ml.options.Options; //导入依赖的package包/类
public TemporalLogisticRegression(Options options) {
this.options = options;
}
示例9: LASSO
import ml.options.Options; //导入依赖的package包/类
public LASSO(Options options) {
super(options);
lambda = options.lambda;
calc_OV = options.calc_OV;
verbose = options.verbose;
}
示例10: main
import ml.options.Options; //导入依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
double[][] data = {
{1, 2, 3, 2},
{4, 2, 3, 6},
{5, 1, 4, 1}
};
double[][] depVars = {
{3, 2},
{2, 3},
{1, 4}
};
Options options = new Options();
options.maxIter = 600;
options.lambda = 0.1;
options.verbose = !true;
options.calc_OV = !true;
options.epsilon = 1e-5;
Regression LR = new LinearRegression(options);
LR.feedData(data);
LR.feedDependentVariables(depVars);
tic();
LR.train();
fprintf("Elapsed time: %.3f seconds\n\n", toc());
fprintf("Projection matrix:\n");
display(LR.W);
fprintf("Bias vector:\n");
display(((LinearRegression)LR).B);
Matrix Yt = LR.predict(data);
fprintf("Predicted dependent variables:\n");
display(Yt);
}
示例11: LinearRegression
import ml.options.Options; //导入依赖的package包/类
public LinearRegression(Options options) {
super(options);
lambda = options.lambda;
calc_OV = options.calc_OV;
verbose = options.verbose;
}
示例12: main
import ml.options.Options; //导入依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
ConsagFitNesseFixtures consagFitNesseFixtures = new ConsagFitNesseFixtures();
Options opt = new Options(args, Options.Prefix.DASH, Options.Multiplicity.ZERO_OR_ONE);
opt.getSet().addOption("version")
.addOption("help")
.addOption("?")
.addOption("listfixtures")
.addOption("fixturelist")
.addOption("noclassfilter")
.addOption("loglevel", Options.Separator.BLANK)
.addOption("fixtureversion", Options.Separator.BLANK)
;
if(!opt.check(false, false)) {
errMsg("Invalid arguments specified. Found >" + Integer.toString(args.length) +"< command line argument(s).");
errMsg(opt.getCheckErrors());
// errMsg(opt.toString());
usage();
System.exit(1);
}
if(opt.getSet().isSet("version")) {
outMsg("Version: " +getVersion());
}
if(opt.getSet().isSet("help") || opt.getSet().isSet("?")) {
usage();
}
if(opt.getSet().isSet("loglevel")) {
logLevel =Integer.parseInt(opt.getSet().getOption("loglevel").getResultValue(0));
}
if(opt.getSet().isSet("noclassfilter")) {
noClassFilter=true;
} else {
noClassFilter=false;
}
if(opt.getSet().isSet("listfixtures") || opt.getSet().isSet("fixturelist")) {
outFixtureList();
}
if(opt.getSet().isSet("fixtureversion")) {
String fixtureName= opt.getSet().getOption("fixtureversion").getResultValue(0);
if(Constants.ALL.equalsIgnoreCase(fixtureName)) {
outVersionForAllFixtures();
} else {
outMsg(getFixtureVersion(fixtureName));
}
}
}