1
00:00:01,703 --> 00:00:04,811
In this video, I'm going to go over
the nitty gritty details
2
00:00:04,811 --> 00:00:06,475
of this model.
3
00:00:06,475 --> 00:00:08,716
This involves a little bit of math,
4
00:00:08,716 --> 00:00:11,395
so it's an optional video
5
00:00:11,395 --> 00:00:13,570
and if you feel comfortable with math
6
00:00:13,570 --> 00:00:14,642
go ahead and watch it,
7
00:00:14,642 --> 00:00:16,516
but if you don't, then you can skip it.
8
00:00:16,516 --> 00:00:20,992
without really losing too much insight
into how the model works.
9
00:00:20,992 --> 00:00:22,226
Here's the details.
10
00:00:22,226 --> 00:00:27,450
We're going to let N be the number of
strategies each person has,
11
00:00:27,450 --> 00:00:33,692
And M be the number of weeks for which
the attendance is known.
12
00:00:33,692 --> 00:00:38,272
Let t be the current time which is,
that is, the current Thursday
13
00:00:38,272 --> 00:00:41,168
that we're predicting the
attendance for,
14
00:00:41,168 --> 00:00:42,691
and the previous weeks,
15
00:00:42,691 --> 00:00:47,474
therefore are:
t minus one, t minus two, etc.
16
00:00:47,474 --> 00:00:53,738
And we're going to denote the
attendance at time t by capital A of t.
17
00:00:53,738 --> 00:00:57,486
Each strategy is going to look like this.
18
00:00:57,486 --> 00:01:03,824
So a strategy that's going to predict
the attendance for week t,
19
00:01:03,824 --> 00:01:06,878
is going to be a hundred times a sum,
20
00:01:06,878 --> 00:01:11,652
where the sum is some weight w,
which is some constant,
21
00:01:11,652 --> 00:01:15,363
times the attendance at the previous week
22
00:01:15,363 --> 00:01:19,264
plus some other constant times
the attendance at the week before that,
23
00:01:19,264 --> 00:01:25,569
etc., all the way up to the memory limit,
plus some other constant.
24
00:01:25,569 --> 00:01:28,658
So this is a very general,
sort of linear, combination
25
00:01:28,658 --> 00:01:31,765
of previous weeks, times a hundred.
26
00:01:31,765 --> 00:01:37,534
And these weights, w sub i, are
in the interval minus one to one.
27
00:01:39,114 --> 00:01:44,197
Each person has N such strategies,
28
00:01:44,197 --> 00:01:47,747
and what makes the strategies different
from one another are the weights,
29
00:01:47,747 --> 00:01:49,562
and some of these weights can be zero,
30
00:01:49,562 --> 00:01:54,324
which means we ignore
the data from that particular week,
31
00:01:54,324 --> 00:01:59,685
and the strategies are different
from person to person.
32
00:01:59,685 --> 00:02:03,673
Now one of these strategies is determined
to be the current best one.
33
00:02:03,673 --> 00:02:06,347
We'll denote that by S star,
34
00:02:06,347 --> 00:02:09,758
and the decision that each person makes
35
00:02:09,758 --> 00:02:11,296
is as follows:
36
00:02:11,296 --> 00:02:18,429
If S star of t, that is the best
strategy that we've determined,
37
00:02:18,429 --> 00:02:20,925
I haven't told you yet how that's
been determined,
38
00:02:20,925 --> 00:02:22,666
but I'll tell you in a minute,
39
00:02:22,666 --> 00:02:26,045
so if S of t is greater than the
overcrowding threshold,
40
00:02:26,045 --> 00:02:29,903
which is some value like 60,
41
00:02:29,903 --> 00:02:33,323
then don't go, otherwise go.
42
00:02:33,323 --> 00:02:36,847
This S star of t is different
for each person,
43
00:02:36,847 --> 00:02:39,304
but everybody uses this rule,
44
00:02:39,304 --> 00:02:40,972
with their own S star of t
45
00:02:40,972 --> 00:02:43,786
to decide whether or not to go.
46
00:02:46,536 --> 00:02:47,961
OK
47
00:02:47,961 --> 00:02:49,334
Moving on,
48
00:02:50,634 --> 00:02:52,089
To start off with,
49
00:02:52,089 --> 00:02:54,466
everybody's N strategies
50
00:02:54,466 --> 00:02:57,133
are initialized with random weights.
51
00:02:59,743 --> 00:03:01,862
Everybody is given an initial history
52
00:03:01,862 --> 00:03:05,023
so that they can actually
start making decisions.
53
00:03:05,023 --> 00:03:07,233
The previous M time steps
54
00:03:07,233 --> 00:03:09,198
is initialized at random,
55
00:03:09,198 --> 00:03:11,260
with some value between 0 and 99.
56
00:03:11,260 --> 00:03:13,223
So you can make some predictions
57
00:03:13,223 --> 00:03:16,143
on the first M time steps.
58
00:03:16,143 --> 00:03:19,938
And, here's how the best current
strategy is determined.
59
00:03:19,938 --> 00:03:21,496
So at each time step,
60
00:03:21,496 --> 00:03:24,495
after each person makes a decision,
61
00:03:24,495 --> 00:03:30,086
they then learn the current
attendance at that time step,
62
00:03:30,086 --> 00:03:34,753
then they determine which strategy
would have been the best predictor.
63
00:03:34,753 --> 00:03:39,041
This strategy will be used by
that person on the next round.
64
00:03:39,041 --> 00:03:42,853
OK so how they do that
is as follows:
65
00:03:42,853 --> 00:03:44,780
Each person's going to determine,
66
00:03:44,780 --> 00:03:49,639
for each time step between now
and M previous time steps,
67
00:03:49,639 --> 00:03:54,760
what current strategy would
have had the least error.
68
00:03:54,760 --> 00:03:56,764
The error is the difference
69
00:03:56,764 --> 00:03:58,248
at each time step,
70
00:03:58,248 --> 00:04:01,972
between the prediction made by a strategy,
71
00:04:01,972 --> 00:04:04,658
and the actual attendance.
72
00:04:04,658 --> 00:04:07,563
So this strategy S,
has a difference between
73
00:04:07,563 --> 00:04:11,158
what it predicted this time and
the actual attendance
74
00:04:11,158 --> 00:04:12,786
and what it predicted last week
75
00:04:12,786 --> 00:04:14,201
minus the actual attendance
76
00:04:14,201 --> 00:04:15,181
and so on,
77
00:04:15,181 --> 00:04:17,756
all the way to the memory limit.
78
00:04:17,756 --> 00:04:20,880
The best current strategy is
the strategy S star
79
00:04:20,880 --> 00:04:22,860
that has this lowest error
80
00:04:22,860 --> 00:04:25,073
over all the strategies.
81
00:04:25,073 --> 00:04:27,951
So that's how the best strategy
is determined.
82
00:04:27,951 --> 00:04:30,032
And that's it.
83
00:04:30,052 --> 00:04:33,192
In the next video,
we'll look at a NetLogo implementation
84
00:04:33,192 --> 00:04:34,522
of this model.