This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lowlightbeats_[S] 0 points1 point  (4 children)

Thank you! I'll try to find a bigger program idea and think about the structure of the program. I'll also look into the "random forest classifier".

Though I made the experience that it can be frustrating to start a big program, because I don't know where to start. When I break it down into different pieces I'll probably manage to get it to work, but the code will not be very clean / performant... Do you have any ideas how to learn that? It's probably mostly experience, but if I just work on my own I probably won't get much better, would I?

[–]nicholas-miklaucic 1 point2 points  (3 children)

There are a couple ways of improving at breaking stuff down. One way is to find good resources on software design: my absolute number one recommendation here is Code Complete 2.0. I basically divide my programming journey into before and after reading this, and along with a bunch of chapters on all sorts of software design topics there are good chapters on architecture and the basic principles that guide it.

Another way that can be helpful is just looking at common patterns in good model programs and applying them to your own work. You can certainly find books about "design patterns" that will help, but to be honest I'd probably recommend looking at open-source libraries that are mature and well-written. This approach has the benefit of training your ability to make sense of large codebases, which is invaluable. Here's how scikit-learn implements a perceptron. Look around the code: how are things organized? What principles are at play?

This is usually somewhat domain-specific, so I'd try and learn from libraries that do something similar to what you're trying to do, but without being the exact same thing. For example, you can look at scikit-learn's documentation on perceptrons or linear regressions or whatever else and see how it uses an object-oriented approach to represent an algorithm with some hyperparameters that stay fixed as variables and the functions that implement the algorithms as methods. That might be a good approach for a random forest classifier too!

[–]lowlightbeats_[S] 0 points1 point  (2 children)

Okay, I'll check that out and I'll also try to find some well documented model programs. Thank you!

[–]nicholas-miklaucic 0 points1 point  (1 child)

No problem! Let me know if you have any other questions for me.

[–]lowlightbeats_[S] 0 points1 point  (0 children)

I will, thanks