Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python file naming convention for data science projects

What is the correct naming convention for files in a data science and machine learning project?

I believe the file name of the Python classes should be a noun. However, I want to make it clear that whether to name the class as a subject noun or object noun.

Which of these should I use?

1) The class that outputs plots.

visualization.py, visualizer.py, vis.py, or ...

2) The class that analyses the dataset and outputs files that contains results.

analysis.py, analyzer.py, or ...

3) The class that coverts the dataset to pickle files.

preprocessor.py, preprocessing.py, prepare.py, or ...

(I had checked PEP8 but couldn't find the clearly naming conversion for the file names)

like image 834
Jiho Choi Avatar asked Oct 17 '22 05:10

Jiho Choi


1 Answers

here in PEP-8 naming convention section, YOU will find the correct way.

it's is also discuss in pep-8 that naming convention is ambiguous.

so if you want a correct way ( which another organization follows) then go to GitHub ( tensorflow for example ) see how they maintain there naming convention for maintained project.

you can follow there structure and start doing the project.

Nothing is fixed. it's all depends on how you want to structure it. Better is it should be, easy to read and maintain.

like image 163
sahasrara62 Avatar answered Oct 22 '22 09:10

sahasrara62