Changeset 17997


Ignore:
Timestamp:
06/27/21 15:30:17 (14 months ago)
Author:
gkronber
Message:

#3127: merged r17992:17993 from trunk to branch

Location:
branches/3127-MRGP-VarPro-Exploration
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3127-MRGP-VarPro-Exploration

  • branches/3127-MRGP-VarPro-Exploration/HeuristicLab.Algorithms.DataAnalysis.Glmnet/3.4/Glmnet.cs

    r17784 r17997  
    3333    ///  parm = penalty member index(0 <= parm <= 1)
    3434    ///         = 0.0 => ridge
    35     ///  = 1.0 => lasso
     35    ///         = 1.0 => lasso
    3636    ///    no = number of observations
    3737    ///    ni = number of predictor variables
     
    4343    ///  vp(ni) = relative penalties for each predictor variable
    4444    ///       vp(j) = 0 => jth variable unpenalized
    45     ///    cl(2, ni) = interval constraints on coefficient values(overwritten)
    46     ///  cl(1, j) = lower bound for jth coefficient value(&lt;= 0.0)
    47     ///  cl(2, j) = upper bound for jth coefficient value(>= 0.0)
     45    ///  cl(2, ni) = interval constraints on coefficient values (overwritten)
     46    ///    cl(1, j) = lower bound for jth coefficient value(<= 0.0)
     47    ///    cl(2, j) = upper bound for jth coefficient value(>= 0.0)
    4848    ///  ne = maximum number of variables allowed to enter largest model
    49     /// (stopping criterion)
     49    ///      (stopping criterion)
    5050    ///  nx = maximum number of variables allowed to enter all models
    51     ///  along path(memory allocation, nx > ne).
     51    ///       along path(memory allocation, nx > ne).
    5252    ///  nlam = (maximum)number of lamda values
    5353    ///    flmin = user control of lamda values(>=0)
  • branches/3127-MRGP-VarPro-Exploration/HeuristicLab.Problems.DataAnalysis.Symbolic

  • branches/3127-MRGP-VarPro-Exploration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs

    r17963 r17997  
    287287            var b = Evaluate(instructions, ref instructionCounter, nodeIntervals, variableIntervals);
    288288            // support only integer powers
    289             if(b.LowerBound == b.UpperBound && Math.Truncate(b.LowerBound) == b.LowerBound) {
     289            if (b.LowerBound == b.UpperBound && Math.Truncate(b.LowerBound) == b.LowerBound) {
    290290              result = Interval.Power(a, (int)b.LowerBound);
    291291            } else {
     
    321321
    322322    public static bool IsCompatible(ISymbolicExpressionTree tree) {
    323       var containsUnknownSymbols = (
    324         from n in tree.Root.GetSubtree(0).IterateNodesPrefix()
    325         where
     323      foreach (var n in tree.Root.GetSubtree(0).IterateNodesPrefix()) {
     324        if (
    326325          !(n.Symbol is Variable) &&
    327326          !(n.Symbol is Constant) &&
     
    343342          !(n.Symbol is Power) &&
    344343          !(n.Symbol is Absolute) &&
    345           !(n.Symbol is AnalyticQuotient)
    346         select n).Any();
    347       return !containsUnknownSymbols;
     344          !(n.Symbol is AnalyticQuotient)) return false;
     345
     346        else if (n.Symbol is Power) {
     347          // only integer exponents are supported
     348          var exp = n.GetSubtree(1) as ConstantTreeNode;
     349          if (exp == null || exp.Value != Math.Truncate(exp.Value)) return false;
     350        }
     351      }
     352      return true;
    348353    }
    349354  }
Note: See TracChangeset for help on using the changeset viewer.