D20: train_test_split

Matthew Walfish
2 min readOct 12, 2021

Back on #66Days track!
Took a week off but jumped right back into ML

Photo by freddie marriage on Unsplash

Job Prospect

Hi I’m back!
I took last week off because I was working on a job interview! Yay!
Fingers crossed!

PS Getting a job in tech for the first time is just as hard as everyone/blogs/classes/tutorials said that it would be. Of course, I choose Data Science.

IBM, and more.

Anyways, I left off in the middle of my IBM Capstone Project. SpaceX, Missiles, Machine Learning. LOL.

I went off on a Dash App tangent a few weeks ago, since that was the topic of my last lab. In keeping with the #66DaysofData Challenge, I am going to take another tangent this week as well.

While these tangents kind of slow down my overall progress, it really helps me solidify my knowledge. And, the more I can code, the better.

Ok. Let’s go through the things that I did and learned today:

Lab Details

Step 1 is relatively easy; creating a NumPy Array. Check.
Step 2 applies StandardScaler, and creates another Array. Woot.
So far so good. LOL.

Then, that data and the array that I had created was used to be split up into training and testing data. Again, pretty simple and straightforward.

When I read the words, “Logistic Regression”, my brain is honestly like… “Um, No.” Machine Learning is still rather confusing to me but it’s also the thing that keeps me interested!

Again, not to complex in creating a LR object.

The next few steps were making Confusion Matrices on the testing data, after creating SVM, Decision Tree Classifier, and KNN objects. Whew. It sounds like a lot, but just like the above steps, it was rather simple and only a few lines of code. And, thankfully, IBM does give a lot of functions and code written in the labs.

Adjacent learning

Now I’m off to try and figure out what my knowledge tangent will be this week. Maybe more with data viz? ML? I can’t avoid ML and it’s difficulty forever.

Thanks for reading!
-mw

--

--

Matthew Walfish

Software Engineer. Retired Dancer. Marathoner & Yogi. Photo Lover. Dog Dad.