pykan icon indicating copy to clipboard operation
pykan copied to clipboard

loss_fn by default is Mean Squared Error (MSE), not Root Mean Squared Error (RMSE)?

Open mw66 opened this issue 1 year ago • 2 comments

https://github.com/KindXiaoming/pykan/blob/915726a6770bf439021f1bac38bfe39fd424159e/kan/KAN.py#L844

Also can you add the doc for this loss_fn param?

mw66 avatar May 03 '24 00:05 mw66

Hi the training loss is by default MSE, but the saved results are for RMSE. RMSE loss is not differentiable (at zero) hence would have optimization problems. MSE has better landscape.

KindXiaoming avatar May 03 '24 00:05 KindXiaoming

Hi the training loss is by default MSE, but the saved results are for RMSE. RMSE loss is not differentiable (at zero) hence would have optimization problems. MSE has better landscape.

OK, but can you doc this info, otherwise it's confusing when comparing the above code with the paper / tutorials.

mw66 avatar May 03 '24 00:05 mw66