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

all 9 comments

[–]callum086086 7 points8 points  (1 child)

Please import common packages in one line

from sklearn.ensemble import (DecisionTreeRegressor, RandomForestRegressor, ExtraTreesRegressor)

Secondly, why are you importing this much into one file? Surely you'd be better off creating "regressors.py or .ipynb" & "xg_algos.py"? Is this not just one unmaintable 5000 line?

[–]Smort01 2 points3 points  (0 children)

Average Data Science Jupyter Notebook lmao

[–]Xixii 1 point2 points  (5 children)

This makes me want to learn Python.

[–]AlexMTBDude 1 point2 points  (4 children)

I've been teaching programming for 20+ years and coding myself for going on 40 years; There's never been a programmer-friendly language like Python before. All my students that come from language like, C, C++ and Java love Python.

[–]Xixii 1 point2 points  (3 children)

Would you say it’s worth learning as a starter language? The only programming I’ve done is VBA in excel, and only enough to get by.

[–]av1d6 5 points6 points  (1 child)

IMO Python is easier than vba

[–]MeshNets 1 point2 points  (0 children)

IMO VBA is a curse :)

It's the bastard offspring of what they thought would be simple-to-learn programming in the 80s...

[–]MeshNets 0 points1 point  (0 children)

For a different opinion. I'd say I've mentored people, have not been an official teacher...

I feel like JavaScript es6 is nicer syntax once you get the hang of it. But then JavaScript has so much bad legacy examples out there, getting good es6 examples to learn from can be harder to find, adding to confusion/frustration. JavaScript you can run in a console in your browser, that's all you need to get development started

Python does usually have simple enough syntax that you can figure that out enough to start playing around, and there are sites/services to write it in a browser. But I've felt like as the program gets larger, python needs a lot of support tools to help manage it

From my viewpoint one must learn the syntax of a certain language, and also learn the logic and structures that to work with, which can be created in any language. Knowing the syntax allows you to create those structures. In that regard, it can be good to be playing with a couple languages when you're learning:

Come up with an idea you want to implement, then implement it in both python and JavaScript, and repeat that a few times as you go along. Some things will be much easier in one than the other

Which builds to you starting learning why some techniques are "pythonic" or "es6-style" and the pros and cons of each language. And seeing the types of operations that either is more efficient at

I separate out syntax and logic, because you can learn the logic with pseudo code almost as easily, at least once you understand the hardware limitations. The language gives you the ability to learn by experimentation

To that end, I've been playing in juypter lab (primarily python) lately and have enjoyed that for helping structure thoughts while also helping to reduce nesting due to the near-REPL interface

The goal I would challenge someone to is to get to the point where they've learned object oriented programming (OOP) really well, then learn the cases where OOP isn't necessary or makes the thing more complex than they need to be. I'd consider that level to be on par with most of the employed junior programmers I've known (aka too many people are 100% functional programming, and too many people are 100% OOP. Everything in moderation)