本文整理汇总了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"));
}
开发者ID:dustinmarx,项目名称:java-cli-demos,代码行数:15,代码来源:Main.java
示例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;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:10,代码来源:L1NMF.java
示例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;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:11,代码来源:NMF.java
示例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);
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:37,代码来源:LASSO.java
示例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;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:11,代码来源:Regression.java
示例6: TemporalLASSO
import ml.options.Options; //导入依赖的package包/类
public TemporalLASSO(Options options, int gType) {
this.options = options;
this.gType = gType;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:5,代码来源:TemporalLASSO.java
示例7: ReflectedLogisticRegression
import ml.options.Options; //导入依赖的package包/类
public ReflectedLogisticRegression(Options options) {
this.options = options;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:4,代码来源:ReflectedLogisticRegression.java
示例8: TemporalLogisticRegression
import ml.options.Options; //导入依赖的package包/类
public TemporalLogisticRegression(Options options) {
this.options = options;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:4,代码来源:TemporalLogisticRegression.java
示例9: LASSO
import ml.options.Options; //导入依赖的package包/类
public LASSO(Options options) {
super(options);
lambda = options.lambda;
calc_OV = options.calc_OV;
verbose = options.verbose;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:7,代码来源:LASSO.java
示例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);
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:44,代码来源:LinearRegression.java
示例11: LinearRegression
import ml.options.Options; //导入依赖的package包/类
public LinearRegression(Options options) {
super(options);
lambda = options.lambda;
calc_OV = options.calc_OV;
verbose = options.verbose;
}
开发者ID:MingjieQian,项目名称:LAML,代码行数:7,代码来源:LinearRegression.java
示例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));
}
}
}
开发者ID:consag,项目名称:fitnessefixtures,代码行数:53,代码来源:ConsagFitNesseFixtures.java
注:本文中的ml.options.Options类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论