public Benchmark(string name, IEnumerable<Learner> learners, IEnumerable<int> dataSets, int trainingSetSize, int validationSetSize, int numberOfRuns, bool useTestData = false) { Name = name; this.dataSets = dataSets.Select(num => new DataSet(num, trainingSetSize, validationSetSize)).ToArray(); this.numberOfRuns = numberOfRuns; this.learners = new Dictionary<Learner, LearnerParameters>(); this.useTestData = useTestData; foreach (Learner learner in learners) { LearnerParameters parameters = new LearnerParameters(learner.Name()); this.learners.Add(learner, parameters); } }
public abstract void Initialise(LearnerParameters parameters, int iteration);
private string IterationName(LearnerParameters parameters, int iteration) { if (parameters.StepSize == 0) { return "Static Setting"; } return String.Format("{0}: {1}", parameters.RunningParameterName, (parameters.Minimum + (iteration * parameters.StepSize)).ToString(parameters.RunningParameterDecimal ? "00.000000" : "000")); }
public override void Initialise(LearnerParameters parameters, int iteration) { maximum_iterations = parameters.MaxIterations; maximum_states = parameters.MaxStates; //const int NUM_SYMBOLS = 42; //HMMGraph graph = new HMMGraph(NUM_SYMBOLS); //for (int i = 0; i < parameters.Minimum; i++) { // graph.AddNode(new Node()); //} //foreach (Node n in graph.Nodes) { // foreach (Node m in graph.Nodes) { // n.SetTransition(m, 0.5); // } // for (int i = 0; i < NUM_SYMBOLS; i++) { // n.SetEmission(i, 0.5); // } //} //graph.Normalize(); //this.hmm = SparseHiddenMarkovModel.FromGraph(graph); }