Skip to main content
Figure 1. Architecture of RMoK. Figure 1. Architecture of RMoK.

1. Reversible Mixture of KAN - RMoK

RMoK

Bases: BaseModel Reversible Mixture of KAN Parameters:

RMoK.fit

Fit. The fit method, optimizes the neural network’s weights using the initialization parameters (learning_rate, windows_batch_size, …) and the loss function as defined during the initialization. Within fit we use a PyTorch Lightning Trainer that inherits the initialization’s self.trainer_kwargs, to customize its inputs, see PL’s trainer arguments. The method is designed to be compatible with SKLearn-like classes and in particular to be compatible with the StatsForecast library. By default the model is not saving training checkpoints to protect disk memory, to get them change enable_checkpointing=True in __init__. Parameters: Returns:

RMoK.predict

Predict. Neural network prediction with PL’s Trainer execution of predict_step. Parameters: Returns:

Usage example

2. Auxiliary functions

WaveKANLayer

Bases: Module This is a sample code for the simulations of the paper: Bozorgasl, Zavareh and Chen, Hao, Wav-KAN: Wavelet Kolmogorov-Arnold Networks (May, 2024) https://arxiv.org/abs/2405.12832 and also available at: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4835325 We used efficient KAN notation and some part of the code:+

TaylorKANLayer

Bases: Module https://github.com/Muyuzhierchengse/TaylorKAN/

JacobiKANLayer

Bases: Module https://github.com/SpaceLearner/JacobiKAN/blob/main/JacobiKANLayer.py