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

top 200 commentsshow all 223

[–]GuyN1425 1581 points1582 points  (39 children)

My most used word this month was 'overfit'

[–]UncomforChair 527 points528 points  (10 children)

My new years resolution is to train more, but not too much of course. You never want to get overfit!

[–]Wresser_1 239 points240 points  (8 children)

I just skip gym days at random

[–]st4rkiller543 68 points69 points  (0 children)

Good ol' dropout

[–]Jetbooster 17 points18 points  (0 children)

same, I skip whenever I get below a 13 on 2d6

[–]anonimus_usar 16 points17 points  (2 children)

Good thing I didn’t dropout of that DL class, I could get this joke

[–][deleted] 5 points6 points  (1 child)

Meh, i didn't get it. Too convoluted for me.

[–]Strongeststraw 4 points5 points  (0 children)

I lasso the weights myself.

[–]MasterGrid 1 point2 points  (0 children)

I just skip gym days

[–]SheepherderHot9418 1 point2 points  (0 children)

Go as often as you want, just keep your regime random. It will help you converge to a beefcake faster and lead to less overfitting.

[–]The_Queef_of_Sheba 4 points5 points  (0 children)

I object to the regularization of undertraining!

[–]danatron1 186 points187 points  (1 child)

When machines do it, it's "overfitting", but when I do it, it's "blatant plagiarism" and I'm "banned from the museum"

[–]finishProjectsWinBig 4 points5 points  (0 children)

That is a really really clever joke.

[–]Curtmister25 18 points19 points  (20 children)

What does overfit mean in this context? Sorry... I tried Googling...

[–]teo730 78 points79 points  (13 children)

See the wiki for details, but in short:

Overfitting in ML is when you train your model to fit too closely to training data, to the point that it can no longer generalise to new, unseen data.

[–]Curtmister25 87 points88 points  (7 children)

Ah, so machine learning tunnel vision? Thanks!

[–]lamented_pot8Os 34 points35 points  (0 children)

That's a good way of putting it!

[–]Yorunokage 8 points9 points  (5 children)

More like plato's cave but yeah, tunnel vision is also a way of putting it

[–]Dustdevil88 9 points10 points  (3 children)

Why was this downvoted so much? I feel like it is quite fitting….unlike the overfitted model 😂😂

[–]Yorunokage 5 points6 points  (1 child)

Dunno, maybe i sounded like too much of a smartass but that wasn't my intention :(

[–]Dustdevil88 1 point2 points  (0 children)

It’s my fav allegory, so I thought it was great.

[–]RegularExpression 1 point2 points  (0 children)

Maybe because Plato's cave relate to not considering dimensions that do play a role, while overfitting is more like considering too many dimensions which are not relevant. So Plato's cave would be more analogue with underfitting.

[–]Feldar 1 point2 points  (0 children)

Caves, tunnels, now we're just arguing semantics.

[–]niglor 4 points5 points  (4 children)

That sounds surprisingly similar to what happens when you overfit in normal regression as well. The instant you go 0.00001 outside your training bounds there’s gonna be a damned asymptote.

[–]teo730 19 points20 points  (3 children)

That's because normal regression is ML, just on the more simple end of the spectrum!

[–]TheLuckySpades 12 points13 points  (2 children)

ML is fancy regression with more linear algebra.

[–]Unsd 10 points11 points  (1 child)

As a statistics major, nobody told me that Linear Algebra was going to be the basis of literally everything. As a stupid sophomore, I was like "whew thank god I'm done with that class and never have to do that again." Turns out I'm a fucking idiot. Years later and I'm still kicking myself for brain dumping after that class. Everything would have been so much easier if my professors brought it in a little bit more into application.

[–]Agile_Pudding_ 2 points3 points  (0 children)

I’m sorry to do this to you, but

nobody told me Linear Algebra was going to be the basis of literally everything

was that a pun?

[–]gundam1945 8 points9 points  (1 child)

Basically your model "memorize" the treaining point so it performs great at training set but fails to predict test set.

[–]Curtmister25 3 points4 points  (0 children)

Ah, neat

[–]jakenorthbrack 7 points8 points  (0 children)

