- Timestamp:
- 03/19/18 10:25:45 (7 years ago)
- Location:
- branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4
- Files:
-
- 10 added
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:ignore
-
old new 5 5 *.vs10x 6 6 Plugin.cs 7 *.DotSettings
-
- Property svn:ignore
-
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r15837 r15846 101 101 <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 102 102 <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath> 103 <Private>False</Private> 104 </Reference> 105 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" /> 103 <SpecificVersion>False</SpecificVersion> 104 <Private>False</Private> 105 </Reference> 106 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 107 <SpecificVersion>False</SpecificVersion> 108 <Private>False</Private> 109 </Reference> 106 110 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 107 111 <SpecificVersion>False</SpecificVersion> 108 112 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath> 113 <Private>False</Private> 109 114 </Reference> 110 115 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 116 <SpecificVersion>False</SpecificVersion> 112 117 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 118 <Private>False</Private> 113 119 </Reference> 114 120 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 115 121 <SpecificVersion>False</SpecificVersion> 116 122 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath> 123 <Private>False</Private> 117 124 </Reference> 118 125 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 119 126 <SpecificVersion>False</SpecificVersion> 120 127 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath> 128 <Private>False</Private> 121 129 </Reference> 122 130 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 131 <SpecificVersion>False</SpecificVersion> 124 132 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 133 <Private>False</Private> 125 134 </Reference> 126 135 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 136 <SpecificVersion>False</SpecificVersion> 128 137 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 138 <Private>False</Private> 129 139 </Reference> 130 140 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 131 141 <SpecificVersion>False</SpecificVersion> 132 142 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 143 <Private>False</Private> 133 144 </Reference> 134 145 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 146 <SpecificVersion>False</SpecificVersion> 136 147 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 148 <Private>False</Private> 137 149 </Reference> 138 150 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 139 151 <SpecificVersion>False</SpecificVersion> 140 152 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 153 <Private>False</Private> 141 154 </Reference> 142 155 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 143 156 <SpecificVersion>False</SpecificVersion> 144 157 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath> 158 <Private>False</Private> 145 159 </Reference> 146 160 <Reference Include="System" /> … … 181 195 <Compile Include="Implementation\ConstantModel.cs" /> 182 196 <Compile Include="Implementation\DataAnalysisModel.cs" /> 197 <Compile Include="Implementation\DataAnalysisTransformation.cs" /> 183 198 <Compile Include="Implementation\Regression\ConfidenceBoundRegressionSolution.cs" /> 184 199 <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" /> … … 191 206 <Compile Include="Implementation\Regression\RegressionModel.cs" /> 192 207 <Compile Include="Implementation\Regression\RegressionSolutionVariableImpactsCalculator.cs" /> 208 <Compile Include="Implementation\Regression\TransformedRegressionModel.cs" /> 209 <Compile Include="Implementation\Regression\TransformedRegressionSolution.cs" /> 193 210 <Compile Include="Implementation\TimeSeriesPrognosis\Models\ConstantTimeSeriesPrognosisModel.cs" /> 194 211 <Compile Include="Implementation\TimeSeriesPrognosis\Models\TimeSeriesPrognosisAutoRegressiveModel.cs" /> … … 198 215 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolution.cs" /> 199 216 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolutionBase.cs" /> 200 <Compile Include="Implementation\Transformations\CopyColumnTransformation.cs" /> 217 <None Include="Implementation\Transformations %28old%29\CopyColumnTransformation.cs" /> 218 <None Include="Implementation\Transformations %28old%29\ExponentialTransformation.cs" /> 219 <None Include="Implementation\Transformations %28old%29\LinearTransformation.cs" /> 220 <None Include="Implementation\Transformations %28old%29\LogarithmicTransformation.cs" /> 221 <None Include="Implementation\Transformations %28old%29\PowerTransformation.cs" /> 222 <None Include="Implementation\Transformations %28old%29\ReciprocalTransformation.cs" /> 223 <None Include="Implementation\Transformations %28old%29\ShiftStandardDistributionTransformation.cs" /> 224 <None Include="Implementation\Transformations %28old%29\ShiftToRangeTransformation.cs" /> 225 <None Include="Implementation\Transformations %28old%29\Transformation.cs" /> 201 226 <Compile Include="Implementation\Transformations\ExponentialTransformation.cs" /> 227 <Compile Include="Implementation\Transformations\IdentityTransformation.cs" /> 202 228 <Compile Include="Implementation\Transformations\LinearTransformation.cs" /> 203 <Compile Include="Implementation\Transformations\LogarithmicTransformation.cs" /> 204 <Compile Include="Implementation\Transformations\PowerTransformation.cs" /> 205 <Compile Include="Implementation\Transformations\ReciprocalTransformation.cs" /> 206 <Compile Include="Implementation\Transformations\ShiftStandardDistributionTransformation.cs" /> 207 <Compile Include="Implementation\Transformations\ShiftToRangeTransformation.cs" /> 229 <Compile Include="Implementation\Transformations\LogarithmTransformation.cs" /> 208 230 <Compile Include="Implementation\Transformations\Transformation.cs" /> 231 <Compile Include="Implementation\Transformations\ZNormalizationTransformation.cs" /> 209 232 <Compile Include="Interfaces\Classification\IClassificationEnsembleModel.cs"> 210 233 <SubType>Code</SubType> … … 215 238 <Compile Include="Interfaces\Classification\IDiscriminantFunctionThresholdCalculator.cs" /> 216 239 <Compile Include="Interfaces\IDataAnalysisSolutionExporter.cs" /> 240 <Compile Include="Interfaces\IDataAnalysisTransformation.cs" /> 217 241 <Compile Include="Interfaces\IDataset.cs" /> 218 242 <Compile Include="Interfaces\IDependencyCalculator.cs" /> 219 243 <Compile Include="Interfaces\ITransformation.cs" /> 220 244 <Compile Include="Interfaces\ITransformationMapper.cs" /> 245 <Compile Include="Interfaces\Regression\ITransformedRegressionModel.cs" /> 246 <Compile Include="Interfaces\Regression\ITransformedRegressionSolution.cs" /> 221 247 <Compile Include="Interfaces\Regression\IConfidenceRegressionModel.cs" /> 222 248 <Compile Include="Interfaces\Regression\IConfidenceRegressionSolution.cs" /> -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r15583 r15846 333 333 } 334 334 335 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<I Transformation> transformations = null)336 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<I Transformation>()) {335 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null) 336 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 337 337 var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList(); 338 338 var target = validTargetVariableValues.Where(x => x.Value == targetVariable).DefaultIfEmpty(validTargetVariableValues.First()).First(); -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
r15583 r15846 87 87 } 88 88 89 public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<I Transformation> transformations = null)90 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<I Transformation>()) {89 public ClusteringProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<IDataAnalysisTransformation> transformations = null) 90 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 91 91 } 92 92 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
r15583 r15846 74 74 } 75 75 76 public IFixedValueParameter<ReadOnlyItemList<I Transformation>> TransformationsParameter {77 get { return (IFixedValueParameter<ReadOnlyItemList<I Transformation>>)Parameters[TransformationsParameterName]; }76 public IFixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>> TransformationsParameter { 77 get { return (IFixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>)Parameters[TransformationsParameterName]; } 78 78 } 79 79 #endregion … … 122 122 } 123 123 124 public IEnumerable<I Transformation> Transformations {124 public IEnumerable<IDataAnalysisTransformation> Transformations { 125 125 get { return TransformationsParameter.Value; } 126 126 } … … 148 148 [StorableHook(HookType.AfterDeserialization)] 149 149 private void AfterDeserialization() { 150 if (!Parameters.ContainsKey(TransformationsParameterName)) { 151 Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", new ItemList<ITransformation>().AsReadOnly())); 152 TransformationsParameter.Hidden = true; 153 } 150 if (Parameters[TransformationsParameterName] is FixedValueParameter<ReadOnlyItemList<ITransformation>>) 151 Parameters.Remove(TransformationsParameterName); 152 if (!Parameters.ContainsKey(TransformationsParameterName)) 153 Parameters.Add(new FixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>(TransformationsParameterName, new ItemList<IDataAnalysisTransformation>().AsReadOnly()) { Hidden = true }); 154 154 155 RegisterEventHandlers(); 155 156 } 156 157 157 protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<I Transformation> transformations = null) {158 protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<IDataAnalysisTransformation> transformations = null) { 158 159 if (dataset == null) throw new ArgumentNullException("The dataset must not be null."); 159 160 if (allowedInputVariables == null) throw new ArgumentNullException("The allowed input variables must not be null."); … … 172 173 int testPartitionEnd = dataset.Rows; 173 174 174 var transformationsList = new ItemList<I Transformation>(transformations ?? Enumerable.Empty<ITransformation>());175 var transformationsList = new ItemList<IDataAnalysisTransformation>(transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()); 175 176 176 177 Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", (Dataset)dataset)); … … 178 179 Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd))); 179 180 Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd))); 180 Parameters.Add(new FixedValueParameter<ReadOnlyItemList<ITransformation>>(TransformationsParameterName, "", transformationsList.AsReadOnly())); 181 182 TransformationsParameter.Hidden = true; 181 Parameters.Add(new FixedValueParameter<ReadOnlyItemList<IDataAnalysisTransformation>>(TransformationsParameterName, "", transformationsList.AsReadOnly()) { Hidden = transformationsList.Count == 0 }); 183 182 184 183 ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r15583 r15846 141 141 } 142 142 public RegressionProblemData(IRegressionProblemData regressionProblemData) 143 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable ) {143 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable, regressionProblemData.Transformations) { 144 144 TrainingPartition.Start = regressionProblemData.TrainingPartition.Start; 145 145 TrainingPartition.End = regressionProblemData.TrainingPartition.End; … … 148 148 } 149 149 150 public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<I Transformation> transformations = null)151 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<I Transformation>()) {150 public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null) 151 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 152 152 var variables = InputVariables.Select(x => x.AsReadOnly()).ToList(); 153 153 Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First())); -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
r15583 r15846 1582 1582 TrainingPartition.Start = 50; 1583 1583 } 1584 public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<I Transformation> transformations = null)1585 : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<I Transformation>()) {1584 public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<IDataAnalysisTransformation> transformations = null) 1585 : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<IDataAnalysisTransformation>()) { 1586 1586 Parameters.Add(new FixedValueParameter<IntValue>(TrainingHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each training sample.", new IntValue(1))); 1587 1587 Parameters.Add(new FixedValueParameter<IntValue>(TestHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each test sample.", new IntValue(1))); -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
r15583 r15846 43 43 IEnumerable<int> TestIndices { get; } 44 44 45 IEnumerable<I Transformation> Transformations { get; }45 IEnumerable<IDataAnalysisTransformation> Transformations { get; } 46 46 47 47 bool IsTrainingSample(int index); -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformation.cs
r15583 r15846 24 24 25 25 namespace HeuristicLab.Problems.DataAnalysis { 26 public interface ITransformation : IParameterizedItem { 27 string ShortName { get; } 28 string Column { get; } 26 public interface ITransformation : IParameterizedNamedItem { 29 27 } 30 28 31 29 public interface ITransformation<T> : ITransformation { 32 void ConfigureParameters(IEnumerable<T> data); 33 IEnumerable<T> ConfigureAndApply(IEnumerable<T> data); 30 bool Check(IEnumerable<T> data, out string errorMessage); 31 32 void Configure(IEnumerable<T> data); 33 34 34 IEnumerable<T> Apply(IEnumerable<T> data); 35 IEnumerable<T> InverseApply(IEnumerable<T> data); 35 36 } 36 37 } -
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformationMapper.cs
r15583 r15846 21 21 22 22 23 using System; 24 23 25 namespace HeuristicLab.Problems.DataAnalysis { 26 [Obsolete] 24 27 public interface ITransformationMapper<out T> { 25 28 T GenerateModel(ITransformation transformation);
Note: See TracChangeset
for help on using the changeset viewer.