Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ y_pred, y_std = predict_with_uncertainty(model, Psi_test)
- **Use a fast BLAS backend.** The fitting loop is dense linear algebra. On Apple
silicon, `using AppleAccelerate` before `using FastARD` activates the bundled
package extension and swaps the BLAS backend (~3.5× faster on large problems);
on Intel CPUs use `using MKL`. Add the backend package to your environment —
FastARD only declares them as optional (weak) dependencies.
on Intel CPUs use `using MKL` (AMD users may also like `BLISBLAS.jl`). Add the
backend package to your environment — FastARD only declares them as optional
(weak) dependencies. To make this automatic on a given machine, put the
`using` line in `~/.julia/config/startup.jl`; Julia loads it in every session,
so the right backend for that CPU is always active. (Swapping BLAS is a
process-global effect, which is why FastARD leaves the choice to you instead
of forcing it.)
- **Large active sets:** if fits select many basis functions, the per-iteration
statistics refresh dominates. `FastARDRegressor(beta_recompute_tol=1e-3)`
throttles it for a ~5–15× speedup with an essentially unchanged model
Expand Down
10 changes: 5 additions & 5 deletions test/core_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ end
@test m_def.coef ≈ m_ref.coef

# throttled: must run, converge, and predict close to the reference
m_thr = FastARD.FastARDRegressor(beta_recompute_tol = 1.0e-3)
FastARD.fit!(m_thr, X, y)
@test sum(m_thr.active) > 0
m_throttled = FastARD.FastARDRegressor(beta_recompute_tol = 1.0e-3)
FastARD.fit!(m_throttled, X, y)
@test sum(m_throttled.active) > 0
y_ref = FastARD.predict(m_ref, X)
y_thr = FastARD.predict(m_thr, X)
@test maximum(abs.(y_ref .- y_thr)) / maximum(abs.(y_ref)) < 0.05
y_throttled = FastARD.predict(m_throttled, X)
@test maximum(abs.(y_ref .- y_throttled)) / maximum(abs.(y_ref)) < 0.05
end
Loading