public CalculationStore(ITrainingData trainingData) { this.trainingData = trainingData; this.Alphas = new double[trainingData.Length]; this.Weights = new double[trainingData.Dimension]; this.B = new double[1]; }
public double calculate(ITrainingData data, int index1, int index2) { double dotProduct = 0; for(int i = 0; i < data.Dimension; i++) { dotProduct += data.GetTrainingData(index1, i) * data.GetTrainingData(index2, i); } return dotProduct; }
public SMOSVMAlgorithm(ITrainingData trainingData, IKernel kernel) { this.trainingData = trainingData; this.kernel = kernel; this.calculationStore = new CalculationStore(this.trainingData); }
/// <summary> /// Initializes a new instance of the <see cref="Training"/> class. /// </summary> /// <param name="training">The training.</param> internal Training(ITrainingData training) { _training = training; }
/// <summary> /// Initializes a new instance of the <see cref="Training"/> class. /// </summary> public Training() { _training = new TrainingDb(); }