Documenting code
Often, you’ll come across code that someone else (including an earlier version of you) has written and it’ll not make sense to you. You might have to go through each line and function and class, running it in your mind and testing each bit of code in an IDE.
Fortunately, there is now another option: LLMs or chatbots. You can get one to be your personal code translator to clarify what is going on.
You can put some code in the chat window and ask the bot to explain what it does. You will generally also get detailed explanations when the chatbots give you code.
Let’s get ChatGPT and to explain some code
Statistical tests are useful for statisticians and data scientists, so, let’s do some. Jason Brownlee can help here [Brownlee_17Stats]. What is a Shapiro-Wilk test?
Here is some code in Python for this, from https://machinelearningmastery.com/statistical-hypothesis-tests-in-python-cheat-sheet/:
# Example of the Shapiro-Wilk...