Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/09/21 12:44:50 (4 years ago)
Author:
pfleck
Message:

#3040 Reworked external dependencies and merged some libraries (ILmerge) to avoid versions conflicts occuring on Hive.

Location:
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToDiffSharpConverter.cs

    r17786 r17930  
    271271        var terms = node.Subtrees.Select(ConvertNode).ToList();
    272272        if (terms.Count == 1) return FunctionApply(terms[0],
    273             s => -s,
     273            s => D.Neg(s),
    274274            v => DV.Neg(v));
    275275        return terms.Aggregate((a, b) =>
     
    288288            (s1, v2) => s1 * v2,
    289289            (v1, s2) => v1 * s2,
    290             (v1, v2) => DV.op_DotMultiply(v1, v2)
     290            (v1, v2) => DV.PointwiseMultiply(v1, v2)
    291291          ));
    292292      }
     
    301301            (s1, v2) => s1 / v2,
    302302            (v1, s2) => v1 / s2,
    303             (v1, v2) => DV.op_DotDivide(v1, v2)
     303            (v1, v2) => DV.PointwiseDivision(v1, v2)
    304304          ));
    305305      }
     
    345345        return FunctionApply(ConvertNode(node.GetSubtree(0)),
    346346          s => D.Sign(s) * D.Pow(D.Abs(s), 1.0 / 3.0),
    347           v => DV.op_DotMultiply(DV.Sign(v), DV.Pow(DV.Abs(v), 1.0 / 3.0))
     347          v => DV.PointwiseMultiply(DV.Sign(v), DV.Pow(DV.Abs(v), 1.0 / 3.0))
    348348        );
    349349      }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r17830 r17930  
    113113      <Private>False</Private>
    114114    </Reference>
    115     <Reference Include="DiffSharp, Version=0.7.7.0, Culture=neutral, processorArchitecture=AMD64">
     115    <Reference Include="DiffSharp.Merged, Version=0.8.4.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=AMD64">
    116116      <SpecificVersion>False</SpecificVersion>
    117       <HintPath>..\..\bin\DiffSharp.dll</HintPath>
     117      <HintPath>..\..\bin\DiffSharp.Merged.dll</HintPath>
    118118    </Reference>
    119119    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     
    130130      <HintPath>..\..\bin\MathNet.Numerics.dll</HintPath>
    131131    </Reference>
     132    <Reference Include="netstandard" />
    132133    <Reference Include="System" />
    133134    <Reference Include="System.Core">
     
    143144    <Reference Include="System.Data" />
    144145    <Reference Include="System.Xml" />
    145     <Reference Include="TensorFlow.NET.Signed, Version=0.15.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     146    <Reference Include="TensorFlow.NET.Merged, Version=0.15.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    146147      <SpecificVersion>False</SpecificVersion>
    147       <HintPath>..\..\bin\TensorFlow.NET.Signed.dll</HintPath>
     148      <HintPath>..\..\bin\TensorFlow.NET.Merged.dll</HintPath>
    148149    </Reference>
    149150  </ItemGroup>
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeVectorInterpreter.cs

    r17830 r17930  
    785785              s => 0,
    786786              v => {
    787                 int bins = (int)Math.Round(m.Scalar);
     787                int bins = Math.Max((int)Math.Round(m.Scalar), 1);
    788788                double minValue = v.Minimum();
    789789                double maxValue = v.Maximum();
     
    794794                  double binMin = minValue * i;
    795795                  double binMax = binMin + intervalWidth;
    796                   double countBin = v.Map(e => (e > binMin && e < binMax) ? 1 : 0).Sum();
     796                  double countBin = v.Map(e => (e > binMin && e < binMax) ? 1.0 : 0.0).Sum();
    797797                  double percBin = countBin / totalValues;
    798798                  sum += percBin * Math.Log(percBin);
     
    808808            cur = AggregateApply(cur,
    809809              s => 0,
    810               v => Statistics.PopulationStandardDeviation(v) > (Statistics.Maximum(v) - Statistics.Minimum(v)) / 2 ? 1 : 0);
     810              v => Statistics.PopulationStandardDeviation(v) > (Statistics.Maximum(v) - Statistics.Minimum(v)) / 2 ? 1.0 : 0.0);
    811811            TraceEvaluation(currentInstr, cur);
    812812            return cur;
     
    816816            cur = AggregateApply(cur,
    817817              s => 0,
    818               v => Statistics.PopulationVariance(v) > Statistics.StandardDeviation(v) ? 1 : 0);
     818              v => Statistics.PopulationVariance(v) > Statistics.StandardDeviation(v) ? 1.0 : 0.0);
    819819            TraceEvaluation(currentInstr, cur);
    820820            return cur;
     
    824824            cur = AggregateApply(cur,
    825825              s => 0,
    826               v => Math.Abs(Statistics.Mean(v) - Statistics.Median(v)) < (Statistics.Maximum(v) - Statistics.Minimum(v)) / 2 ? 1 : 0);
     826              v => Math.Abs(Statistics.Mean(v) - Statistics.Median(v)) < (Statistics.Maximum(v) - Statistics.Minimum(v)) / 2 ? 1.0 : 0.0);
    827827            TraceEvaluation(currentInstr, cur);
    828828            return cur;
     
    834834              v => {
    835835                double mean = Statistics.Mean(v);
    836                 return v.Map(e => e > mean ? 1 : 0).Sum();
     836                return v.Map(e => e > mean ? 1.0 : 0.0).Sum();
    837837              });
    838838            TraceEvaluation(currentInstr, cur);
     
    845845              v => {
    846846                double median = Statistics.Median(v);
    847                 return v.Map(e => e > median ? 1 : 0).Sum();
     847                return v.Map(e => e > median ? 1.0 : 0.0).Sum();
    848848              });
    849849            TraceEvaluation(currentInstr, cur);
     
    856856              v => {
    857857                double mean = Statistics.Mean(v);
    858                 return v.Map(e => e < mean ? 1 : 0).Sum();
     858                return v.Map(e => e < mean ? 1.0 : 0.0).Sum();
    859859              });
    860860            TraceEvaluation(currentInstr, cur);
     
    867867              v => {
    868868                double median = Statistics.Median(v);
    869                 return v.Map(e => e < median ? 1 : 0).Sum();
     869                return v.Map(e => e < median ? 1.0 : 0.0).Sum();
    870870              });
    871871            TraceEvaluation(currentInstr, cur);
     
    10551055              v => {
    10561056                double sum = 0.0;
    1057                 int l = (int)Math.Round(lVal.Scalar);
     1057                int l = Math.Max((int)Math.Round(lVal.Scalar), 0);
    10581058                double mean = Statistics.Mean(v);
    10591059                for (int i = 0; i < v.Count - l; i++) {
     
    11061106              s => 0,
    11071107              v => {
    1108                 int lag = (int)Math.Round(l.Scalar);
     1108                int lag = Math.Max((int)Math.Round(l.Scalar), 0);
    11091109                double sum = 0.0;
    11101110                for (int i = 0; i < v.Count - 2 * lag; i++) {
Note: See TracChangeset for help on using the changeset viewer.