Opened 12 months ago
Last modified 7 days ago
#2915 reviewing enhancement
Add support for abs(x), AQ(x) and CubeRoot(x) for symbolic regression problems
Reported by: | gkronber | Owned by: | pfleck |
---|---|---|---|
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 (45)
comment:1 Changed 12 months ago by gkronber
- Owner set to gkronber
- Status changed from new to accepted
comment:2 Changed 11 months ago by gkronber
comment:3 Changed 11 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 7 months ago by gkronber
TODO
- const opt
- all formatters
- simplifier
comment:5 Changed 7 months ago by gkronber
- Version set to branch
comment:6 Changed 6 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 6 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 6 months ago by gkronber
Changed 6 months ago by gkronber
comment:8 Changed 6 months ago by gkronber
Attached two papers discussing the usage of the analytical quotient function for GP
comment:9 Changed 6 months ago by gkronber
comment:10 Changed 6 months ago by gkronber
r16237: fixed compile error introduced in manual merge
comment:11 Changed 6 months ago by gkronber
r16238: implemented all symbols in all interpreters
comment:12 Changed 6 months ago by gkronber
r16239: added support for abs(x), cube(x), cuberoot(x), and aq(x) to:
- infix formatters, (other formatters TODO)
- infix parser
- constant opt (autodiff)
- simplifier (incomplete)
comment:13 Changed 6 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 6 months ago by gkronber
r16240: merged changes in the trunk up to current HEAD (r15951:16232) into the branch
comment:15 Changed 5 months ago by lkammere
r16304: Merge changes in the trunk to current HEAD into the branch.
comment:16 Changed 5 months ago by lkammere
r16306: Merge changes from trunk.
comment:17 Changed 5 months ago by gkronber
r16332: merged r16241:16309 (current HEAD) from HL trunk to branch
comment:18 Changed 5 months ago by gkronber
r16344: added a unit test cases for simplification of new symbols and extended the tree simplifier accordingly.
comment:19 Changed 5 months ago by gkronber
TODO:
Batched InterpreterNative Interpreter
comment:20 Changed 5 months ago by gkronber
r16345: added cube, cbrt, absolute, aq to batched interpreter (and fixed a bug in power)
comment:21 Changed 5 months ago by gkronber
r16346: fixed bugs
comment:22 Changed 5 months ago by gkronber
r16347: fixed bug in BatchInterpreter for Root symbol
comment:23 Changed 5 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 5 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 5 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 5 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 5 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 5 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 5 months ago by gkronber
r16355: small reordering of constants
comment:30 Changed 5 months ago by gkronber
r16356: merged all changes from branch to trunk
comment:32 Changed 5 months ago by gkronber
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 5 months ago by gkronber
- Version changed from branch to trunk
comment:34 Changed 5 months ago by gkronber
r16360: renamed class AnalyticalQuotient -> AnalyticQuotient
comment:35 Changed 5 months ago by gkronber
r16361: renamed file to match class name
comment:36 Changed 5 months ago by gkronber
r16362: missed a string replace AnalyticalQuotient -> AnalyticQuotient
comment:37 Changed 5 months ago by gkronber
r16365: small change in description
comment:38 Changed 5 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 5 months ago by gkronber
Ok, the unit test succeeded on the builder. I assume it's fine then.
comment:40 Changed 4 months ago by mkommend
- Status changed from accepted 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.
comment:41 Changed 6 weeks ago by gkronber
r16675 : deleted branch because all changes have been merged back to trunk
comment:42 Changed 3 weeks ago by gkronber
- Status changed from readytorelease to assigned
Not all formatters support the new symbols yet. E.g. the Excel formatter.
comment:43 Changed 9 days ago by gkronber
r16802: added support for abs(), aq(), cube(), cuberoot() to formatters. Skipped the TSQLFormatter.
comment:44 Changed 7 days ago by gkronber
- Owner changed from gkronber to pfleck
- Status changed from assigned to reviewing
r15943: created branch for ticket