public override IModelLikelihood <double, int> GenerateModelLikelihood(IDataSet <double, int> training_set)
        {
            svm_problem prob = new svm_problem();

            prob.l = training_set.InstanceCount;
            prob.x = CreateNodeArray(ToolsCollection.ConvertToArray2D(training_set.FeatureData));
            prob.y = ToolsCollection.ConvertToDoubleArray(ToolsCollection.ConvertToArray2D(training_set.LabelData).Select1DIndex1(0));

            //Train model---------------------------------------------------------------------
            return(new ModelLibSVMCSVC(training_set.DataContext, new C_SVC(prob, KernelHelper.RadialBasisFunctionKernel(this.Gamma), this.C, this.CacheSize, true)));
        }
 public AMatrix <Matrix <double> > Create(float[,] operant_0)
 {
     return(Create(ToolsCollection.ConvertToDoubleArray(operant_0)));
 }
 private DenseMatrix CreateDenseMatrix(AMatrix <Matrix <double> > operant_0, IList <double> operant_1)
 {
     return(new DenseMatrix(operant_0.Data.RowCount, operant_0.Data.ColumnCount, ToolsCollection.ConvertToDoubleArray(operant_1)));
 }
 public AMatrix <Matrix <double> > Create(IList <float> operant_0, bool transpose = false)
 {
     return(Create(ToolsCollection.ConvertToDoubleArray(operant_0), transpose));
 }
Exemplo n.º 5
0
 public void AddSeries(IList <float> x_values, IList <float> y_values)
 {
     AddSeries(ToolsCollection.ConvertToDoubleArray(x_values), ToolsCollection.ConvertToDoubleArray(y_values), Color.Black);
 }
Exemplo n.º 6
0
 public float [] ComputeInverse(float [] input)
 {
     return(((matrix_backward * ToolsCollection.ConvertToDoubleArray(input)) + means).ToArray1DFloat32());
 }
Exemplo n.º 7
0
 public float [] Compute(float [] input)
 {
     return((matrix_forward * (ToolsCollection.ConvertToDoubleArray(input) - means)).ToArray1DFloat32());
 }