KindXiaoming / pykan

Kolmogorov Arnold Networks
MIT License
13.7k stars 1.21k forks source link

Training KAN on a diabetes classification dataset #217

Open Chukwuebuka-2003 opened 1 month ago

Chukwuebuka-2003 commented 1 month ago

Now, I tried to train the KAN on a dataset that deals on classification.

My question are these:

image

image

image

image

image

Now when I tried to run this:

image

This was the error that I was seeing: ValueError: array must not contain infs or NaNs

I'm currently stuck here: image

KindXiaoming commented 1 month ago

hi, does model.train() work well (doesn't show any NaN)? Can you nail down to whether the problem comes from train or auto_symbolic?

ChrisD-7 commented 1 month ago

@KindXiaoming i think his issue is with the auto_symbolic function cuz it looks like his model is trained and pruned

Chukwuebuka-2003 commented 1 month ago

@KindXiaoming I do think that this issue might be from the auto_symbolic.

Like @ChrisD-7 said, the model has been trained and pruned.

ChrisD-7 commented 1 month ago

@Chukwuebuka-2003 are u facing an issue with the dataset? like what the size is when building this classifier I have a larger dataset and run an issue when passing all features through it so I tried loading it through my GPU and faced an issue how big is ur dataset?

ChrisD-7 commented 1 month ago

yup the low visualization is not that good for classification probs

image

Chukwuebuka-2003 commented 1 month ago

@ChrisD-7 The dataset that I used isn't big but a little dataset used to train and test classification models. I will share my notebook

ChrisD-7 commented 1 month ago

I ran a model and will share it as well will link my repo

ChrisD-7 commented 1 month ago

@Chukwuebuka-2003 take a look : https://github.com/ChrisD-7/Fraud-Detection-in-Supply-Chains-with-Kolmogorov-Arnold-Networks

ChrisD-7 commented 1 month ago

@Chukwuebuka-2003 were u able to run it ??

Chukwuebuka-2003 commented 1 month ago

@ChrisD-7 I was able to run it, but I came across related errors

Here's the link to my repo on this: https://github.com/Chukwuebuka-2003/kan_diabetes

ChrisD-7 commented 1 month ago

@Chukwuebuka-2003 let me take a look

ChrisD-7 commented 1 month ago

@Chukwuebuka-2003 I have submitted a pull request. Please let me know if there are any additional changes needed:

image

@KindXiaoming I believe this issue can now be closed. The model is functioning well and achieved around 80% accuracy. I encountered some issues with converting the formula to NumPy, but I managed to resolve them.