public toolbox(dataSet X, bool train = true) { if (train)//to train { _X = X; _fGene = new featureGenerator(X); _model = new model(X, _fGene); _inf = new inference(this); _grad = new gradient(this); initOptimizer(); } else//to test { _X = X; _model = new model(Global.fModel); _fGene = new featureGenerator(X); _inf = new inference(this); _grad = new gradient(this); } }
public inference(toolbox tb) { _optim = tb.Optim; _fGene = tb.FGene; _grad = tb.Grad; }