1.对Lorenz系统进行稀疏识别的时候，即便加了噪声，识别出来的参数也是非常准确的，这是为什么？用的回归方法也只是STLSQ

``````using DataDrivenDiffEq
using ModelingToolkit
using OrdinaryDiffEq
using LinearAlgebra
using Random
using Statistics
using Distributions

# Create a test problem
function lorenz(u, p, t)
x, y, z = u

ẋ = 10.0 * (y - x)
ẏ = x * (28.0 - z) - y
ż = x * y - (8 / 3) * z
return [ẋ, ẏ, ż]
end

u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
dt = 0.1
prob = ODEProblem(lorenz, u0, tspan)
sol = solve(prob, Tsit5(), saveat = dt)
real_u = sol[:, :]'

NoiseLevel=10;
Random.seed!(0);
NoiseMag=NoiseLevel*std(real_u,dims=1)/100;
Noise=NoiseMag.*rand(Normal(0,1), size(real_u));

sol[:, :] = sol[:, :] .+ Noise'
## Start the automatic discovery

@variables t x(t) y(t) z(t)
u = [x; y; z]
basis = Basis(polynomial_basis(u, 5), u, iv = t)
opt = STLSQ(exp10.(-5:0.1:-1))
ddsol = solve(ddprob, basis, opt, options = DataDrivenCommonOptions(digits = 1))
system = get_basis(ddsol)
println(get_basis(ddsol))
println(get_parameter_map(system))
``````

``````# Calculate the derivative
du=zeros(size(real_u));

p0=[10.0;28.0;8/3]
# Calculate ground truth for derivative
for i=1:size(real_u,1)
du[i,:]=lorenz(real_u[i,:], p0, 0)
end