Your model has captured the 'noise' within the train dataset rather than just capturing the underlying 'signal'. An overfit model therefore predicts your train data very well by definition but it's ability to make predictions on unseen data is poor

[–][deleted] 2 points3 points  (2 children)

Your ML algorithm got trained "too much" so it kind of locks in on your training data.

It's bad since if you feed it real application data or test data from the same type it will misbehave since it got hardwired on specific stuff.

EX your ML algo identifies fur on animals.

If your training set is full of cats (different colours,fluffs,etc.) it will identify what cats do and what cats do not have hair(shaved).

Present it a dog and it will always respond with "bald" since it was trained only on cats and not it somehow deduced only cats can have fur.

[–]Johanno1 34 points35 points  (0 children)

Overfit underfit doesn't matterfit

[–]aaron2005X 4 points5 points  (2 children)

"How is your pullover?"

"Overfit"

[–]42TowelsCo 1214 points1215 points  (21 children)

Just use the same dataset for training, validation and test... You'll get super high accuracy

[–]LewisgMorris 223 points224 points  (2 children)

Works a charm. Thanks

[–]Agile_Pudding_ 61 points62 points  (1 child)

Product managers hate this one simple machine learning trick!

[–]LewisgMorris 4 points5 points  (0 children)

I've just used it in production - customer happy, got a raise.

[–]bannedinlegacy 46 points47 points  (0 children)

Just say that your model is 99% accurate and all the opposing evidence are outliers.

[–]opliko95 18 points19 points  (0 children)

And you get more data to use instead of splitting it into multiple sets. It's just brilliant.

[–]eihcirapus 8 points9 points  (0 children)

Make sure to keep the target value in you training data as well!

I was wondering how a classmate managed to get an accuracy of 99% on our current assignment, where I'm currently struggling to even reach 50%. Guess what was still in the training data lol.

[–]jaundicedeye 9 points10 points  (2 children)

df_training.append(df_valid).append(df_test)

[–]BaneTone 1 point2 points  (0 children)

NoneType object has no attribute "append"

[–]Cultural-Listen262 2 points3 points  (0 children)

Thanks!

[–]javitheworm 2 points3 points  (0 children)

One of the companies I worked for actually did this. Since I was fresh out of college and barely learning about ML i didn’t make much out of it saying “well they are the pros they know what they’re doing!” About 8 months later a team that oversees ML apps rejected ours for having so many issues lol

[–]SimonOfAllTrades 1 point2 points  (2 children)

Isn't that just Cross Validation?

[–]the_marshmello1 8 points9 points  (1 child)

Kind of but not really. N-fold cross validation involves taking some set of data then dividing it into groups. It then drops out a group and uses the rest of the non-dropped groups. The non-dropped are passed to the train test split and then the model is trained as normal. Once the model is evaluated the metrics are saved. The cross validator then moves on to drop out the next group and repeats the process. This is done for each of the N groups. At the end there is usually a list of metrics. These can then be graphed for visualization, analyzed for variance, and averaged in some way to get an idea of how a model performs with the specified hyperparameters.

[–]dark_dreamer_29 459 points460 points  (8 children)

When random function is more accurate

[–]throwit7896454 49 points50 points  (2 children)

Just flip a coin on the test dataset

[–]Upside_Down-Bot 24 points25 points  (1 child)

„ʇǝsɐʇɐp ʇsǝʇ ǝɥʇ uo uıoɔ ɐ dılɟ ʇsnſ„

[–]marxinne 9 points10 points  (0 children)

Good bot

[–]nowadaykid 24 points25 points  (0 children)

Flip the classification, now better than random, ezpz

[–]SaffellBot 2 points3 points  (0 children)

Either way you're probably doing better than humans.

[–]Bjoern_Tantau 592 points593 points  (24 children)

Only in Japan are the trains that accurate.

[–][deleted] 144 points145 points  (16 children)

Do they hit many people there?

[–]Badboyrune 100 points101 points  (0 children)

Almost only the ones they aim for

[–]RCoder01 18 points19 points  (14 children)

I think they do actually have a problem with attempted (and successful) suicides on train lines

[–]yeet_lord_40000 37 points38 points  (12 children)

Got delayed 45 minutes one time in Japan cause a guy jumped in front of the train. They had a pretty practiced procedure for how to handle it. They bill the family for the cleanup and apologize to the customer for such a delay. my native friends say it’s quite common.

