pykan
pykan copied to clipboard
a improve about Unsupervised learning
I noticed that changing the seed in the example of unsupervised learning can lead to inaccurate results, and I found that the last layer function has become a quadratic function (Figure 4). I think the last layer function should remain a Gaussian function, so I added a feature called keep_fit
The effect is as follows
simple change:
Hi, it is still Gaussian but just a part of it, so locally it looks like a quadratic function. The real problem with seed=55 looks like the regularization lamb
is too large (for seed=55, although this penalty strength seems to work fine for other seeds). Please let me know decreasing lamb
can solve your problem for seed=55.
Also, although the Gaussian function is fixed, the input and output affine transforations are learnable. By keep_fit, you make sure the affine transformations are always identity. Glad that you solved it, although I'm not sure if general users would find this feature useful. And please try the regularization trick I mentioned above and let me know how that works :).
I see that you have a bool keep_fit
, that sounds reasonable. If you want, you can do a PR (please set keep_fit=False
by default since it will slow down things a bit I guess).