Skip to content

What is L in the custom objectives? #372

Answered by MilesCranmer
unary-code asked this question in Q&A
Discussion options

You must be logged in to vote

L is just a type variable that you have in the loss functions — it’s based on the dataset type of Dataset{T,L} that you would need to declare in the function signature. L could be a Float32 or a Float64 or something else.

Note that L(Inf) just means: “convert infinity to type L”.

If you want to use L from the loss function in other functions, you could pass it. But normally all you need to do is just wrap the output of the other function with L(…) to convert whatever numerical type it outputs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MilesCranmer
Comment options

Answer selected by MilesCranmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
PySR PySR-related discussion SymbolicRegression.jl SymbolicRegression.jl-related discussion
2 participants