Quite an extensive implementation. Thx. I wonder how it can be implemented with MNIST. I have seen other vids where kNN is usd with MNIST. I wonder what parts of the program would have to be changed.
Hey aladdin, im currently getting this issue and im unsure as to what is wrong. i assume my data but it doesnt make sense as to why it is wrong? File "program.py", line 149, in predict_labels k_closest_classes = self.y_train[y_indices[: self.k]].astype(int) TypeError: only integer scalar arrays can be converted to a scalar index
I guess perhaps the easiest is loading it with PyTorch torchvision or something like that. Actually not sure, haven't tried loading mnist outside of pytorch/tensorflow frameworks
Just found your channel, this playlist along with others is amazing, thanks man
hey bro I want scratch code of KNNimputer is this helpful or not!!!
please order the ML playlistchronologically. Amazing Channel. Please dont stop
Quite an extensive implementation. Thx. I wonder how it can be implemented with MNIST. I have seen other vids where kNN is usd with MNIST. I wonder what parts of the program would have to be changed.
I don't think you have to change anything to run it on mnist. Which part do you think would be problematic?
@@AladdinPersson Okay, I looked at the data again. I see how you have two files, data and targets. You're right there should be not much of a problem.
thank you for the great tutorial! :)
Hey aladdin, im currently getting this issue and im unsure as to what is wrong. i assume my data but it doesnt make sense as to why it is wrong?
File "program.py", line 149, in predict_labels
k_closest_classes = self.y_train[y_indices[: self.k]].astype(int)
TypeError: only integer scalar arrays can be converted to a scalar index
Can you help me to implement cosine similarity to knn ??
If I am trying to run it with MNIST how do I read in the data?
I guess perhaps the easiest is loading it with PyTorch torchvision or something like that. Actually not sure, haven't tried loading mnist outside of pytorch/tensorflow frameworks
you can load data from sklearn
*from sklearn.datasets import load_digits*
*mnist = load_digits()*
*X = **mnist.data*
*y = **mnist.target*
i can't import numpy. what should i do?
You could check if you have numpy installed... pip install numpy