Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8538


Ignore:
Timestamp:
08/29/12 16:53:38 (12 years ago)
Author:
mkommend
Message:

#1292: Merged trunk changes in preparation of the branch reintegration.

Location:
branches/DatasetFeatureCorrelation
Files:
17 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis

  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views

  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r8526 r8538  
    9393  </PropertyGroup>
    9494  <ItemGroup>
     95    <Reference Include="ALGLIB-3.6.0, Version=3.6.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    9596    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    9697    <Reference Include="HeuristicLab.Analysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     
    183184    <Compile Include="FeatureCorrelationView.Designer.cs">
    184185      <DependentUpon>FeatureCorrelationView.cs</DependentUpon>
     186    </Compile>
     187    <Compile Include="Clustering\ClusteringSolutionVisualizationView.cs">
     188      <SubType>UserControl</SubType>
     189    </Compile>
     190    <Compile Include="Clustering\ClusteringSolutionVisualizationView.Designer.cs">
     191      <DependentUpon>ClusteringSolutionVisualizationView.cs</DependentUpon>
    185192    </Compile>
    186193    <Compile Include="DataAnalysisSolutionEvaluationView.cs">
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/Plugin.cs.frame

    r7294 r8538  
    2626
    2727namespace HeuristicLab.Problems.DataAnalysis.Views {
    28   [Plugin("HeuristicLab.Problems.DataAnalysis.Views", "Provides views for base classes for data analysis tasks.", "3.4.2.$WCREV$")]
     28  [Plugin("HeuristicLab.Problems.DataAnalysis.Views", "Provides views for base classes for data analysis tasks.", "3.4.3.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.DataAnalysis.Views-3.4.dll", PluginFileType.Assembly)]
     30  [PluginDependency("HeuristicLab.ALGLIB", "3.6.0")]
     31  [PluginDependency("HeuristicLab.Analysis", "3.3")]
     32  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3033  [PluginDependency("HeuristicLab.Common", "3.3")]
    3134  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/Properties/AssemblyInfo.cs.frame

    r7259 r8538  
    5353// by using the '*' as shown below:
    5454[assembly: AssemblyVersion("3.4.0.0")]
    55 [assembly: AssemblyFileVersion("3.4.2.$WCREV$")]
     55[assembly: AssemblyFileVersion("3.4.3.$WCREV$")]
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs

    r8276 r8538  
    8989        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME;
    9090        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine;
    91         this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues);
    92         this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
     91        if (allEstimatedValues.Count > 0) {
     92          this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues);
     93          this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
     94        }
    9395        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content;
    9496        this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
     
    224226
    225227        IEnumerable<int> indices = null;
    226         IEnumerable<double> predictedValues = null;
     228        double[] predictedValues = null;
    227229        switch (series.Name) {
    228230          case ESTIMATEDVALUES_ALL_SERIES_NAME:
    229231            indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray();
    230232            var estimatedValues = Content.EstimatedValues.ToArray();
    231             predictedValues = indices.Select(index => estimatedValues[index]).ToList();
     233            predictedValues = indices.Select(index => estimatedValues[index]).ToArray();
    232234            break;
    233235          case ESTIMATEDVALUES_TRAINING_SERIES_NAME:
     
    240242            break;
    241243        }
    242         series.Points.DataBindXY(indices, predictedValues);
    243         this.InsertEmptyPoints(series);
     244        if (predictedValues.Length > 0) {
     245          series.Points.DataBindXY(indices, predictedValues);
     246          this.InsertEmptyPoints(series);
     247        }
    244248        chart.Legends[series.Legend].ForeColor = Color.Black;
    245249        UpdateCursorInterval();
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs

    r7259 r8538  
    9595
    9696    IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) {
    97       return new ClassificationEnsembleSolution(models, problemData);
     97      return new ClassificationEnsembleSolution(models, new ClassificationEnsembleProblemData(problemData));
    9898    }
    9999    #endregion
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs

    r8276 r8538  
    104104    }
    105105
     106    public ClassificationEnsembleSolution(IClassificationProblemData problemData) :
     107      this(Enumerable.Empty<IClassificationModel>(), problemData) { }
     108
    106109    public ClassificationEnsembleSolution(IEnumerable<IClassificationModel> models, IClassificationProblemData problemData)
    107110      : this(models, problemData,
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs

    r8276 r8538  
    277277
    278278    public ClassificationProblemData() : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) { }
     279
     280    public ClassificationProblemData(IClassificationProblemData classificationProblemData)
     281      : this(classificationProblemData.Dataset, classificationProblemData.AllowedInputVariables, classificationProblemData.TargetVariable) {
     282      TrainingPartition.Start = classificationProblemData.TrainingPartition.Start;
     283      TrainingPartition.End = classificationProblemData.TrainingPartition.End;
     284      TestPartition.Start = classificationProblemData.TestPartition.Start;
     285      TestPartition.End = classificationProblemData.TestPartition.End;
     286    }
     287
    279288    public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)
    280289      : base(dataset, allowedInputVariables) {
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs

    r8276 r8538  
    5151      valueEvaluationCache = new Dictionary<int, double>();
    5252      classValueEvaluationCache = new Dictionary<int, double>();
    53 
    54       SetAccuracyMaximizingThresholds();
    5553    }
    5654
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs

    r8276 r8538  
    9696    protected override void OnModelChanged() {
    9797      DeregisterEventHandler();
    98       SetAccuracyMaximizingThresholds();
    9998      RegisterEventHandler();
    10099      base.OnModelChanged();
     
    137136    }
    138137
    139     public void SetAccuracyMaximizingThresholds() {
    140       double[] classValues;
    141       double[] thresholds;
    142       var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);
    143       AccuracyMaximizationThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
    144 
    145       Model.SetThresholdsAndClassValues(thresholds, classValues);
    146     }
    147 
    148     public void SetClassDistibutionCutPointThresholds() {
    149       double[] classValues;
    150       double[] thresholds;
    151       var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);
    152       NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
    153 
    154       Model.SetThresholdsAndClassValues(thresholds, classValues);
    155     }
    156 
    157138    protected virtual void OnModelThresholdsChanged(EventArgs e) {
    158139      CalculateResults();
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs

    r7259 r8538  
    5555
    5656    public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    57       return new ConstantRegressionSolution(this, problemData);
     57      return new ConstantRegressionSolution(this, new RegressionProblemData(problemData));
    5858    }
    5959  }
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs

    r7259 r8538  
    102102
    103103    public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) {
    104       return new RegressionEnsembleSolution(this.Models, problemData);
     104      return new RegressionEnsembleSolution(this.Models, new RegressionEnsembleProblemData(problemData));
    105105    }
    106106    IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) {
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r8276 r8538  
    121121      : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) {
    122122    }
     123    public RegressionProblemData(IRegressionProblemData regressionProblemData)
     124      : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable) {
     125      TrainingPartition.Start = regressionProblemData.TrainingPartition.Start;
     126      TrainingPartition.End = regressionProblemData.TrainingPartition.End;
     127      TestPartition.Start = regressionProblemData.TestPartition.Start;
     128      TestPartition.End = regressionProblemData.TestPartition.End;
     129    }
    123130
    124131    public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/HoeffdingsDependenceCalculator.cs

    r8276 r8538  
    102102
    103103    /// <summary>
    104     /// Calculates midranks. Source: Numerical Recipes in C.
     104    /// Calculates midranks. Source: Numerical Recipes in C. p 642
    105105    /// </summary>
    106106    /// <param name="w">Sorted array of elements, replaces the elements by their rank, including midranking of ties</param>
     
    116116        } else {
    117117          int j;
    118           for (j = i + 1; j < n && w[j] <= w[i]; j++) ; // how far does it go (<= effectively means == as w must be sorted)
    119           double rank = 0.5 * (i + j - 1);
     118          for (j = i + 1; j < n && w[j] <= w[i]; j++) ; // how far does it go (<= effectively means == as w must be sorted, side-step equality for double values)
     119          double rank = 1 + 0.5 * (i + j - 1);
    120120          int k;
    121           for (k = i; k < j - 1; k++) w[k] = rank; // set the rank for all tied entries
     121          for (k = i; k < j; k++) w[k] = rank; // set the rank for all tied entries
    122122          i = j;
    123123        }
    124124      }
    125125
    126       if (i == n - 1) w[n - 1] = n - 1;   // if the last element was not tied, this is its rank
     126      if (i == n - 1) w[n - 1] = n;   // if the last element was not tied, this is its rank
    127127    }
    128128  }
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame

    r8038 r8538  
    2626
    2727namespace HeuristicLab.Problems.DataAnalysis {
    28   [Plugin("HeuristicLab.Problems.DataAnalysis","Provides base classes for data analysis tasks.", "3.4.2.$WCREV$")]
     28  [Plugin("HeuristicLab.Problems.DataAnalysis","Provides base classes for data analysis tasks.", "3.4.3.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.DataAnalysis-3.4.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Analysis", "3.3")]
  • branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Properties/AssemblyInfo.cs.frame

    r7259 r8538  
    5353// by using the '*' as shown below:
    5454[assembly: AssemblyVersion("3.4.0.0")]
    55 [assembly: AssemblyFileVersion("3.4.2.$WCREV$")]
     55[assembly: AssemblyFileVersion("3.4.3.$WCREV$")]
Note: See TracChangeset for help on using the changeset viewer.