Overfitting

  

Categories: Metrics

Our cousin Jaime has put on a little weight recently, and as we sit across from him at a family dinner, we can’t help but notice that his favorite shirt is stretching apart at the seams trying to accommodate his expanding girth. We snicker and tell him it looks like his body is overfitting his clothes. He snickers back and tells us we used the word “overfitting” incorrectly.

He’s right, we did. “Overfitting” is actually what happens when we create a model based on data that can’t be extrapolated to the real world. It can’t predict; it can only draw conclusions based on the historical data upon which we built it. And if that data—our training data—isn’t reflective of reality, then our model won’t be, either. This usually happens as a result of one of two things: either we have way too many data parameters, or we have so few data points that our model treats the anomalies as part of the pattern it’s supposed to recognize and predict.

As an example, let’s get back to poor Jaime. Let’s say we’re trying to predict how many cans of Pepsi he’ll drink in a given day, so we keep a log for seven days. On Monday, Tuesday, and Thursday, he drank four cans. On Wednesday and Saturday, it was five. Friday was three, and Sunday was zero. Based solely on this data, our model might predict that Jaime won’t drink Pepsi on Sundays. In reality, though, he was sick that day and only drank green tea with honey and milk. That anomaly should not be a part of our Pepsi predictions, because it was just that: an anomaly. Our model overfits the data.

Related or Semi-related Video

Finance: What is a WACC Model?18 Views

00:00

Finance allah shmoop What is a lack model That's whack

00:07

Yeah it is people We had to go there once

00:11

okay we're done Quack stands for weighted average cost of

00:15

capital and whoa yeah that's a mouthful heavy term but

00:19

the concept's pretty simple All right Well let's say you

00:25

run the famed charcoal smoker producer grills grills grills or

00:31

grilles Cubed is matthew people like you said and you

00:33

want to buy We've got gas The finest purveyor of

00:37

propane grills on the market which will help grills Grilled

00:41

grills rule the outdoor barbecue market no matter what their

00:44

customers Fuel of choices Well you need to borrow a

00:47

ton of money to buy out your competitors A billion

00:50

dollars worth of borrow in fact it's so much dough

00:53

that you have to borrow it from three different places

00:57

Well the money you're borrowing is the capital You need

01:00

to buy your target We've got gas That's your target

01:03

Okay capital c and wacker at least one Well the

01:07

bank demands that the bank comes first in priority Should

01:11

things you know go awry and you go the b

01:14

word Yeah Bankruptcy We we don't like to say that

01:17

too loudly Run banks Okay well the bank will loan

01:20

you two hundred million dollars and we'll charge you five

01:22

percent interest on that money That five percent is your

01:25

cost of capital from that bank lender for funding round

01:29

number two while you turned a sweet and beatrix who

01:33

in addition to being a killer grill meister in her

01:36

own right Well she also happens to be loaded So

01:39

anti b agrees to loan you the second traunch of

01:42

money and we'll come in second in priority behind the

01:45

bank in collecting her dough Should you know the b

01:48

word happened She'll own you seven hundred million at seven

01:52

percent interest Great So now you only have to raise

01:55

your last hundred million box and it has to come

01:58

third in the priority stack up of collecting Should things

02:01

go you know awry With no other options you hit

02:04

up tony mafia ony the shadiest loan shark on either

02:07

side of the mason dixon So you pay your respects

02:10

you know just the glove with tongue and things get

02:13

a little weird But somehow at the end of the

02:15

day you walk away from tony's headquarters with a wallet

02:19

full of cash as your stomach is full of non

02:22

amalfi onis sunday raghu what That last hundred million box

02:26

comes with a very high interest price Twelve percent So

02:31

when the tony notes ironically that quack is the same

02:34

noise that baseball bats make when they hit knees when

02:38

will you pay attention And you do the math keenly

02:40

aware that the waiting's here are very different looks like

02:44

this and that the huge middle traunch of seven hundred

02:47

mil it's seven percent has the biggest effect on your

02:50

cost of capital because well it's a big fat seventy

02:53

percent of the total amount you're borrowing Well the first

02:55

two hundred mill is cheap at five percent and it

02:57

costs you ten million bucks here to rent that money

03:00

The second trunk of seven hundred million is kind of

03:02

sort of mad sheepish at seven percent and it costs

03:05

forty nine mil a year to rent and that last

03:08

traunch of one hundred mil is super expensive for what

03:11

you're getting costing you twelve million a year to rent

03:14

So you add up the capital rental costs of ten

03:18

plus forty nine plus twelve and you get seventy one

03:21

million box to rent a billion dollars for this transaction

03:25

that seventy one mil to rent a bill and pay

03:28

that runs So what is your whack or weighted average

03:32

cost of capital Well seventy one million over a billion

03:36

or seven point one Percent The black models always percentage

03:40

Some companies will use their stock to buy a competitor

03:44

er rather than using cash But that's not always the

03:46

case and calculating the cost of equity is way more

03:49

complex and involves a lot more smoke and or mirrors

03:52

So we're just doing debt here people and there you

03:54

have it Whack in a nutshell But you know what's

03:57

not whack shmoop snu finance themed hip hop album on

04:00

sale soon coming soon to a itunes thinking you're you 00:04:04.93 --> [endTime] yeah we'll eat your heart out there hamilton

Up Next

Finance: What is the Black Scholes Model?
11788 Views

What is the Black Scholes Model? The Black Scholes Model is used to determine the price of call options. It looks at the change in stock price over...

Finance: What are Financial Projections?
96 Views

Financial projections are calculations for profit and loss after factoring in expenses, gross revenues, cash flow, debt, and a host of pertinent fi...

Finance: What is the Dividend Discount Model?
2 Views

What is the Dividend Discount Model? Valuation of stocks can take numerous forms. One way in which one perspective on undervalued stocks is determi...

Find other enlightening terms in Shmoop Finance Genius Bar(f)