Changeset 17934
- Timestamp:
- 04/09/21 20:14:14 (4 years ago)
- Location:
- trunk/HeuristicLab.Algorithms.DataAnalysis/3.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/GAM/Spline1dModel.cs
r17889 r17934 55 55 private Spline1dModel(Spline1dModel orig, Cloner cloner) : base(orig, cloner) { 56 56 this.inputVariable = orig.inputVariable; 57 this.interpolant = (alglib.spline1d.spline1dinterpolant)orig.interpolant.make_copy();57 if(orig.interpolant != null) this.interpolant = (alglib.spline1d.spline1dinterpolant)orig.interpolant.make_copy(); 58 58 } 59 59 public Spline1dModel(alglib.spline1d.spline1dinterpolant interpolant, string targetVar, string inputVar) 60 60 : base(targetVar, $"Spline model ({inputVar})") { 61 61 this.interpolant = (alglib.spline1d.spline1dinterpolant)interpolant.make_copy(); 62 this.inputVariable = inputVar; 62 this.inputVariable = inputVar; 63 63 } 64 64 … … 73 73 } 74 74 75 public double GetEstimatedValue(double x) => alglib.spline1d.spline1dcalc(interpolant, x );75 public double GetEstimatedValue(double x) => alglib.spline1d.spline1dcalc(interpolant, x, null); 76 76 77 77 public override IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/Nca/NcaModel.cs
r17931 r17934 66 66 var ds = ReduceDataset(dataset, rows); 67 67 // the new implementation of kNN uses selfmatch=true by default 68 nnModel = new NearestNeighbourModelAlglib_3_7(ds, Enumerable.Range(0, ds.Rows), k, selfMatch:false, ds.VariableNames.Last(), ds.VariableNames.Take(transformationMatrix.GetLength(1)), classValues: classValues);68 nnModel = new NearestNeighbourModelAlglib_3_7(ds, Enumerable.Range(0, ds.Rows), k, false, ds.VariableNames.Last(), ds.VariableNames.Take(transformationMatrix.GetLength(1)), classValues: classValues); 69 69 } 70 70 -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r17931 r17934 128 128 alglib.knnbuildersetdatasetcls(knnbuilder, inputMatrix, nRows, nFeatures, classValues.Length); 129 129 } 130 alglib.knnbuilderbuildknnmodel(knnbuilder, k, eps:0.0, out model, out var report); // eps=0 (exact k-nn search is performed)130 alglib.knnbuilderbuildknnmodel(knnbuilder, k, 0.0, out model, out var report); // eps=0 (exact k-nn search is performed) 131 131 132 132 } -
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
r17931 r17934 192 192 alglib.multilayerperceptron multiLayerPerceptron = null; 193 193 if (nLayers == 0) { 194 alglib.mlpcreate0(allowedInputVariables.Count(), nout:1, out multiLayerPerceptron);194 alglib.mlpcreate0(allowedInputVariables.Count(), 1, out multiLayerPerceptron); 195 195 } else if (nLayers == 1) { 196 alglib.mlpcreate1(allowedInputVariables.Count(), nHiddenNodes1, nout:1, out multiLayerPerceptron);196 alglib.mlpcreate1(allowedInputVariables.Count(), nHiddenNodes1, 1, out multiLayerPerceptron); 197 197 } else if (nLayers == 2) { 198 alglib.mlpcreate2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, nout:1, out multiLayerPerceptron);198 alglib.mlpcreate2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, 1, out multiLayerPerceptron); 199 199 } else throw new ArgumentException("Number of layers must be zero, one, or two.", "nLayers"); 200 200
Note: See TracChangeset
for help on using the changeset viewer.