r/learnpython 2d ago

Starting Python again for ML/AI. How should I study it effectively?

Hi everyone,

I'm starting to learn Python again after taking a long break. I studied it before, but I didn't use it much, so I forgot a lot of things. Every time I come back to Python, I feel like I'm starting from scratch again.

My long-term goal is to use Python for machine learning, deep learning, and AI. However, I'm not sure what the most effective learning path is.

Should I focus on mastering Python fundamentals first, or should I start building small ML projects as soon as possible? Also, how can I remember what I learn instead of forgetting it after a few weeks?

If you've been in a similar situation, I'd really appreciate your advice or any resources that helped you.

Thanks in advance!

2 Upvotes

16 comments sorted by

2

u/riklaunim 2d ago

And what do you expect to do with ML, DL and AI? If you want to be a software developer then you have to learn that. If you want to know theory and science behind AI/ML then pretty much go to a university and finish CS with such specialization as it's mostly math and theory.

-4

u/Forsaken-Violinist74 2d ago

I want to apply machine learning, deep learning, and AI to my data

2

u/vardonir 2d ago

ML/DL in medical imaging data (for example) is very different from ML/DL in financial data.

Domain knowledge comes first. Know your data. Then statistics. Then you can start messing around with Python, visualize your data, etc. And then you need to figure out what problem you're trying to solve/what hypothesis you're trying to prove.

...and then you can look at ML libraries. If you have a lot of data ("a lot" is relative to the field), and then you can look at DL libraries.

2

u/riklaunim 2d ago

And what data do you have and what you want to do with it? Any practical use case will require a wide knowledge of Python, software development and then libraries/frameworks used for data processing, and that's still bit off from trying to use existing models in such workflows - that's a lot of learning and practice.

1

u/SprinklesFresh5693 1d ago

You know that machine learning is just stats but with a fancy name right?

2

u/Duffield_Najuf 2d ago

Master the Python fundamentals first, but don't wait too long before building projects. Write code every day, even if it's small, because consistent practice is what makes concepts stick. Once you're comfortable with basics like functions, classes, and data structures, start simple ML projects using libraries like pandas and scikit-learn.

2

u/stepback269 2d ago

Agree.
You must do more than learn the fundamentals. You must master them so they become second nature. Otherwise you will get stuck going back to basics over and over again every time you start something new.

1

u/mc_pm 1d ago

The way to keep from forgetting it after a few weeks is... to keep using it, more than every few weeks.

If you really want to do this, you should plan on spending 60-120 minutes a day, 4-5 days a week, for the forseeable future.

Relearn the very basics, then start programming. Don't worry about AI/ML for now, just small projects to get used to typing in Python code, getting it running, hunting down bugs, etc. After a couple of weeks, get API access to some model (either local, if you have a beefy computer, or one of the big names -- it doesn't have to be expensive), and practice calling the API and getting the AI to do things for you via Python.

1

u/maw501 1d ago

Forgetting is how your brain works if you don't keep practicing.

It's analogous to, say, lifting weights or getting fit. How long you can retain something is a function of the type of practice you do and how often you repeat it (and when).

Passive activities like reading and watching do little for your ability to actually produce code. Whereas writing code from scratch is entirely active and effortful - yet it's what causes most learning and discomfort ("desirable difficulties").

In practice this means closing AI or any other helpers and trying to write the thing from memory. You'll get it wrong, so work out where then try again. Ideally you then come back to it a few days later, then a couple of weeks later etc.... It's precisely this successful recall after a gap ("retrieval practice") which is what makes knowledge stick and helps you build fluency.

On fundamentals vs projects: I always do both and in parallel, though choosing appropriate projects as a beginner is challenging so I'd recommend you build up basic proficiency first.

1

u/TheRNGuy 1d ago

How often do you code?

If you forget, just read about it again.

1

u/SprinklesFresh5693 1d ago

Read a few pages of how python works and START BUILDING. Thats the key, if you know how ML works, if not youll need to study ML too.v

1

u/Simplilearn 1d ago

Yes, you should focus on Python first. A strong foundation will make learning machine learning and AI much easier.

Start by refreshing the basics, then practice solving small coding problems and build simple projects to reinforce what you learn. Once you're comfortable with Python, move on to libraries like NumPy, Pandas, and Matplotlib before diving into machine learning and deep learning.

If you're looking for a place to start, our Python for Beginners and Machine Learning using Python courses can align with your learning journey. These are available for free on simpliearn skillup.

1

u/No_Wind_1982 21h ago

Why don't you use AI to learn? That way you will be killing 2 birds with 1 stone.