Ejemplo n.º 1
1
 protected NcaModel(NcaModel original, Cloner cloner)
   : base(original, cloner) {
   this.transformationMatrix = (double[,])original.transformationMatrix.Clone();
   this.allowedInputVariables = (string[])original.allowedInputVariables.Clone();
   this.nnModel = cloner.Clone(original.nnModel);
   this.classValues = (double[])original.classValues.Clone();
 }
Ejemplo n.º 2
0
 protected NcaModel(NcaModel original, Cloner cloner)
     : base(original, cloner)
 {
     this.transformationMatrix  = (double[, ])original.transformationMatrix.Clone();
     this.allowedInputVariables = (string[])original.allowedInputVariables.Clone();
     this.nnModel     = cloner.Clone(original.nnModel);
     this.classValues = (double[])original.classValues.Clone();
 }
Ejemplo n.º 3
0
    public NcaModel(int k, double[,] transformationMatrix, IDataset dataset, IEnumerable<int> rows, string targetVariable, IEnumerable<string> allowedInputVariables, double[] classValues) {
      Name = ItemName;
      Description = ItemDescription;
      this.transformationMatrix = (double[,])transformationMatrix.Clone();
      this.allowedInputVariables = allowedInputVariables.ToArray();
      this.targetVariable = targetVariable;
      this.classValues = (double[])classValues.Clone();

      var ds = ReduceDataset(dataset, rows);
      nnModel = new NearestNeighbourModel(ds, Enumerable.Range(0, ds.Rows), k, ds.VariableNames.Last(), ds.VariableNames.Take(transformationMatrix.GetLength(1)), classValues);
    }
Ejemplo n.º 4
0
        public NcaModel(int k, double[,] transformationMatrix, IDataset dataset, IEnumerable <int> rows, string targetVariable, IEnumerable <string> allowedInputVariables, double[] classValues)
            : base(targetVariable)
        {
            Name        = ItemName;
            Description = ItemDescription;
            this.transformationMatrix  = (double[, ])transformationMatrix.Clone();
            this.allowedInputVariables = allowedInputVariables.ToArray();
            this.classValues           = (double[])classValues.Clone();

            var ds = ReduceDataset(dataset, rows);

            nnModel = new NearestNeighbourModel(ds, Enumerable.Range(0, ds.Rows), k, false, ds.VariableNames.Last(), ds.VariableNames.Take(transformationMatrix.GetLength(1)), classValues: classValues);
        }
Ejemplo n.º 5
0
 public NearestNeighbourClassificationSolution(IClassificationProblemData problemData, INearestNeighbourModel nnModel)
     : base(nnModel, problemData)
 {
 }
 public NearestNeighbourClassificationSolution(IClassificationProblemData problemData, INearestNeighbourModel nnModel)
   : base(nnModel, problemData) {
 }
 public NearestNeighbourRegressionSolution(IRegressionProblemData problemData, INearestNeighbourModel nnModel)
   : base(nnModel, problemData) {
 }
 public NearestNeighbourRegressionSolution(INearestNeighbourModel nnModel, IRegressionProblemData problemData)
     : base(nnModel, problemData)
 {
 }