Python Trouble : CLF , Others

Hello Guys ,

I am making a calculator for calculating the probability of getting Corona-Virus by inputting your data like age , body pain , difficulty in breathing and other things and genrates probability of getting COVID.
This was made using Python , Jupyter , HTML , AI . I am a coder in India which is in a serious crisis of COVID. Was Made using this with a tutorial .



When I run :


I get :

Traceback (most recent call last):
  File "", line 31, in <module>
    pickle.dump(clf, file)
NameError: name 'clf' is not defined

And when i run :


i get :

Traceback (most recent call last):
  File "", line 7, in <module>
    clf = pickle.load(file)
EOFError: Ran out of input

I will really appreciate help , and someone always flags my help as "spam " i just wanna fix my code.

Up date

python myTraining 

works with no error

Hello guys ,
(BTW before using an IDE i was using Jupyter)

I am making a python project and this did not work out . Please help

Files : GitHub

(Code is not fully finished)

When i run:
it spits out this error:

Traceback (most recent call last):
  File "e:/WhiteHat JR/Hackathon/code/hackathon_whjr-covid-calculator-1/", line 25, in <module>
    Y_train = train[['infectionProb' ]].to_numpy().reshape(800,)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\", line 2908, in __getitem__
    indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
  File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\", line 1254, in _get_listlike_indexer
    self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\", line 1298, in _validate_read_indexer
    raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['infectionProb'], dtype='object')] are in the [columns]"

Please do not create duplicate topics for the same challenge/project question(s). This duplicate topic has been merged.

Thank you.

Was it two , I remember posting once ?!