pykan
pykan copied to clipboard
Improve on a symbolic function
I'm trying to optimize a heuristic someone wrote manually, with gold data I have. Right now, I'm training an MLP, but it would be nice to create a KAN if I could start it off from the heuristic -
The heuristic is, given (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), calculate:
5.4*\sqrt{(x_3 - \frac{2*x_1 + x_2}{3})^2 + (y_3 - \frac{2*y_1 + y_2}{3})^2}
Wow thanks for sharing the use case! If I understand correctly, the problem is essentially compiling a symbolic formula into a KAN?
yes! compiling the formula into a (pruned) KAN so that I can then optimize the KAN to find use for my extra inputs (for example, here I have a z
axis that is unused by the formula)
Any update on this @KindXiaoming ? Would love to be able to init like this
@AmitMY Introducing KAN compiler :)
Tutorial: https://github.com/KindXiaoming/pykan/blob/master/tutorials/Interp_3_KAN_Compiler.ipynb