# Supervised learning in RKHM
Code for "Spectral Truncation Kernels: Noncommutativity in C*-algebraic Kernel Machines"

## Setup

To run the code, please install the following packages with Python 3.10:
- numpy
- tensorflow 2.15
- idx2numpy


## Data

For the experiment with MNIST, we need the dataset "train-images.idx3-ubyte", which can be downloaded from "http://yann.lecun.com/exdb/mnist/". Download these files to the same directry as that containing codes.


## Running the code

- For regression task of synthetic data with k_n^{poly,q}, run "python regression_poly.py".
- For regression task of synthetic data with k_n^{prod,q}, run "python regression_prod.py".
- For regression task of synthetic data with k_n^{prod,q} and the deep setting, run "python regression_prod_deep.py".
- For regression task of synthetic data with k_n^{sep,q}, run "python regression_sep.py".
- For image recovering task of MNIST, run "python mnist_recover.py".
- For operator learning task, run "python operator_learning.py".
