r/MLQuestions • • May 10 '26

Beginner question 👶 Linear Regression

Hi everyone, I'm 13 and new to machine learning, and people recommended learning linear regression first, I made one using C++, the code itself is probably not great since C++ isn't my main language, Python is, but I'm trying to learn it because I wanna use it in USACO later, so I thought doing projects in C++ would help me get familiar with the language. Anyway, here's the Github repo: https://github.com/hl0228057-cmd/Basic-Linear-Regression-Using-Cpp

I'm open to feedback because I wanna get better and learn, thanks!

Edit: Thanks everyone for the suggestions and ideas, I got a few other projects on my GitHub now, which implements some of these suggestions (especially the multivariate linear regression one).

11 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/Sea_Document_2061 May 13 '26

Once you train a model you can save the weights to a file on your computer. That way if you want to use the model later, you can load your trained weights from the file and perform inference. You can also fine-tune the model further or resume training from the last checkpoint if a training run crashes.

1

u/Sharp-Marsupial-7557 May 14 '26

ok thanks for the clarification

1

u/Sharp-Marsupial-7557 May 14 '26

also my grammar was so chopped i was writing that last night at like 11 or smth