Opened 10 months ago
Last modified 8 weeks ago
#2915 readytorelease enhancement
Add support for abs(x), AQ(x) and CubeRoot(x) for symbolic regression problems
Reported by: | gkronber | Owned by: | gkronber |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.16 |
Component: | Problems.DataAnalysis.Symbolic | Version: | trunk |
Keywords: | Cc: |
Description (last modified by gkronber)
It would be nice to add support for the functions abs(x), AQ(x) (analytical quotient) and CubeRoot(x).
We already support a general root function. However, this is implemented as power(x, 1/round(x)) which makes it hard to use it in combination with constants optimization.
We also provide a separate symbol for the squared root. For some problems a cube root might also be necessary.
Attachments (2)
Change History (42)
comment:1 Changed 10 months ago by gkronber
- Owner set to gkronber
- Status changed from new to accepted
comment:2 Changed 9 months ago by gkronber
comment:3 Changed 9 months ago by gkronber
r15944: added support for Abs() symbol to tree interpreter and linear interpreter as well as to the infix parser
comment:4 Changed 5 months ago by gkronber
TODO
- const opt
- all formatters
- simplifier
comment:5 Changed 5 months ago by gkronber
- Version set to branch
comment:6 Changed 4 months ago by gkronber
We should also implement the CubeRoot symbol (see # 2954) and the AnalyticalQuotient symbol (see #2937) within the branch for this ticket.
I'll change this ticket description accordingly and close the other tickets.
comment:7 Changed 4 months ago by gkronber
- Description modified (diff)
- Summary changed from Add support for the absolute value function abs(x) for symbolic regression problems to Add support for abs(x), AQ(x) and CubeRoot(x) for symbolic regression problems
Changed 4 months ago by gkronber
Changed 4 months ago by gkronber
comment:8 Changed 4 months ago by gkronber
Attached two papers discussing the usage of the analytical quotient function for GP
comment:9 Changed 4 months ago by gkronber
comment:10 Changed 4 months ago by gkronber
r16237: fixed compile error introduced in manual merge
comment:11 Changed 4 months ago by gkronber
r16238: implemented all symbols in all interpreters
comment:12 Changed 4 months ago by gkronber
r16239: added support for abs(x), cube(x), cuberoot(x), and aq(x) to:
- formatters,
- infix parser
- constant opt (autodiff)
- simplifier (incomplete)
comment:13 Changed 4 months ago by gkronber
TODO for simplifier:
square(* (...)) -> (* (square ...)) and same for cubesquare(abs(x)) -> square(x)(* (aq ...) const) -> push down constant into aq, constants also include factors(* (abs ...) const) -> push down constant into abs (if positive, otherwise keep sign)- ...?
comment:14 Changed 4 months ago by gkronber
r16240: merged changes in the trunk up to current HEAD (r15951:16232) into the branch
comment:15 Changed 3 months ago by lkammere
r16304: Merge changes in the trunk to current HEAD into the branch.
comment:16 Changed 3 months ago by lkammere
r16306: Merge changes from trunk.
comment:17 Changed 3 months ago by gkronber
r16332: merged r16241:16309 (current HEAD) from HL trunk to branch
comment:18 Changed 3 months ago by gkronber
r16344: added a unit test cases for simplification of new symbols and extended the tree simplifier accordingly.
comment:19 Changed 2 months ago by gkronber
TODO:
Batched InterpreterNative Interpreter
comment:20 Changed 2 months ago by gkronber
r16345: added cube, cbrt, absolute, aq to batched interpreter (and fixed a bug in power)
comment:21 Changed 2 months ago by gkronber
r16346: fixed bugs
comment:22 Changed 2 months ago by gkronber
r16347: fixed bug in BatchInterpreter for Root symbol
comment:23 Changed 2 months ago by gkronber
r16348: fixed another bug in the BatchInterpreter for root symbols (now the linear and tree interpreter produce exactly the same results)
comment:24 Changed 2 months ago by gkronber
r16349: added abs, cube, cuberoot, and aq to native interpreter and added sqrt which was missing in the vectorized code. Added a default branch to allow easier identification of bugs because of missing operations.
comment:25 Changed 2 months ago by gkronber
r16350: merged r16333:16343 from trunk to branch (resolving a conflict in interpreter.h - the branch for sqrt)
comment:26 Changed 2 months ago by gkronber
The native interpreter produces different results than the managed interpreters when the following symbols are used
- Absolute
- sqrt
I got the exact same results for the following
- +, -, *, /
- log
- exp
- analytic quotient
- cube
- square
- power
- root
- cuberoot
comment:27 Changed 2 months ago by gkronber
r16351: fixed compile error after merge and made another change to native interpreter trying to resolve the differences when using abs and sqrt(). No success
comment:28 Changed 2 months ago by gkronber
r16352 added support for expressions like x ^ c as well as support for '{' '}' as alternatives to '(' ')' to the infix parser
comment:29 Changed 2 months ago by gkronber
r16355: small reordering of constants
comment:30 Changed 2 months ago by gkronber
r16356: merged all changes from branch to trunk
comment:31 Changed 2 months ago by gkronber
- Owner changed from gkronber to mkommend
- Status changed from accepted to reviewing
- Version changed from branch to trunk
comment:32 Changed 2 months ago by gkronber
- Version changed from trunk to branch
r16359: allow two different syntactical forms for power ( (a)^(b) and pow(a,b) ) in the infix formatter and merged two identical branches (for all operators)
comment:33 Changed 2 months ago by gkronber
- Version changed from branch to trunk
comment:34 Changed 2 months ago by gkronber
r16360: renamed class AnalyticalQuotient -> AnalyticQuotient
comment:35 Changed 2 months ago by gkronber
r16361: renamed file to match class name
comment:36 Changed 2 months ago by gkronber
r16362: missed a string replace AnalyticalQuotient -> AnalyticQuotient
comment:37 Changed 2 months ago by gkronber
r16365: small change in description
comment:38 Changed 2 months ago by gkronber
r16366: disabled cube and cuberoot in the OSGP sample test which failed. On my machine the algorithm produces different results and the unit test still fails. Let's check the results of the builder.
comment:39 Changed 2 months ago by gkronber
Ok, the unit test succeeded on the builder. I assume it's fine then.
comment:40 Changed 8 weeks ago by mkommend
- Owner changed from mkommend to gkronber
- Status changed from reviewing to readytorelease
Reviewed all changes in this ticket. Thanks for implementing the functionality and adapting all related classes (parser, formatter, evaluators, simplifier, ...).
This ticket however depends on #2958 (batch interpretation) that has been implemented directly in the trunk. Therefore, releasing this ticket will not be easy, because both tickets contain changes to the same classes.
r15943: created branch for ticket