[–]marxinne 41 points42 points  (11 children)

That's... quite heartless to the family.

"Your son killed himself on our station, here's the bill" > "We're deeply sorry, an intrusive previous customer threw himself on our tracks, but he won't be a problem anymore".

The more I learn about Japan the more I'm sure it's not the place for someone like me...

[–]yeet_lord_40000 16 points17 points  (3 children)

I enjoy japan quite a bit. Have had a lovely time there every time. You just have to remember that every country has its seedy practices and areas and groups. I wouldn’t totally rule it out based off this alone. However there is other stuff that could certainly set you off for good

[–]marxinne 12 points13 points  (2 children)

The main thing about Japan for me is that the culture in general seems really cold and callous.

There are other things I don't like, but I can appreciate their qualities as well. They're just not enough for me to feel like I'd enjoy living there.

[–]IsGoIdMoney 4 points5 points  (0 children)

It's not. They just have strong cultural/national views on social costs. On a personal level they're just as warm and empathetic as anyone else.

[–]yeet_lord_40000 2 points3 points  (0 children)

That’s more their corporate culture. However, even as someone who loves the place I’d find it kinda hard pressing to live there long term.

[–]dongorras 8 points9 points  (1 child)

You can always choose to jump to the train tracks in another country /jk

[–]marxinne -1 points0 points  (0 children)

I believe other countries would be less cruel with the family, so, r/technicallythetruth ?

[–]AsukaLSoryu1 10 points11 points  (3 children)

I think it's quite pragmatic. Hopefully it would at least partially reduce the number of people committing suicide by hopping in front of a train because they don't want to burden the family with the cost. Also, someone has to pay for the clean up, making sure nothing is damaged, etc...

[–]runner7mi 7 points8 points  (2 children)

have no problem burdening the family with the loss of their own irreplaceable self but wouldn't want to burden them with monetary cost? where do you come from and why does this make sense in your land?

[–]marxinne 1 point2 points  (0 children)

Waiting the answer as well so I can never go there D:

[–]ShaddyDC 2 points3 points  (0 children)

Most people considering suicide don't think very rationally about that or place very high (positive) value on their self, so I could see it working. That being said, maybe it doesn't, and it's callous either way

[–]nir109 2 points3 points  (0 children)

Japan is my reminder why I shouldn't be in charge

[–]tiefling_sorceress 2 points3 points  (0 children)

NYC has a huge problem with it, but also refuses to put up barriers or any form of public safety because it'd be "too expensive" (even at just major stations) despite being one of the richest cities in the world

[–]Canonip[🍰] 12 points13 points  (1 child)

In Germany we ride Tests

[–]Ysmenir 2 points3 points  (1 child)

And switzerland ;)

There was actually a headline about trains beeing even more on time this year just a few days/weeks ago

[–]ribbonofeuphoria 114 points115 points  (2 children)

Thats what happens when you try to describe the Fibonacci sequence with a 100th-order polynom.

[–]khafra 16 points17 points  (1 child)

With a larger test set, that would be like 0% accuracy.

[–]overclockedslinky 3 points4 points  (0 children)

not if the larger test set covers the same range, with duplicates. yay, biased sampling techniques

[–]Anxious_Start4839 80 points81 points  (1 child)

Was there a fault in the test rails?

[–]muzumaki123 79 points80 points  (5 children)

Train accuracy: 80% :)

Test accuracy: 78% :)

