Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
0
1
00:00:01,024 --> 00:00:04,096
Next we discuss an important concept of setting seed
1
2
00:00:04,608 --> 00:00:09,728
So when we are running random functions it will be always giving us random values
2
3
00:00:10,240 --> 00:00:13,568
That random value is being generated through a function
3
4
00:00:13,824 --> 00:00:18,944
If you give it an input through a seed it will give a particular value to you
4
5
00:00:19,968 --> 00:00:20,992
So seed
5
6
00:00:21,248 --> 00:00:22,784
Comes to use many times
6
7
00:00:23,040 --> 00:00:29,184
For example if you have set of random values and you want to get the same set of random values again you'll set a
7
8
00:00:29,440 --> 00:00:31,488
seed before getting random values
8
9
00:00:32,000 --> 00:00:35,328
If I am teaching and I am showing you an example
9
10
00:00:35,584 --> 00:00:40,448
And my example has some random values and If I want you to have the same random values
10
11
00:00:40,704 --> 00:00:41,984
I will set the sead
11
12
00:00:42,240 --> 00:00:45,824
And I'll let you know what is the value of that seed so that you can set the same seed
12
13
00:00:46,080 --> 00:00:48,384
We both will get the same random values
13
14
00:00:49,408 --> 00:00:52,480
This is what we will do in the example also we will set seed
14
15
00:00:52,992 --> 00:00:55,296
And both of us will get the same values
15
16
00:00:57,088 --> 00:01:00,928
Seed value can be between -1 to 1
16
17
00:01:01,184 --> 00:01:03,232
And both of them can be included
17
18
00:01:03,488 --> 00:01:06,816
and it can have any decimal value also
18
19
00:01:09,888 --> 00:01:11,168
So, this is how we set a seed
19
20
00:01:11,424 --> 00:01:13,472
We will write select set seed of
20
21
00:01:13,728 --> 00:01:14,752
Point 5
21
22
00:01:15,008 --> 00:01:16,544
Once you have set the seed
22
23
00:01:16,800 --> 00:01:20,640
When you run the random function it will give you a particular value
23
24
00:01:20,896 --> 00:01:21,920
Every time you run
24
25
00:01:22,432 --> 00:01:27,808
The random function after setting seed at .5 it will give you the same random value
25
26
00:01:28,576 --> 00:01:32,416
The second time you run the random function, it will give you new value
26
27
00:01:32,928 --> 00:01:34,208
But this value will
27
28
00:01:34,464 --> 00:01:40,608
Always remain same what this means is, whenever you set the seed to 0.5 the first random
28
29
00:01:40,864 --> 00:01:44,960
Function will give you same value, the second random function will give you a different value
29
30
00:01:45,472 --> 00:01:48,800
than the 1st random function but it will be always same
30
31
00:01:50,592 --> 00:01:54,688
If you do not understand this, let us look at an example you will get what I am trying to say
31
32
00:01:57,248 --> 00:02:02,880
So let us first select setseed to 0.5
32
33
00:02:11,328 --> 00:02:14,144
Setseed has Run successfully
33
34
00:02:14,400 --> 00:02:15,424
Now let us
34
35
00:02:15,680 --> 00:02:20,032
run the random function. select random
35
36
00:02:26,688 --> 00:02:32,320
So this gives a random value of .5500
36
37
00:02:33,344 --> 00:02:37,184
25. Let us write this is as a comment so that we remember it
37
38
00:02:38,464 --> 00:02:43,072
Now run the random function again
38
39
00:02:53,056 --> 00:02:54,592
So it is now given a value of
39
40
00:02:55,104 --> 00:02:57,408
0.29531
40
41
00:03:02,528 --> 00:03:04,064
Now let us set
41
42
00:03:04,320 --> 00:03:05,344
Seed again
42
43
00:03:05,600 --> 00:03:11,232
Write select set seed 0.5
43
44
00:03:11,488 --> 00:03:15,584
Now the seed is again back to .5
44
45
00:03:17,888 --> 00:03:19,680
Now when we run the random function
45
46
00:03:30,944 --> 00:03:31,712
we'll get
46
47
00:03:32,736 --> 00:03:34,016
The same value
47
48
00:03:35,040 --> 00:03:38,368
I hope if you are doing it with me you are getting the same values as I am
48
49
00:03:39,648 --> 00:03:41,184
let us run the random function again
49
50
00:03:49,888 --> 00:03:51,936
This will be same as
50
51
00:03:52,448 --> 00:03:55,008
.295311
51
52
00:03:55,776 --> 00:04:00,384
So this is what setting seed helps you do. It helps to get
52
53
00:04:00,640 --> 00:04:03,200
the same set of random values
53
54
00:04:03,712 --> 00:04:04,736
So that you can repeat the calculations
4586
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.