# \[ANN\] SymbolicRegression.jl - distributed symbolic regression

**URL:** <https://discourse.julialang.org/t/ann-symbolicregression-jl-distributed-symbolic-regression/54853>\
**Category:** Package Announcements\
**Tags:** package, announcement, symbolic\
**Created:** [February 8, 2021, 4:47pm UTC](https://discourse.julialang.org/t/ann-symbolicregression-jl-distributed-symbolic-regression/54853 "2021-02-08T16:47:24Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Post date:** [March 13, 2025, 9:11am UTC](https://discourse.julialang.org/t/ann-symbolicregression-jl-distributed-symbolic-regression/54853/21 "2025-03-13T09:11:12Z")

</div>

Is it possible to use non-differentiable loss functions for discrete / combinatoric problems, e.g. producing a symbolic formula to give a ranking score for the best next city to visit in a traveling salesman problem? (Guess it’s unlikely but would like to ask.)

---

<div class="post-metadata">

**Author:** ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Post date:** [March 13, 2025, 10:25am UTC](https://discourse.julialang.org/t/ann-symbolicregression-jl-distributed-symbolic-regression/54853/22 "2025-03-13T10:25:39Z")

</div>

Yeah you can use `loss_function` to write a custom loss. No need for it to be differentiable either, anything is allowed.

You should also check out “template expressions”: [Parameterized Template Expressions · SymbolicRegression.jl](https://ai.damtp.cam.ac.uk/symbolicregression/stable/examples/template_parametric_expression/)

Read through the forum for other examples of this: [MilesCranmer/PySR · Discussions · GitHub](https://github.com/MilesCranmer/PySR/discussions). The forums for PySR and SymbolicRegression are unified to that page. There’s probably over 100 examples of custom loss functions.

---

<div class="post-metadata">

**Author:** ![nico](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nico/32/211667_2.png) [@nico](https://discourse.julialang.org/u/nico)\
**Post date:** [March 13, 2025, 10:36am UTC](https://discourse.julialang.org/t/ann-symbolicregression-jl-distributed-symbolic-regression/54853/23 "2025-03-13T10:36:46Z")

</div>

Thank you very much.

[Previous page](https://discourse.julialang.org/t/ann-symbolicregression-jl-distributed-symbolic-regression/54853.md?page=1)
