SymbolicRegression.jl

Distributed High-Performance Symbolic Regression in Julia

APACHE-2.0 License

Stars
523
Committers
17

Bot releases are hidden (Show)

SymbolicRegression.jl - v0.24.1

Published by MilesCranmer 7 months ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.24.0...v0.24.1

SymbolicRegression.jl - v0.24.0

Published by MilesCranmer 7 months ago

What's Changed

  • Experimental support for program synthesis / graph-like expressions instead of trees (https://github.com/MilesCranmer/SymbolicRegression.jl/pull/271)
    • BREAKING: many types now have a third type parameter, declaring the type of node. For example, PopMember{T,L} is now PopMember{T,L,N} for N the type of expression.
    • Can now specify a node_type in creation of Options. This node_type <: AbstractExpressionNode can be a GraphNode which will result in expressions that care share nodes – and therefore have a lower complexity.
    • Two new mutations: form_connection and break_connection – which control the merging and breaking of shared nodes in expressions. These are experimental.
  • BREAKING: The Dataset struct has had many of its field declared immutable (for memory safety). If you had relied on the mutability of the struct to set parameters after initializing it, you will need to modify your code.
  • BREAKING: LoopVectorization.jl moved to a package extension. Need to install it separately (https://github.com/MilesCranmer/SymbolicRegression.jl/pull/287).
  • DEPRECATED: Now prefer to use new keyword-based constructors for nodes:
Node{T}(feature=...)        # leaf referencing a particular feature column
Node{T}(val=...)            # constant value leaf
Node{T}(op=1, l=x1)         # operator unary node, using the 1st unary operator
Node{T}(op=1, l=x1, r=1.5)  # binary unary node, using the 1st binary operator

rather than the previous constructors Node(op, l, r) and Node(T; val=...) (though those will still work; just with a depwarn).

  • Bumper.jl support added. Passing bumper=true to Options() will result in using bump-allocation for evaluation which can get speeds equivalent to LoopVectorization and sometimes even better due to better management of allocations. (https://github.com/MilesCranmer/SymbolicRegression.jl/pull/287)
  • Upgraded Optim.jl to 1.9.
  • Upgraded DynamicQuantities to 0.13
  • Upgraded DynamicExpressions to 0.16
  • The main search loop has been greatly refactored for readability and improved type inference. It now looks like this (down from a monolithic ~1000 line function)
function _equation_search(
    datasets::Vector{D}, ropt::RuntimeOptions, options::Options, saved_state
) where {D<:Dataset}
    _validate_options(datasets, ropt, options)
    state = _create_workers(datasets, ropt, options)
    _initialize_search!(state, datasets, ropt, options, saved_state)
    _warmup_search!(state, datasets, ropt, options)
    _main_search_loop!(state, datasets, ropt, options)
    _tear_down!(state, ropt, options)
    return _format_output(state, ropt)
end

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.23.3...v0.24.0

SymbolicRegression.jl - v0.23.1

Published by MilesCranmer 10 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.23.0...v0.23.1

SymbolicRegression.jl - v0.22.3

Published by MilesCranmer about 1 year ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.22.2...v0.22.3

SymbolicRegression.jl - v0.22.0

Published by MilesCranmer about 1 year ago

What's Changed

  • (Algorithm modification) Evaluate on fixed batch when building per-population hall of fame in https://github.com/MilesCranmer/SymbolicRegression.jl/pull/243
    • This only affects searches that use batching=true. It results in improved searches on large datasets, as the "winning expression" is not biased towards an expression that landed on a lucky batch.
    • Note that this only occurs within an iteration. Evaluation on the entire dataset still happens at the end of an iteration and those loss measurements are used for absolute comparison between expressions.
  • (Algorithm modification) Deprecates the fast_cycle feature in #243. Use of this parameter will have no effect.
    • Was removed to ease maintenance burden and because it doesn't have a use. This feature was created early on in development as a way to get parallelism within a population. It is no longer useful as you can parallelize across populations.
  • Add Aqua.jl to test suite in https://github.com/MilesCranmer/SymbolicRegression.jl/pull/245
  • CompatHelper: bump compat for DynamicExpressions to 0.12, (keep existing compat) in https://github.com/MilesCranmer/SymbolicRegression.jl/pull/242
    • Is able to avoids method invalidations when using operators to construct expressions manually by modifying a global constant mapping of operator => index, rather than @eval-ing new operators.
    • This only matters if you were using operators to build trees, like x1 + x2. All internal search code uses Node() explicitly to build expressions, so did not rely on method invalidation at any point.
  • Renames some parameters in https://github.com/MilesCranmer/SymbolicRegression.jl/pull/234
    • npop => population_size
    • npopulations => populations
    • This is just to match PySR's API. Also note that the deprecated parameters will still work, and there will not be a warning unless you are running with --depwarn=yes.
  • Ensure that predict uses units if trained with them in https://github.com/MilesCranmer/SymbolicRegression.jl/pull/244
    • If you train on a dataset that has physical units, this ensures that MLJ.predict will output predictions in the same units. Before this change, MLJ.predict would return numerical arrays with no units.

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.21.5...v0.22.0

SymbolicRegression.jl - v0.21.5

Published by MilesCranmer about 1 year ago

SymbolicRegression.jl - v0.21.3

Published by MilesCranmer about 1 year ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.21.2...v0.21.3

SymbolicRegression.jl - v0.21.2

Published by MilesCranmer about 1 year ago

SymbolicRegression.jl - v0.21.1

Published by MilesCranmer about 1 year ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.21.0...v0.21.1

SymbolicRegression.jl - v0.21.0

Published by MilesCranmer about 1 year ago

What's Changed

  • https://github.com/MilesCranmer/SymbolicRegression.jl/pull/228 and https://github.com/MilesCranmer/SymbolicRegression.jl/pull/230 and https://github.com/MilesCranmer/SymbolicRegression.jl/pull/231
    • Dimensional analysis (#228)
      • Allows you to (softly) constrain discovered expressions to those that respect physical dimensions
      • Pass vectors of DynamicQuantities.jl Quantity type to the MLJ interface.
      • OR, specify X_units, y_units to low-level equation_search.
    • Printing improvements (#228)
      • By default, only 5 significant digits are now printed, rather than the entire float. You can change this with the print_precision option.
      • In the default printed equations, x₁ is used rather than x1.
      • y = is printed at the start (or y₁ = for multi-output). With units this becomes, for example, y[kg] =.
    • Misc
      • Easier to convert from MLJ interface to SymbolicUtils (via node_to_symbolic(::Node, ::AbstractSRRegressor)) (#228)
      • Improved precompilation (#228)
      • Various performance and type stability improvements (#228)
      • Inlined the recording option to speedup compilation (#230)
      • Updated tutorials to use MLJ rather than low-level interface (#228)
      • Moved JSON3.jl to extension (#231)
      • Use PackageExtensionsCompat.jl over Requires.jl (#231)
      • Require LossFunctions.jl to be 0.10 (#231)

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.20.0...v0.21.0

SymbolicRegression.jl - v0.19.0

Published by MilesCranmer over 1 year ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.18.0...v0.19.0

SymbolicRegression.jl - v0.16.2

Published by MilesCranmer over 1 year ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.16.1...v0.16.2

SymbolicRegression.jl - v0.16.1

Published by MilesCranmer over 1 year ago

SymbolicRegression.jl - v0.15.3

Published by MilesCranmer over 1 year ago

SymbolicRegression.jl - v0.15.2

Published by MilesCranmer over 1 year ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.15.1...v0.15.2

SymbolicRegression.jl - v0.15.1

Published by MilesCranmer over 1 year ago

SymbolicRegression.jl - v0.15.0

Published by MilesCranmer almost 2 years ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.14.5...v0.15.0

SymbolicRegression.jl - v0.13.2

Published by MilesCranmer almost 2 years ago

  • Allow strings to be passed for the parallelism argument of EquationSearch (e.g., "multithreading" instead of :multithreading). This is to allow compatibility with PyJulia calls, which can't pass symbols.

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.13.1...v0.13.2

SymbolicRegression.jl - v0.12.0

Published by MilesCranmer about 2 years ago

What's Changed

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.11.1...v0.12.0

SymbolicRegression.jl - v0.11.1

Published by MilesCranmer about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/MilesCranmer/SymbolicRegression.jl/compare/v0.10.2...v0.11.1

Package Rankings
Top 9.62% on Juliahub.com
Badges
Extracted from project README
version Dev Discussions Paper CI Coverage Status
Related Projects