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 .

GitHub

CODE IN PROGRESS

When I run :

python myTraining.py

I get :

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

And when i run :

python main.py

i get :

Traceback (most recent call last):
  File "main.py", 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:
python myTraining.py
it spits out this error:

Traceback (most recent call last):
  File "e:/WhiteHat JR/Hackathon/code/hackathon_whjr-covid-calculator-1/myTraining.py", line 25, in <module>
    Y_train = train[['infectionProb' ]].to_numpy().reshape(800,)
  File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py", 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\indexing.py", 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\indexing.py", 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 ?!