Ask coding questions

← Back to all posts
Problem with Decision Tree
JosephHaws1 (2)

I decided to try out machine learning because I saw what the youtuber Michael Reeves was able to do with it, and thought to myself: "Gee, this machine learning stuff sure looks cool! I think I'll try this out on a smaller scale. It shouldn't be too hard!"

Ah, the folly of youth.

Anyway, I'll get to the point. My machine learning program isn't working because apparently, in the version it's running in, one part of a module (sklearn.cross_validation) just decided to never exist in the first place.

I went to the sklearn website, and low and behold, the version that sklearn.cross_validation is in is supposedly a later one. (Something around the lines of v0.15 or v0.15-git. The version that replit decided to give me was v0.0(?) which was (and still is) extremely confusing) I tried to change the version listed in one of the files (I think it was the one called poetry. I forgot. All I know is that it was on top of that other file containing info on packages) which actually WORKED. Except it didn't.

When it tried updating the package to v0.15, the console said it didn't exist and stopped the program. So, to my knowledge, I'm stuck on this version.

So here's my question: Is there an alternative to sklearn.cross_validation that I can use, and if so, how should I modify my program to fit this method and/or package? Additionally, I'd like you all to check my program and the data along with it, tell me if I did anything wrong and how to fix it. This is my first ever machine learning project, and I don't even have basic knowledge of calculus to even understand how half of this works yet. I literally followed a tutorial on this which used a completely different dataset compared to mine, just to see how everything worked. (Link to the tutorial I used is https://www.geeksforgeeks.org/decision-tree-implementation-python/ by the way. Yes, I know it's 2 years old. Sue me.)

I'm well aware of the fact that this is probably unsalvagable on a multitude of levels. All I need is some straight up advice on what I'm doing, information on the best way to start learning machine learning, and (hopefully) a way to fix the mess I've made.

Thank you for listening to my TedTalk.