Changeset 7843
- Timestamp:
- 05/16/12 16:58:16 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.csproj
r7461 r7843 188 188 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 189 189 </ProjectReference> 190 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 191 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 192 <Name>HeuristicLab.Problems.Instances-3.3</Name> 193 </ProjectReference> 190 194 <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj"> 191 195 <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project> -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisModel.cs
r7463 r7843 22 22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis { 23 23 public interface ISymbolicTimeSeriesPrognosisModel : ITimeSeriesPrognosisModel, ISymbolicDataAnalysisModel { 24 ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter Interpreter { get; }24 new ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter Interpreter { get; } 25 25 } 26 26 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Plugin.cs.frame
r7463 r7843 39 39 [PluginDependency("HeuristicLab.Parameters", "3.3")] 40 40 [PluginDependency("HeuristicLab.Persistence", "3.3")] 41 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 41 42 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 42 43 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs
r7183 r7843 108 108 } 109 109 110 public override void ImportProblemDataFromFile(string fileName) {111 TimeSeriesPrognosisProblemData problemData = TimeSeriesPrognosisProblemData.ImportFromFile(fileName);112 ProblemData = problemData;113 }114 110 } 115 111 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r7842 r7843 67 67 private static MethodInfo bessel = thisType.GetMethod("Bessel", new Type[] { typeof(double) }); 68 68 69 internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns);69 70 70 71 71 private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic"; -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r7842 r7843 366 366 } 367 367 case OpCodes.Square: { 368 return Math.Pow(Evaluate(dataset, ref row, state), 2);368 return Math.Pow(Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues), 2); 369 369 } 370 370 case OpCodes.Power: { … … 374 374 } 375 375 case OpCodes.SquareRoot: { 376 return Math.Sqrt(Evaluate(dataset, ref row, state));376 return Math.Sqrt(Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues)); 377 377 } 378 378 case OpCodes.Root: { … … 388 388 } 389 389 case OpCodes.Gamma: { 390 var x = Evaluate(dataset, ref row, state);390 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 391 391 if (double.IsNaN(x)) return double.NaN; 392 392 else return alglib.gammafunction(x); 393 393 } 394 394 case OpCodes.Psi: { 395 var x = Evaluate(dataset, ref row, state);395 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 396 396 if (double.IsNaN(x)) return double.NaN; 397 397 else if (x.IsAlmost(0.0)) return double.NaN; … … 400 400 } 401 401 case OpCodes.Dawson: { 402 var x = Evaluate(dataset, ref row, state);402 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 403 403 if (double.IsNaN(x)) return double.NaN; 404 404 return alglib.dawsonintegral(x); 405 405 } 406 406 case OpCodes.ExponentialIntegralEi: { 407 var x = Evaluate(dataset, ref row, state);407 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 408 408 if (double.IsNaN(x)) return double.NaN; 409 409 return alglib.exponentialintegralei(x); … … 411 411 case OpCodes.SineIntegral: { 412 412 double si, ci; 413 var x = Evaluate(dataset, ref row, state);413 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 414 414 if (double.IsNaN(x)) return double.NaN; 415 415 else { … … 420 420 case OpCodes.CosineIntegral: { 421 421 double si, ci; 422 var x = Evaluate(dataset, ref row, state);422 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 423 423 if (double.IsNaN(x)) return double.NaN; 424 424 else { … … 429 429 case OpCodes.HyperbolicSineIntegral: { 430 430 double shi, chi; 431 var x = Evaluate(dataset, ref row, state);431 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 432 432 if (double.IsNaN(x)) return double.NaN; 433 433 else { … … 438 438 case OpCodes.HyperbolicCosineIntegral: { 439 439 double shi, chi; 440 var x = Evaluate(dataset, ref row, state);440 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 441 441 if (double.IsNaN(x)) return double.NaN; 442 442 else { … … 447 447 case OpCodes.FresnelCosineIntegral: { 448 448 double c = 0, s = 0; 449 var x = Evaluate(dataset, ref row, state);449 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 450 450 if (double.IsNaN(x)) return double.NaN; 451 451 else { … … 456 456 case OpCodes.FresnelSineIntegral: { 457 457 double c = 0, s = 0; 458 var x = Evaluate(dataset, ref row, state);458 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 459 459 if (double.IsNaN(x)) return double.NaN; 460 460 else { … … 465 465 case OpCodes.AiryA: { 466 466 double ai, aip, bi, bip; 467 var x = Evaluate(dataset, ref row, state);467 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 468 468 if (double.IsNaN(x)) return double.NaN; 469 469 else { … … 474 474 case OpCodes.AiryB: { 475 475 double ai, aip, bi, bip; 476 var x = Evaluate(dataset, ref row, state);476 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 477 477 if (double.IsNaN(x)) return double.NaN; 478 478 else { … … 482 482 } 483 483 case OpCodes.Norm: { 484 var x = Evaluate(dataset, ref row, state);484 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 485 485 if (double.IsNaN(x)) return double.NaN; 486 486 else return alglib.normaldistribution(x); 487 487 } 488 488 case OpCodes.Erf: { 489 var x = Evaluate(dataset, ref row, state);489 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 490 490 if (double.IsNaN(x)) return double.NaN; 491 491 else return alglib.errorfunction(x); 492 492 } 493 493 case OpCodes.Bessel: { 494 var x = Evaluate(dataset, ref row, state);494 var x = Evaluate(dataset, ref row, lastObservedRow, state, cachedPrognosedValues); 495 495 if (double.IsNaN(x)) return double.NaN; 496 496 else return alglib.besseli0(x); -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r7842 r7843 193 193 <Compile Include="OnlineCalculators\OnlineTheilsUStatisticCalculator.cs" /> 194 194 <Compile Include="OnlineCalculators\OnlineWeightedDirectionalSymmetryCalculator.cs" /> 195 <Compile Include="TableFileParser.cs" />196 195 <Compile Include="Implementation\Classification\ThresholdCalculators\AccuracyMaximizationThresholdCalculator.cs" /> 197 196 <Compile Include="Implementation\Classification\ThresholdCalculators\NormalDistributionCutPointsThresholdCalculator.cs" /> -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblem.cs
r6802 r7843 39 39 } 40 40 41 public override void ImportProblemDataFromFile(string fileName) {42 TimeSeriesPrognosisProblemData problemData = TimeSeriesPrognosisProblemData.ImportFromFile(fileName);43 ProblemData = problemData;44 }45 41 } 46 42 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
r7100 r7843 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Globalization; 24 25 using System.IO; 25 26 using System.Linq; … … 29 30 using HeuristicLab.Parameters; 30 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using HeuristicLab.Problems.Instances; 31 33 32 34 namespace HeuristicLab.Problems.DataAnalysis { … … 1618 1620 public static TimeSeriesPrognosisProblemData ImportFromFile(string fileName) { 1619 1621 TableFileParser csvFileParser = new TableFileParser(); 1620 csvFileParser.Parse(fileName );1622 csvFileParser.Parse(fileName, NumberFormatInfo.InvariantInfo, DateTimeFormatInfo.InvariantInfo, ','); 1621 1623 1622 1624 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);
Note: See TracChangeset
for help on using the changeset viewer.