Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 18:21:19 (9 years ago)
Author:
dglaser
Message:

#2388: Merged trunk into HiveStatistics branch

Location:
branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis

  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs

    r12012 r12515  
    2626namespace HeuristicLab.Algorithms.DataAnalysis {
    2727  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) {
    2929      List<string> variablesList = variables.ToList();
    3030      List<int> rowsList = rows.ToList();
     
    4545      return matrix;
    4646    }
    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) {
    4848      List<string> variablesList = variables.ToList();
    4949      List<int> rowsList = rows.ToList();
  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs

    r12012 r12515  
    3737  /// </summary>
    3838  [Item("Linear Discriminant Analysis", "Linear discriminant analysis classification algorithm (wrapper for ALGLIB).")]
    39   [Creatable("Data Analysis")]
     39  [Creatable(CreatableAttribute.Categories.DataAnalysisClassification, Priority = 100)]
    4040  [StorableClass]
    4141  public sealed class LinearDiscriminantAnalysis : FixedDataAnalysisAlgorithm<IClassificationProblem> {
     
    6565
    6666    public static IClassificationSolution CreateLinearDiscriminantAnalysisSolution(IClassificationProblemData problemData) {
    67       Dataset dataset = problemData.Dataset;
     67      var dataset = problemData.Dataset;
    6868      string targetVariable = problemData.TargetVariable;
    6969      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs

    r12012 r12515  
    3838  /// </summary>
    3939  [Item("Linear Regression", "Linear regression data analysis algorithm (wrapper for ALGLIB).")]
    40   [Creatable("Data Analysis")]
     40  [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 100)]
    4141  [StorableClass]
    4242  public sealed class LinearRegression : FixedDataAnalysisAlgorithm<IRegressionProblem> {
     
    6969
    7070    public static ISymbolicRegressionSolution CreateLinearRegressionSolution(IRegressionProblemData problemData, out double rmsError, out double cvRmsError) {
    71       Dataset dataset = problemData.Dataset;
     71      var dataset = problemData.Dataset;
    7272      string targetVariable = problemData.TargetVariable;
    7373      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs

    r12012 r12515  
    3535  /// </summary>
    3636  [Item("Multinomial Logit Classification", "Multinomial logit classification data analysis algorithm (wrapper for ALGLIB).")]
    37   [Creatable("Data Analysis")]
     37  [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 180)]
    3838  [StorableClass]
    3939  public sealed class MultiNomialLogitClassification : FixedDataAnalysisAlgorithm<IClassificationProblem> {
     
    6666
    6767    public static IClassificationSolution CreateLogitClassificationSolution(IClassificationProblemData problemData, out double rmsError, out double relClassError) {
    68       Dataset dataset = problemData.Dataset;
     68      var dataset = problemData.Dataset;
    6969      string targetVariable = problemData.TargetVariable;
    7070      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitModel.cs

    r12012 r12515  
    8282    }
    8383
    84     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
     84    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
    8585      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows);
    8686
  • branches/HiveStatistics/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/Scaling.cs

    r12012 r12515  
    4141        scalingParameters.Add(pair.Key, Tuple.Create(pair.Value.Item1, pair.Value.Item2));
    4242    }
    43     public Scaling(Dataset ds, IEnumerable<string> variables, IEnumerable<int> rows) {
     43    public Scaling(IDataset ds, IEnumerable<string> variables, IEnumerable<int> rows) {
    4444      foreach (var variable in variables) {
    4545        var values = ds.GetDoubleValues(variable, rows);
     
    5454    }
    5555
    56     public IEnumerable<double> GetScaledValues(Dataset ds, string variable, IEnumerable<int> rows) {
     56    public IEnumerable<double> GetScaledValues(IDataset ds, string variable, IEnumerable<int> rows) {
    5757      double min = scalingParameters[variable].Item1;
    5858      double max = scalingParameters[variable].Item2;
Note: See TracChangeset for help on using the changeset viewer.