Changeset 8542 for trunk/sources/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 08/30/12 11:47:47 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r7969 r8542 93 93 </PropertyGroup> 94 94 <ItemGroup> 95 <Reference Include="ALGLIB-3.6.0, Version=3.6.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 <HintPath>..\..\bin\ALGLIB-3.6.0.dll</HintPath> 97 </Reference> 98 <Reference Include="HeuristicLab.ALGLIB-3.6.0, Version=3.6.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 99 <HintPath>..\..\bin\HeuristicLab.ALGLIB-3.6.0.dll</HintPath> 100 </Reference> 95 101 <Reference Include="System" /> 96 102 <Reference Include="System.Core"> … … 122 128 <Compile Include="Implementation\Clustering\ClusteringProblemData.cs" /> 123 129 <Compile Include="Implementation\Clustering\ClusteringSolution.cs" /> 130 <Compile Include="Implementation\FeatureCorrelation.cs" /> 124 131 <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" /> 125 132 <Compile Include="Implementation\Regression\ConstantRegressionSolution.cs" /> … … 180 187 <Compile Include="OnlineCalculators\OnlinePearsonsRSquaredCalculator.cs" /> 181 188 <Compile Include="Implementation\Regression\RegressionSolution.cs" /> 189 <Compile Include="OnlineCalculators\SpearmansRankCorrelationCoefficientCalculator.cs" /> 182 190 <Compile Include="Plugin.cs" /> 183 191 <Compile Include="Implementation\Classification\ThresholdCalculators\AccuracyMaximizationThresholdCalculator.cs" /> … … 209 217 </ItemGroup> 210 218 <ItemGroup> 219 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> 220 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project> 221 <Name>HeuristicLab.Analysis-3.3</Name> 222 <Private>False</Private> 223 </ProjectReference> 211 224 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 212 225 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
r8139 r8542 37 37 protected const string TrainingPartitionParameterName = "TrainingPartition"; 38 38 protected const string TestPartitionParameterName = "TestPartition"; 39 protected const string DatasetCorrelationParameterName = "Dataset Correlation"; 39 40 40 41 #region parameter properites … … 50 51 public IFixedValueParameter<IntRange> TestPartitionParameter { 51 52 get { return (IFixedValueParameter<IntRange>)Parameters[TestPartitionParameterName]; } 53 } 54 public IFixedValueParameter<FeatureCorrelation> DatasetCorrelationParameter { 55 get { return (IFixedValueParameter<FeatureCorrelation>)Parameters[DatasetCorrelationParameterName]; } 52 56 } 53 57 #endregion … … 73 77 public IntRange TestPartition { 74 78 get { return TestPartitionParameter.Value; } 79 } 80 public FeatureCorrelation DatasetCorrelation { 81 get { return DatasetCorrelationParameter.Value; } 75 82 } 76 83 … … 107 114 [StorableConstructor] 108 115 protected DataAnalysisProblemData(bool deserializing) : base(deserializing) { } 116 109 117 [StorableHook(HookType.AfterDeserialization)] 110 118 private void AfterDeserialization() { 111 119 RegisterEventHandlers(); 120 #region Backwards compatible code, remove with 3.4 121 if (!Parameters.ContainsKey(DatasetCorrelationParameterName)) { 122 Parameters.Add(new FixedValueParameter<FeatureCorrelation>(DatasetCorrelationParameterName, "", new FeatureCorrelation(this))); 123 } 124 #endregion 112 125 } 113 126 … … 132 145 Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd))); 133 146 Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd))); 147 Parameters.Add(new FixedValueParameter<FeatureCorrelation>(DatasetCorrelationParameterName, "", new FeatureCorrelation(this))); 134 148 135 149 ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs
r8538 r8542 35 35 [Item("FeatureCorrelation", "Represents the correlation of features in a data set.")] 36 36 public class FeatureCorrelation : HeatMap { 37 38 37 private const string PearsonsR = "Pearsons R"; 39 38 private const string PearsonsRSquared = "Pearsons R Squared"; … … 52 51 53 52 private IDataAnalysisProblemData problemData; 53 [Storable] 54 54 public IDataAnalysisProblemData ProblemData { 55 55 get { return problemData; } … … 67 67 private BackgroundWorkerInfo bwInfo; 68 68 69 public FeatureCorrelation() 69 public FeatureCorrelation() { 70 this.Title = "Feature Correlation"; 71 this.columnNames = problemData.Dataset.DoubleVariables.ToList(); 72 this.rowNames = problemData.Dataset.DoubleVariables.ToList(); 73 sortableView = true; 74 } 75 public FeatureCorrelation(IDataAnalysisProblemData problemData) 70 76 : base() { 71 this.Title = "Feature Correlation";72 this.columnNames = Enumerable.Range(1, 2).Select(x => x.ToString()).ToList();73 this.rowNames = Enumerable.Range(1, 2).Select(x => x.ToString()).ToList();74 sortableView = true;75 }76 77 public FeatureCorrelation(IDataAnalysisProblemData problemData) {78 77 this.problemData = problemData; 79 78 this.Title = "Feature Correlation"; … … 84 83 protected FeatureCorrelation(FeatureCorrelation original, Cloner cloner) 85 84 : base(original, cloner) { 86 this.Title = "Feature Correlation"; 87 this.problemData = original.problemData; 88 this.columnNames = original.problemData.Dataset.DoubleVariables.ToList(); 89 this.rowNames = original.problemData.Dataset.DoubleVariables.ToList(); 85 this.problemData = cloner.Clone(original.problemData); 90 86 } 91 87 public override IDeepCloneable Clone(Cloner cloner) { 92 88 return new FeatureCorrelation(this, cloner); 93 89 } 90 91 [StorableConstructor] 92 protected FeatureCorrelation(bool deserializing) : base(deserializing) { } 94 93 95 94 public void Recalculate(string calc, string partition) { … … 244 243 return OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error); 245 244 } else { 246 return OnlinePearsonsRSquaredCalculator.CalculateR(var1, var2, out error);245 return Math.Sqrt(OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error)); 247 246 } 248 247 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/HoeffdingsDependenceCalculator.cs
r8355 r8542 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common;26 25 27 26 namespace HeuristicLab.Problems.DataAnalysis { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame
r8246 r8542 28 28 [Plugin("HeuristicLab.Problems.DataAnalysis","Provides base classes for data analysis tasks.", "3.4.3.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis-3.4.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.ALGLIB","3.6")] 31 [PluginDependency("HeuristicLab.Analysis", "3.3")] 30 32 [PluginDependency("HeuristicLab.Collections", "3.3")] 31 33 [PluginDependency("HeuristicLab.Common", "3.3")]
Note: See TracChangeset
for help on using the changeset viewer.