Names of pokemons from the labels

Hi,

I have made predictions from the test data set and have the data prepared. But, how do i get back the names of the pokemons from the labels in the predictions?

hey @A18ML0031 ,
Can you let me know the way you have encoded your labels first before training.
In the same way in reverse direction just decode them to get string classes.

I have used the code labels[labels == 0] = ‘pikachu’ and so on. When i am doing the opposite to get back the words it is giving me an error

what actually the error is it showing ?

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) in ----> 1 out[out==0] = str(‘Pikachu’) ValueError: invalid literal for int() with base 10: 'Pikachu

i guess you can’t do this , because the transformed feature is now of dtype integer , so you can’t change particular samples of it back to string.
So you need to first change the column’s dtype to string first and then try this.
I hope this will help you :slightly_smiling_face:.

How am i supposed to do that? Is it supposed to be done in this statement labels[labels==0, dtype=‘str’] = ‘pikachu’? I want to create a csv file for uploading my results.

Hi, I have done the required for getting back the names of pokemons with the help of dictionary. However, I am getting 39% accuracy with the same. Could you please check the same for me?

hey , can you please share your code file for this. It would be easier to help you in that way.

Here is the code: https://ide.codingblocks.com/s/330635 Also, if you could check why I can’t post the drive link to the jupyter file of the same. I have posted them before but, since a few days it says ‘not able to upload that link to host’ something of that sort. Could you please check and help me out with the same.

Please make uploading google drive file links possible on here. It is very difficult to post the codingblocks IDE links when we are already working on jupyter. Also, how did my last reply got flagged. I have no idea about it. Please make the doubts section easier rather than asking for specific things from the students. We don’t even do our coding in .py files. We do it on jupyter which is not supported by your platform on coding blocks IDE. Earlier, I was able to post the drive links to the notebook files and now, it says that i can’t. Make things easier for the students rather than making them difficult

hey @A18ML0031 ,
I have raised your doubt to the concerned team.
Kindly wait for some time to get it corrected.

Until then you can share me your code file on drive.
share with me at [email protected] , i will check it.

hey @A18ML0031 ,
i talked to them ,
they had asked ,
to provide the link with spaces in between like www. google .com… like this

Here is the notebook file: https :confused: /drive .google .com/ file/ d/ 1QBjM- Ma99PH5MXhtQX3- mqDx6nLI8Xzi/ view?usp=sharing

https://drive .google .com/file/d/1QBjM-Ma99PH5MXhtQX3-mqDx6nLI8Xzi/view?usp=sharing Remove the spaces between. I have added them so i can upload this link

hey @A18ML0031,
try using hyplerlink for providing links , i hope that will work.

hey @A18ML0031 ,
there is no issue in your code , you are using SVM and i guess a higher score with svm is not possible with this dataset.
I would suggest you to try neural networks for the same .