Utilising PySR on matrix input data #806
Replies: 1 comment 2 replies
-
So the first thing that needs to be changed is to use a However, this still won't work out-of-the-box in SymbolicRegression.jl, because of the fact that https://github.com/MilesCranmer/SymbolicRegression.jl/blob/9fabc303dd33c624739e759d960374c7f85e56f7/src/ProgramConstants.jl#L5 is set: const DATA_TYPE = Number Meaning that all elements of So the first to do is checkout a local version of SymbolicRegression.jl and make a change to: const DATA_TYPE = Any and then see what functions need to be updated to accommodate it. Hopefully not too many! |
Beta Was this translation helpful? Give feedback.
-
Hi! I have been trying to modify PySR for an application where my input features are pairs of matrices. That is, my input data is a list of pairs of matrices, say [(A1, B1), (A2, B2),....]. In general, the size of the matrices can vary. I am searching for symbolic expressions between A and B and want to utilize methods within Julia's LinearAlgebra package (there are predefined functions for determinant, trace etc.). As an example, my input data has the following form
and I would like to use the following operators for example
and potential output symbolic expressions of the form: y = x1 + LinearAlgebra.det(x2)
I have been running into issues since the scitype of my input doesn't match the model specifications for SRRegressor. Is this possible to allow through a custom implementation? Or even passing the input data as a concatenation of vectors along with indices and then reconstructing my matrices while computing loss in a custom loss function?
My current error:
Reading the new version of DynamicExpressions.jl, it seemed to me that _eval_tree_array_generic should allow for input and output data of arbitrary type
Thank you again for the wonderful package!
Beta Was this translation helpful? Give feedback.
All reactions