SciML / SciML/DataDrivenDiffEq.jl
OccamNet Example
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 430
- Forks
- 58
- Avg merge
- 6h 29m
- Merged PRs (30d)
- 28
Description
It looks like the OccamNet example is working in the new version of the docs. However, running locally, I can't get the basis to show up from the result. Running the following:
using DataDrivenDiffEq, LinearAlgebra, ModelingToolkit, Random
using Flux
Random.seed!(1223)
# Generate a multivariate dataset
X = rand(2,10)
f(x) = [sin(π*x[2]+x[1]); exp(x[2])]
Y = hcat(map(f, eachcol(X))...)
net = OccamNet(2, 2, 3, Function[sin, +, *, exp], skip = true, constants = Float64[π])
ddprob = DirectDataDrivenProblem(X, Y)
# Define the algorithm
sr_alg = OccamSR(functions = Function[sin, +, *, exp], skip = true, layers = 3, constants = [π])
# Solve the problem
res = solve(ddprob, sr_alg, ADAM(1e-2), max_iter = 1000, routes = 100, nbest = 3)
metrics(res)
result(res)
results in:
...
(Probability = 0.8476026045508704, Error = 0.0, AICC = Inf, Probabilities = [0.8964230501159264, 0.9455386097459872], Errors = [0.0, 0.0], AICCs = [Inf, Inf])
Model ##Basis#288 with 2 equations
States (2):
x[1]
x[2]
Parameters (0):
I'd expect the full basis to show up with the equations. What's going on here?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the OccamNet example from the linked symbolic-regression documentation with the provided Julia snippet, then inspect the output of metrics(res) and result(res). Compare the displayed model and equations with the expected full basis, and identify whether the behavior is caused by the example, the result formatting, or the OccamNet workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100