Free cookie consent management tool by TermsFeed Policy Generator

# Changeset 17400

Ignore:
Timestamp:
01/14/20 13:19:04 (5 years ago)
Message:

Location:
branches/3040_VectorBasedGP
Files:
5 edited

Unmodified
Removed
• ## branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs

 r17369 case OpCodes.VectorAvg: { DoubleVector v = VectorEvaluate(dataset, ref row, state); return v.Average(); return v.Mean(); }
• ## branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Vectors/DoubleVector.cs

 r17367 using System.Collections.Generic; using System.Linq; using System.Windows.Markup; using HEAL.Attic; } public double DotProduct(DoubleVector other) { return (this * other).Sum(); } public static DoubleVector operator +(DoubleVector lhs, double rhs) { return new DoubleVector(lhs.Select(l => l + rhs)); } public static DoubleVector operator +(double lhs, DoubleVector rhs) { return new DoubleVector(rhs.Select(r => lhs + r)); } public static DoubleVector operator -(double lhs, DoubleVector rhs) { return new DoubleVector(rhs.Select(r => lhs - r)); } public static DoubleVector operator *(double lhs, DoubleVector rhs) { return new DoubleVector(rhs.Select(r => lhs * r)); } public static DoubleVector operator /(double lhs, DoubleVector rhs) { return new DoubleVector(rhs.Select(r => lhs / r)); } public double Sum() { return values.Sum(); } public double Average() { public double Mean() { return values.Average(); } public DoubleVector CumulativeMean() { return new DoubleVector( Enumerable.Range(0, this.Count) .Select(this.Take) .Select(numbers => numbers.Average()) ); } }
• ## branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VariousInstanceProvider.cs

 r17364 var rand = new MersenneTwister((uint)Seed); return new List { new VectorDataTestOne(rand.Next()) new VectorDataTestOne(rand.Next()), new AzzaliKorns5(rand.Next()), new AzzaliBenchmark1(rand.Next()), new AzzaliBenchmark2(rand.Next()), new AzzaliBenchmark3(rand.Next()) }; }
• ## branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestOne.cs

 r17365 for (int i = 0; i < 100; i++) { x1 = GetRandomDouble(-2, 2, rand); x2 = GetRandomDouble(2, 6, rand); x3 = GetRandomDouble(0, 1, rand); x1 = rand.NextDouble(-2, 2); x2 = rand.NextDouble(2, 6); x3 = rand.NextDouble(0, 1); int length = rand.Next(3, 6); v1 = GetRandomDoubleVector(-2, 2, length, rand); v2 = GetRandomDoubleVector(3, 5, length, rand); y = x1 * v1.Sum() + x2 * v2.Average(); v1 = rand.NextDoubleVector(-2, 2, length); v2 = rand.NextDoubleVector(3, 5, length); y = x1 * v1.Sum() + x2 * v2.Mean(); x1Column.Add(x1); return new List { x1Column, x2Column, x3Column, v1Column, v2Column, yColumn }; } private static double GetRandomDouble(double min, double max, IRandom rand) { return (max - min) * rand.NextDouble() + min; } private static DoubleVector GetRandomDoubleVector(double min, double max, int length, IRandom rand) { var values = new double[length]; for (int i = 0; i < values.Length; i++) { values[i] = GetRandomDouble(min, max, rand); } return new DoubleVector(values); } } }
• ## branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Tests.csproj

 r16908
Note: See TracChangeset for help on using the changeset viewer.