- Timestamp:
- 06/25/15 18:21:19 (9 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.DataAnalysis (added) merged: 12504,12509
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs
r12012 r12515 26 26 namespace HeuristicLab.Algorithms.DataAnalysis { 27 27 public static class AlglibUtil { 28 public static double[,] PrepareInputMatrix( Dataset dataset, IEnumerable<string> variables, IEnumerable<int> rows) {28 public static double[,] PrepareInputMatrix(IDataset dataset, IEnumerable<string> variables, IEnumerable<int> rows) { 29 29 List<string> variablesList = variables.ToList(); 30 30 List<int> rowsList = rows.ToList(); … … 45 45 return matrix; 46 46 } 47 public static double[,] PrepareAndScaleInputMatrix( Dataset dataset, IEnumerable<string> variables, IEnumerable<int> rows, Scaling scaling) {47 public static double[,] PrepareAndScaleInputMatrix(IDataset dataset, IEnumerable<string> variables, IEnumerable<int> rows, Scaling scaling) { 48 48 List<string> variablesList = variables.ToList(); 49 49 List<int> rowsList = rows.ToList(); -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
r12012 r12515 37 37 /// </summary> 38 38 [Item("Linear Discriminant Analysis", "Linear discriminant analysis classification algorithm (wrapper for ALGLIB).")] 39 [Creatable( "Data Analysis")]39 [Creatable(CreatableAttribute.Categories.DataAnalysisClassification, Priority = 100)] 40 40 [StorableClass] 41 41 public sealed class LinearDiscriminantAnalysis : FixedDataAnalysisAlgorithm<IClassificationProblem> { … … 65 65 66 66 public static IClassificationSolution CreateLinearDiscriminantAnalysisSolution(IClassificationProblemData problemData) { 67 Datasetdataset = problemData.Dataset;67 var dataset = problemData.Dataset; 68 68 string targetVariable = problemData.TargetVariable; 69 69 IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables; -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r12012 r12515 38 38 /// </summary> 39 39 [Item("Linear Regression", "Linear regression data analysis algorithm (wrapper for ALGLIB).")] 40 [Creatable( "Data Analysis")]40 [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 100)] 41 41 [StorableClass] 42 42 public sealed class LinearRegression : FixedDataAnalysisAlgorithm<IRegressionProblem> { … … 69 69 70 70 public static ISymbolicRegressionSolution CreateLinearRegressionSolution(IRegressionProblemData problemData, out double rmsError, out double cvRmsError) { 71 Datasetdataset = problemData.Dataset;71 var dataset = problemData.Dataset; 72 72 string targetVariable = problemData.TargetVariable; 73 73 IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables; -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
r12012 r12515 35 35 /// </summary> 36 36 [Item("Multinomial Logit Classification", "Multinomial logit classification data analysis algorithm (wrapper for ALGLIB).")] 37 [Creatable( "Data Analysis")]37 [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 180)] 38 38 [StorableClass] 39 39 public sealed class MultiNomialLogitClassification : FixedDataAnalysisAlgorithm<IClassificationProblem> { … … 66 66 67 67 public static IClassificationSolution CreateLogitClassificationSolution(IClassificationProblemData problemData, out double rmsError, out double relClassError) { 68 Datasetdataset = problemData.Dataset;68 var dataset = problemData.Dataset; 69 69 string targetVariable = problemData.TargetVariable; 70 70 IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables; -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs
r12012 r12515 82 82 } 83 83 84 public IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {84 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 85 85 double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows); 86 86 -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/Scaling.cs
r12012 r12515 41 41 scalingParameters.Add(pair.Key, Tuple.Create(pair.Value.Item1, pair.Value.Item2)); 42 42 } 43 public Scaling( Dataset ds, IEnumerable<string> variables, IEnumerable<int> rows) {43 public Scaling(IDataset ds, IEnumerable<string> variables, IEnumerable<int> rows) { 44 44 foreach (var variable in variables) { 45 45 var values = ds.GetDoubleValues(variable, rows); … … 54 54 } 55 55 56 public IEnumerable<double> GetScaledValues( Dataset ds, string variable, IEnumerable<int> rows) {56 public IEnumerable<double> GetScaledValues(IDataset ds, string variable, IEnumerable<int> rows) { 57 57 double min = scalingParameters[variable].Item1; 58 58 double max = scalingParameters[variable].Item2;
Note: See TracChangeset
for help on using the changeset viewer.