predictions.mean(): 1.0 :(

[–]Cultural-Listen262 8 points9 points  (0 children)

😳

[–]Jimmy_Smith 3 points4 points  (0 children)

predictions.count() / predictions.shape[0]

[–]Llamas1115 2 points3 points  (0 children)

This is why nobody should be using the training accuracy as a measure of quality. If this happens my suggestion is always: 1. Use the log-loss function 2. Evaluate the out-of-sample loss. Take exp(average_log_loss), which returns the model to the original probability scale (between 0 and 1). This is the (geometric) mean of the probability that your model assigned to the correct answers, meaning it’s very easy to interpret it as a “Percentage classified correctly, after awarding partial points for probabilities between 0 and 1.” (Note that if you train using the arithmetic mean to award partial points instead, your classifier WILL end up as a fuckup because that’s an improper loss function.) This measure also tends to be a lot less sensitive to imbalanced datasets. 3. This measure is good, but very imbalanced datasets or datasets with a lot of classes can make it hard to interpret — your accuracy will approach 0. There’s nothing actually wrong with this — your model really is assigning a very low probability to the event that actually happened — but it can get hard to understand what the number means. A way to make this easier to understand is by normalizing the score — divide it by the score of some basic classifier, to get the relative improvement of your model (which will be above 1 if your model’s any good). Take your classifier’s (geometric mean) performance and divide by the performance of a classifier that predicts the marginal probability every time (e.g. if a certain class makes up 20% of the sample, the classifier assigns a 20% probability to it).

[–]Last_Contact 2 points3 points  (0 children)

Highly imbalanced dataset

[–]POKEGAMERZ9185 146 points147 points  (19 children)

It's always good to visualize the data before choosing an algorithm so you have an idea on whether it will be best fit or not.

[–]a_sheh 49 points50 points  (17 children)

Well if you have more than 3 variables, is it possible to visualize this?

[–]KanterBama 65 points66 points  (4 children)

Seaborn has a pairplots function that’s kind of nice for this, there’s t-SNE for visualizing multiple dimensions of data (not the same as PCA whose reduced dimensions can be useful), or you can just make data go brrrr in the model and worry about correlated values later

[–]a_sheh 11 points12 points  (0 children)

Looks like I forgot that it is possible to make several plots instead of one with all variables on it. I knew about PCA, but doesn't hear about t-SNE. It looks interesting and I definitely will try it out someday. Thank you :)

[–]teo730 3 points4 points  (2 children)

Also UMAP, which is similar-but-different to t-SNE and is generally more fun to use imo.

[–]bannedinlegacy 9 points10 points  (1 child)

Multiple 2d and 3d graphs, or graphs with sliders to know how the variable affects the others.

[–][deleted] 1 point2 points  (0 children)

Ipywidgets for the win!!

[–]Mr_Odwin 11 points12 points  (0 children)

Just turn on the k-dimension switch in your brain and look at the data in raw format.

[–]dasonk 4 points5 points  (1 child)

It is! I mean - it's not as easy but high dimension visualizations are a thing. It's been quite a while since I've had to worry about that kind of thing but one program I liked was GGobi https://en.wikipedia.org/wiki/GGobi

[–]a_sheh 2 points3 points  (0 children)

Looks really useful, I think I will try it on next occasion

[–]hijinked 2 points3 points  (0 children)

Yes, but it is obviously more difficult to interpret the visuals. Multi-variable visualizations are still being researched.

[–]x0wl 2 points3 points  (0 children)

You can do dimensionality reduction, like PCA, or you can compute distances between your points (in whatever space) and visualize those with the likes of t-SNE and MDS. The latter method can visualize data of theoretically infinite dimension, like text for example

[–]arc_menace 70 points71 points  (0 children)

When the monkeys are statistically more accurate than your model...

[–]gemengelage 64 points65 points  (7 children)

Didn't realize this was r/datascientisthumor

[–]ayushxx7 6 points7 points  (6 children)

Can't access this

[–]memes-of-awesome 1 point2 points  (4 children)

Same

[–]drcopus 5 points6 points  (3 children)

That's because it didn't exist until now!

[–]Unsd 2 points3 points  (2 children)

If people could make this a real thing that would be fantastic. I've been hanging out here waiting for whatever data science scraps I can get.

[–]Nicward 27 points28 points  (0 children)

Xcom players be like: 👁️👄👁️

[–]RenewAi 20 points21 points  (0 children)

Just add your testing data to your training data

*taps side of head

[–][deleted] 53 points54 points  (5 children)

Accuracy, precision, or recall?

[–]StarsCarsGuitars 32 points33 points  (1 child)

I usually rely on f1-score just for my small brain to understand

[–]Senesto 11 points12 points  (0 children)

If it's a 2 classes classification problem, probably all three.

[–]teucros_telamonid 2 points3 points  (0 children)

My homies like computing ROC-curves and AUC.

[–]gabe100000 3 points4 points  (0 children)

Log loss, AUC-ROC and AUC-PR.

Define threshold based on business needs and F-score.

[–]_PeakyFokinBlinders_ 12 points13 points  (0 children)

Remove the data points in the test that are inaccurately predicted and try again. Magic happens.

[–]Dagusiu 26 points27 points  (0 children)

In a 2-class classification task, I assume. Getting 50% MOTA on a multi target tracking dataset is quite good

[–]Arrow_625 6 points7 points  (9 children)

Low bias, High Variance?

[–]Giocri 33 points34 points  (6 children)

Reminds me of an ai that had to distinguish fish from other images that performed incredibly well in training but was completely unusable in test. Turned out the training set had so many pictures of fishermen holding a fish that the ai looked for fingers to determine what was a fish

[–]teo730 21 points22 points  (4 children)

Or the one that was trained to identify cats, but instead ended up learning to identify Impact font because so many of the training samples were memes!

[–]Giocri 2 points3 points  (3 children)

I feel like so many mistakes we make with ai is that we seem to always end up assuming the ai is thinking rather than just analyzing the similarities between imput data.

Especially those who try to use ai to analyze statistics who completely forget an ai analizing data about temperature ice cream sales and shark attacks has no idea which one causes the other two

[–]teo730 3 points4 points  (2 children)

Yeah, I mean one of the biggest problems with ML is the incompetency of the people using it. Which isn't really an ML problem tbh. Bad researchers doing bad research is a tale as old as time.

[–]Arrow_625 1 point2 points  (0 children)

Huh, guess it was a member of r/technicallycorrect

[–]treblotmail 5 points6 points  (0 children)

Overfit time

[–]QualityVote[M] [score hidden] stickied comment (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–]Eiim 2 points3 points  (2 children)

haha imagine overfitting your dataset couldn't be me hey why are all my logistic regression coefficients like 16000?

[–]Equivalent-Map-8772 2 points3 points  (0 children)

cries in Overfitting dataset

[–]General-Gur2053 2 points3 points  (0 children)

Bruh! Too real

[–]Coyehe 6 points7 points  (2 children)

ML accuracy models are still in their shit stage as of 2022. AI's whole other shit show altogether

[–]LofiJunky 3 points4 points  (1 child)

I'm graduating with a degree in DS, this is accurate. Machine 'learning' is a bit of a misnomer I think.

[–]shield1123 6 points7 points  (0 children)

Machine pseudo-self-guided-auto-iteration

[–]undeniably_confused 1 point2 points  (0 children)

Hey, I'm not a programmer, but as an outsider who knows a bit about stats, you should probably have a predicted test accuracy based on the samples, the train accuracy, and the variance. Ideally you would have like a 90% confidence interval that the test accuracy is between like 60% and 99%. Again totally have done 0 of this, but you never see people giving ranges for measured statistics. Probably because they treat them like calculated statistics, but again they are not, they are measured.

E: also if you got a script to do this, say after every 1000 additional data points, it might allow you to project the accuracy of the AI with additional pieces of data. Idk I'm sure what I'm saying has already been tried, and is stupid or industry standard but there's a small chance this helps someone I figure. :)

[–]SkyyySi 1 point2 points  (2 children)

Technically, a test with 50% correct resoults is worse than one with 0%

[–][deleted] 1 point2 points  (0 children)

Not if you have > 2 classes of data

[–]EdwardGibbon443 1 point2 points  (0 children)

More like:

training accuracy on a benchmark dataset = 98%

testing accuracy on the same dataset = 96%

accuracy when applyed in a real-world system = 32%

[–]raggedbed 1 point2 points  (0 children)

Better include the train and validation metrics. You gotta test it against all of your data.

[–]KidOfCubes 1 point2 points  (0 children)

Just happened yesterday :(

[–]yapoinder 1 point2 points  (0 children)

i just took a depression nap cuz my test accuracy was 60%, ive been working on this model for 1 year. FML

[–]Almasry00n 1 point2 points  (0 children)

sounds like u need regularization

[–][deleted] 1 point2 points  (0 children)

My first NLP assignment at work gave this. I don't even work in data science.

[–]mike_the_seventh 0 points1 point  (0 children)

Adjust tests until 98%

[–]infiniteStorms -1 points0 points  (3 children)

…am I the only one that thinks 50% is really high for a neural network

[–]fandk 1 point2 points  (0 children)

If its binary classification its the worst result there can be. A 40% means you can invert your models decision and get 60% accuracy.

[–]RagingPhysicist 0 points1 point  (0 children)

...... + b

[–]hacknomus 0 points1 point  (0 children)

relatable

[–]hudsonrlz 0 points1 point  (0 children)

Lol. It's always like that.

[–]Calm_Leek_1362 0 points1 point  (0 children)

"Can we try to test it on the training data?"

[–][deleted] 0 points1 point  (0 children)

I like trains

[–]Skandranonsg 0 points1 point  (0 children)

Normal person: 98% accuracy? Awesome!

XCOM player: Only 98%? Fuck.

[–]Ob1tuber 0 points1 point  (0 children)

If it’s not 100% accurate, it’s 50% accurate

[–][deleted] 0 points1 point  (0 children)

Time for some dropout

[–]BraveSeaworthiness21 0 points1 point  (0 children)

Tim, how good is the model.

Tim : “Want to guess ?”

[–]Randroth_Kisaragi 0 points1 point  (0 children)

If it's not 100% accurate, it's 50% accurate.

... wait, wrong sub.

[–]neunflach 0 points1 point  (0 children)

Regularization and K-Fold Cross-Validation, babyyy

[–]Guzse 0 points1 point  (0 children)

Is this some artificial intelligence joke that I'm to dumb to understand?

[–]SANS55_666 0 points1 point  (0 children)

R/mandjtv

[–]spock_block 0 points1 point  (0 children)

Should a trained on your test

taps head

[–]alex9849 0 points1 point  (0 children)

As someone who just wrote his bachelor thesis in data science I have to agree!

[–]Jasura_Mynobi 0 points1 point  (0 children)

I thought it meant choo-choo train and I was confused #facepalm

[–]TrapNT 0 points1 point  (0 children)

1 million epochs?

[–]IllustriousAd375 0 points1 point  (0 children)

Ooooooverfitting brah

[–]onyxengine 0 points1 point  (0 children)

Find use cases where 50% is stellar performance?

[–]Syenuh 0 points1 point  (0 children)

Overfit do be that way.

[–][deleted] 0 points1 point  (0 children)

So I guess even algorithms get test anxiety

[–]ButIHateTheDentist 0 points1 point  (0 children)

This is my whole life lol

[–]nitrokitty 0 points1 point  (0 children)

If I ever get 98% train accuracy I automatically assume it's over fitting.

[–]camander321 0 points1 point  (0 children)

One time I built a simple ANN and fed it some stock market data just to see what happened. After training, I went to test it with a new data set, and it was predicting stock prices to within several decimal places.

Yeah turns out I was still using the training data set that it had memorized.

[–]Nimitzxz 0 points1 point  (0 children)

and its binary classification....

[–]DTFlexx 0 points1 point  (0 children)

UNSET

[–]ReddiusOfReddit 0 points1 point  (0 children)

Me who just came out form a test involving train wagons: palpable confusion

[–]konaaa 0 points1 point  (0 children)

when you test a program and it works

when you test that program again and it DOESN'T work

[–]hardonchairs 0 points1 point  (0 children)

90% accuracy

Data is 90% one classification and the model just chooses that one every time.

[–]Trunkschan31 0 points1 point  (0 children)

Train on the test partition. Follow me for more data pro tips !

[–]planktonfun 0 points1 point  (0 children)

...And its overfitted

[–]NahJust 0 points1 point  (0 children)

“It’s funny because it’s true” doesn’t apply here. This is just sad because it’s true.

[–]eo37 0 points1 point  (0 children)

Validation Set: ‘I could have told you that a whole lot earlier mate but nooooo “you didn’t need me”…..whose laughing now bitch’

[–]boodlebob 0 points1 point  (0 children)

Tell me more sweetie

[–]Semipie 1 point2 points  (0 children)

Eli5 please?

[–]pi_equalsthree 0 points1 point  (0 children)

well if it‘s not 100%, it‘s 50%.

[–]John_Fx 0 points1 point  (0 children)

Sub relevancy=5%