SymbolicRegression.jl

授权协议 Apache-2.0 License
开发语言
所属分类 神经网络/人工智能、 机器学习/深度学习
软件类型 开源软件
地区 不详
投 递 者 孔弘盛
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

SymbolicRegression.jl

Latest release Documentation Build status Coverage
CI

Distributed High-Performance symbolic regression in Julia.

Check out PySR fora Python frontend.

demo1 demo2

Cite this software

Quickstart

Install in Julia with:

using Pkg
Pkg.add("SymbolicRegression")

The heart of this package is theEquationSearch function, which takesa 2D array (shape [features, rows]) and attemptsto model a 1D array (shape [rows])using analytic functional forms.

Run distributed on four processes with:

using SymbolicRegression

X = randn(Float32, 5, 100)
y = 2 * cos.(X[4, :]) + X[1, :] .^ 2 .- 2

options = SymbolicRegression.Options(
    binary_operators=(+, *, /, -),
    unary_operators=(cos, exp),
    npopulations=20
)

hallOfFame = EquationSearch(X, y, niterations=5, options=options, numprocs=4)

We can view the equations in the dominatingPareto frontier with:

dominating = calculateParetoFrontier(X, y, hallOfFame, options)

We can convert the best equationto SymbolicUtils.jlwith the following function:

eqn = node_to_symbolic(dominating[end].tree, options)
println(simplify(eqn*5 + 3))

We can also print out the full pareto frontier like so:

println("Complexity\tMSE\tEquation")

for member in dominating
    size = countNodes(member.tree)
    score = member.score
    string = stringTree(member.tree, options)

    println("$(size)\t$(score)\t$(string)")
end

Search options

See https://astroautomata.com/SymbolicRegression.jl/stable/api/#Options

相关阅读

相关文章

相关问答

相关文档