- Timestamp:
- 06/27/12 17:34:17 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
r7259 r8139 68 68 string targetVariable = problemData.TargetVariable; 69 69 IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables; 70 IEnumerable<int> rows = problemData.TrainingIndi zes;70 IEnumerable<int> rows = problemData.TrainingIndices; 71 71 int nClasses = problemData.ClassNames.Count(); 72 72 double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows); -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r7588 r8139 72 72 string targetVariable = problemData.TargetVariable; 73 73 IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables; 74 IEnumerable<int> rows = problemData.TrainingIndi zes;74 IEnumerable<int> rows = problemData.TrainingIndices; 75 75 double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows); 76 76 if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x))) -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
r7259 r8139 69 69 string targetVariable = problemData.TargetVariable; 70 70 IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables; 71 IEnumerable<int> rows = problemData.TrainingIndi zes;71 IEnumerable<int> rows = problemData.TrainingIndices; 72 72 double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows); 73 73 if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x))) … … 81 81 int nClasses = classValues.Count(); 82 82 // map original class values to values [0..nClasses-1] 83 Dictionary<double, double> classIndi zes = new Dictionary<double, double>();83 Dictionary<double, double> classIndices = new Dictionary<double, double>(); 84 84 for (int i = 0; i < nClasses; i++) { 85 classIndi zes[classValues[i]] = i;85 classIndices[classValues[i]] = i; 86 86 } 87 87 for (int row = 0; row < nRows; row++) { 88 inputMatrix[row, nFeatures] = classIndi zes[inputMatrix[row, nFeatures]];88 inputMatrix[row, nFeatures] = classIndices[inputMatrix[row, nFeatures]]; 89 89 } 90 90 int info;
Note: See TracChangeset
for help on using the changeset viewer.