Really enjoying this lecture series so far. As an aside, I wish Python hadn't become the standard workhorse for scientific data analysis. It was quite funny and relatable seeing Steve have trouble with indexing and vector manipulation in Python. These things are comparably so simple in Matlab/Julia.
I am passionnated by your lectures! I could listen to you for hours!!! Thank you soooo so much for those videos! Having a special background it a hard for me to follow by myself only by books but this gives me so much motivation, thank you so so so much !!!
Thank you, very interesting video. I would also like to add on my own about the features of the numpy library. A column vector can also be written as a row vector, and if, when multiplying the first one, you specify a matrix, and the second is our row vector, then the numpy library will automatically convert it into a column vector for calculations. This is done for convenience, since when working with vectors, it is quite difficult to constantly write them down and work with them as a column due to the syntax. But here it is important to be careful, because the vector still remains in the row vector notation format. Example: M = np.array([ [a11, a12, a13], [a21, a22, a23], [a31, a32, a33] ]) b_vec = np.array([b11, b12, b13]) - row-vector But if we: M @ b - so in this case won`t be any mistakes. Numpy will automaticly convert b into column-vec and will make correct calculations. And of course if we will multiply them in this way: b @ M - there won`t be any mistake too, because we multiply Matrix (row-vec)1x3 to Matrix 3x3. And we will have another resault
It's a great experience learning these concepts with a fresh, application-oriented eye. Could you please include the link to the Jupyter Notebook? Great content always, thanks!
The numpy package in Python treats column vectors and row vectors the same. That is why it gave a ValueError. It handles vectors as an order-1 tensor and handles if it's a covariant covector (row vector) or a contravariant (column) vector based on whether its the first or second argument in the dot product / matrix multiplication (@) operation. So in this example, just making the vector a "row" vector would suffice and it would be treated as a column vector when it's on the right side of the @ operator.
I stumbled upon your channel!!!😁😁😁😁😁...you should know I consider myself very lucky! The concepts are very well explained. I have a project am working on, so the information I glean from here is going to help a lot! Thank you very much for sharing!
Great video. A small point on language, traditionally code, referring to computer code, has been treated only as a class of thing, not as an individual item. So in the past we traditionally said "I have 3 pieces of code" not "I have 3 codes". This is kind of important for people who are learning coding as they often think that software code is a literal code like a cypher for passing secret messages. And then they can picture 3 codes as 3 modified versions of one thing, different cyphers. Clearly they can get past this quickly, but working in a software company and interacting with non-technical people this can present significant challenges in communication. I'm guessing that amongst the younger generation this horse has bolted and there is no going back. Especially with the world getting smaller and people with English as a second language tending to struggle with this concept (my co-worker is always referring to multiple "stuffs" when stuff should never be pluralised) it seems that the English language is rapidly changing to discard nouns that are only ever classes of things. So it seems to be very accepted these days to say "these Python CODES that I'm running" versus "this Python CODE that I'm running", or "I did so many STUFFS on the weekend" versus "I did so much STUFF on the weekend". So be it, but I for one am lamenting this change... One last point, although the video is only an introduction it seems unfortunate to model something that converges like that rather than a more interesting example that is more chaotic. It's fine though to have such a cheesy toy model. Great video over all. Thank you
I maintain weather stations and have a station near tofino bc not far from seattle and it has received over 10m rain annually. We were there once and the 0.2mm bucket tips were audible at 2/s
Steve, question about the eigenvectors . To demonstrate that the probability obtained by the simulation. It was the same as the one from the eigenvector -you choose the first column to normalize it. Why the other columns don't have that information? How did you know which column to pick? 🤔💭
Great video! I have some questions about the transition matrix A. Why are the probabilities in matrix A organized in that particular manner (the columns are conditions today and rows are conditions tomorrow). But what is stopping someone from reversing that order, where the columns are instead conditions tomorrow and the rows are conditions today?
You can't do that vector x is a column vector with each row representing the probability of the weather. You also want to make sure that the resulting vector, after multiplying it by the A matrix is a column vector of the same form as the first vector representation. My point is, you're looking for x tomorrow and for that, tomorrow can't be at the top. It has to be by the side
@@dancollins1012 Thanks for the suggestion, I have tried Octave. The problem that I keep running into is that it is just a tiny bit different than Matlab, which results in a lot of debugging. The main advantage to Octave and Matlab have over python is that they tend to be more succinct. Python is more useful (mostly because of the large quantity of libraries) as general programming language .
@@An_Attempt Yes, I know what you mean, Octave does have slight differences. I'm hoping that the examples in this great video series are not so lengthy or complex that it's a problem. I also perceive (may be wrong) that Octave incompatibilities with Matlab are reducing over time. Personally, I can't stand Python, so I'll just make Octave work for me. I guess you, I and others could post debugged Octave code on GitHub and share the fun that way
do you think is the A matrix correct , as i see you gave rain 0.5 and rest 0.25 , similarly for earch combination it will be 0.5 and 0.25 respectively , please clarify on this
I wonder how could the "nice" probability converge to 0.2 if at any timestep is has 0 probability to stay "nice". I mean, if we think about these states as 3 bins for particles, then the 0 probability to get "nice" tomorrow is translated to a statistically constant migration of particles from the "nice" bin to the other two, so that in time I would expect to be left with no particles in the "nice" bin. Am I missing something?
The part that is missing is that there are still "particles migrating" from rainy/cloud into nice. The weather never stays nice for more than a day, but it can still become nice after a rainy or cloudy day (albeit with a smaller probability).
For the multiplication Ax yo represent the total probability shouldn't you be working with A transpose (each entry i,j being the probability of going from i to j)?
@@afammadudaniel2982 You can use graph as the mathematical tool to represent lots of problems, e.g. connectivity of points in a physical grid (streets, gas or electricity networks, water pipes), logical relationships between elements, transition in time between states of the system (here) for Markov processes (or chains). Markov Process (or Markov chains) are also the basis of Reinforcement Learning. You can model a stochastic process as: - Markov Process, MP: states, and transitions (probability of) between states; - Markov Reward Process, MRP: states, transitions and rewards associated with transitions; - Markov Decision Process, MDP: states, transitions, set of actions that can be made, rewards. Main goal of Reinforcement Learning is to find the best actions to perform to optimize a total reward
Thank you for this wonderful lecture Prof. Brunton. Big fan of your teaching skills. I just have a small doubt about the probability matrix. To map x2 from x1, we have a probability matrix A such that x2=Ax1. And then mapping from x2 to x3, we have another probability matrix "A", such that x3=Ax2. you have considered the same A matrix for all three days. In reality, will not there be two different A matrices for three different x (x1, x2, x3)? Why we are taking them same matrix for all the remianing days as well? Or this matrix A is universal for all the x?
For Blaise Pascal, there are two kind of intelligence. People who need to see to understand and people who need to use concepts to understand. First use inductive methods and like artificial intelligence, the others use deductive methods, like to start from principles, like beautiful theories and human intelligence. I wonder if Pr Brunton is from the first or the second kind ...
An ideally intelligent person uses both “modes” of thought. In fact, I don’t think any person leans that heavily into either mode. For the most part, we all rely on both of these epistemic approaches.
As a university professor, Ii would say Steve's lectures are amazing. there are a lot to learn, not only knowledge but also how to teach
Thank you for your kind words! I'm glad you find them helpful :)
Its clear Steve loves his work, I am a big fan of these lectures.
I find my self very fortunate to find Teacher like you.
I am truly happy when I found out this channel and your educational playlist. Thanks a lot.
Best lecture ever! Thank you, Prof. Brunton. If I had learned like this in university, my life would have been different....
One of the best lectures since Feynman
Fantastic. Dear professor - you are a gift to the humanity!
I'm loving this
Thank you, you are an amazing person to take the time to share your knowledge.
This The BEST video I've seen that shows the process (however simple) of creating a model and then using math/computer to model. A++ to you Steve!!!
Thank you for bringing complex ideas into simple, easy to digest ideas with your lectures
Really enjoying this lecture series so far. As an aside, I wish Python hadn't become the standard workhorse for scientific data analysis. It was quite funny and relatable seeing Steve have trouble with indexing and vector manipulation in Python. These things are comparably so simple in Matlab/Julia.
Well done. I'm a professional programmer (whatever that means) and you put joy and mathematics into my heart
I wish you were my professor back in time!
Looking forward to meet you someday and thank you for all you've done to your students.
Steve, your lectures are simply amazing!
This is peice of Art, I can understand how much work goes behind these lectures, may God give you more power.
I am passionnated by your lectures! I could listen to you for hours!!! Thank you soooo so much for those videos! Having a special background it a hard for me to follow by myself only by books but this gives me so much motivation, thank you so so so much !!!
Thank you, very interesting video.
I would also like to add on my own about the features of the numpy library. A column vector can also be written as a row vector, and if, when multiplying the first one, you specify a matrix, and the second is our row vector, then the numpy library will automatically convert it into a column vector for calculations. This is done for convenience, since when working with vectors, it is quite difficult to constantly write them down and work with them as a column due to the syntax. But here it is important to be careful, because the vector still remains in the row vector notation format.
Example:
M = np.array([ [a11, a12, a13], [a21, a22, a23], [a31, a32, a33] ])
b_vec = np.array([b11, b12, b13]) - row-vector
But if we:
M @ b - so in this case won`t be any mistakes. Numpy will automaticly convert b into column-vec and will make correct calculations.
And of course if we will multiply them in this way:
b @ M - there won`t be any mistake too, because we multiply Matrix (row-vec)1x3 to Matrix 3x3. And we will have another resault
Has anyone ever told you that you are a legend?! I am a huge fan!
It's a great experience learning these concepts with a fresh, application-oriented eye.
Could you please include the link to the Jupyter Notebook?
Great content always, thanks!
The numpy package in Python treats column vectors and row vectors the same. That is why it gave a ValueError. It handles vectors as an order-1 tensor and handles if it's a covariant covector (row vector) or a contravariant (column) vector based on whether its the first or second argument in the dot product / matrix multiplication (@) operation. So in this example, just making the vector a "row" vector would suffice and it would be treated as a column vector when it's on the right side of the @ operator.
thank you very much! you make maths so interesting and attractive!
Thank you, sir... for this excellent concept.🙏🙏
I stumbled upon your channel!!!😁😁😁😁😁...you should know I consider myself very lucky! The concepts are very well explained. I have a project am working on, so the information I glean from here is going to help a lot! Thank you very much for sharing!
Thank you for your lecture
Much better way to explain. Have to say. Thanks man
Geometry world: S=a+b; Sum is equal to a plus b ;;; Computing world: a
Great JOB, Professor ❤
sir steve brunton excellent lecture
Awesome as always, Steve!
FANTASTIC
Outstanding content, gonna try experimenting with the concepts on my own, thanks.
Love it! this is a bit easier to see it:
for k, ii in enumerate(range(50)):
xtomorrow = A@x_today
print(f"{k}:
{xtomorrow}
")
x_today = xtomorrow
Great video. A small point on language, traditionally code, referring to computer code, has been treated only as a class of thing, not as an individual item. So in the past we traditionally said "I have 3 pieces of code" not "I have 3 codes". This is kind of important for people who are learning coding as they often think that software code is a literal code like a cypher for passing secret messages. And then they can picture 3 codes as 3 modified versions of one thing, different cyphers. Clearly they can get past this quickly, but working in a software company and interacting with non-technical people this can present significant challenges in communication.
I'm guessing that amongst the younger generation this horse has bolted and there is no going back. Especially with the world getting smaller and people with English as a second language tending to struggle with this concept (my co-worker is always referring to multiple "stuffs" when stuff should never be pluralised) it seems that the English language is rapidly changing to discard nouns that are only ever classes of things. So it seems to be very accepted these days to say "these Python CODES that I'm running" versus "this Python CODE that I'm running", or "I did so many STUFFS on the weekend" versus "I did so much STUFF on the weekend". So be it, but I for one am lamenting this change...
One last point, although the video is only an introduction it seems unfortunate to model something that converges like that rather than a more interesting example that is more chaotic. It's fine though to have such a cheesy toy model.
Great video over all. Thank you
Not sure if this is helpful, but the term for this is "uncountable." Code and stuff are both uncountable nouns.
@@freeenergymachineforsale9751 nice, thanks
It just occurred to me that Dr. Brunton is probably flipping these videos, and is in fact not an expert in writing backwards.
I maintain weather stations and have a station near tofino bc not far from seattle and it has received over 10m rain annually. We were there once and the 0.2mm bucket tips were audible at 2/s
thank you professor
Thank you Prof. Brunton!
Steve, question about the eigenvectors . To demonstrate that the probability obtained by the simulation. It was the same as the one from the eigenvector -you choose the first column to normalize it. Why the other columns don't have that information? How did you know which column to pick? 🤔💭
Thank you
If you're used to indexing from 1, try Julia programming language. It too starts its index at 1.
Just a great work. Thanks
Thank you for this very interesting video!
Great video! I have some questions about the transition matrix A. Why are the probabilities in matrix A organized in that particular manner (the columns are conditions today and rows are conditions tomorrow). But what is stopping someone from reversing that order, where the columns are instead conditions tomorrow and the rows are conditions today?
You can't do that vector x is a column vector with each row representing the probability of the weather. You also want to make sure that the resulting vector, after multiplying it by the A matrix is a column vector of the same form as the first vector representation.
My point is, you're looking for x tomorrow and for that, tomorrow can't be at the top. It has to be by the side
how would the eigenvalues & eigenvectors relate to this system and the stable values as k increases?
In Seattle, we can have 3 model states: rainy, showery, and drizzly.
fabulous and brilliant 😍😍😍😍 ...
Despite the fact that all is clear, I'm lost when you define ax1, ax2 etc and then you said a2x1 is the third element?
Thank you!
What book would give me an in-depth intuition into using vectors and matrices to model real world problems? Any recommendations?
Thanks very much for the python. Free software is fantastic.
Octave is an free open source version of Matlab, so you don't need to use Python
@@dancollins1012 Thanks for the suggestion, I have tried Octave. The problem that I keep running into is that it is just a tiny bit different than Matlab, which results in a lot of debugging. The main advantage to Octave and Matlab have over python is that they tend to be more succinct. Python is more useful (mostly because of the large quantity of libraries) as general programming language .
@@An_Attempt Yes, I know what you mean, Octave does have slight differences. I'm hoping that the examples in this great video series are not so lengthy or complex that it's a problem. I also perceive (may be wrong) that Octave incompatibilities with Matlab are reducing over time. Personally, I can't stand Python, so I'll just make Octave work for me. I guess you, I and others could post debugged Octave code on GitHub and share the fun that way
I love it.
do you think is the A matrix correct , as i see you gave rain 0.5 and rest 0.25 , similarly for earch combination it will be 0.5 and 0.25 respectively , please clarify on this
So do you write backwards, or do you just flip the video?
I have a question, is it to possible to find out what the A matrix knowing what this (50, 3) array that holds the different states ? Thanks
how do you write backwards?
No mention of Markov chains?
Great video ! Please keep going
Do you have any info on how thise video is made?
I wonder how could the "nice" probability converge to 0.2 if at any timestep is has 0 probability to stay "nice".
I mean, if we think about these states as 3 bins for particles, then the 0 probability to get "nice" tomorrow is translated to a statistically constant migration of particles from the "nice" bin to the other two, so that in time I would expect to be left with no particles in the "nice" bin. Am I missing something?
The part that is missing is that there are still "particles migrating" from rainy/cloud into nice. The weather never stays nice for more than a day, but it can still become nice after a rainy or cloudy day (albeit with a smaller probability).
For the multiplication Ax yo represent the total probability shouldn't you be working with A transpose (each entry i,j being the probability of going from i to j)?
Could you kindly rephrase your question. What seems ambiguous is your reference to the transpose. Hope that helps
It is called Markov chains.
Beautiful stuff.
Is it different from graph?
@@afammadudaniel2982 You can use graph as the mathematical tool to represent lots of problems, e.g. connectivity of points in a physical grid (streets, gas or electricity networks, water pipes), logical relationships between elements, transition in time between states of the system (here) for Markov processes (or chains). Markov Process (or Markov chains) are also the basis of Reinforcement Learning. You can model a stochastic process as:
- Markov Process, MP: states, and transitions (probability of) between states;
- Markov Reward Process, MRP: states, transitions and rewards associated with transitions;
- Markov Decision Process, MDP: states, transitions, set of actions that can be made, rewards.
Main goal of Reinforcement Learning is to find the best actions to perform to optimize a total reward
How can he write backwards
Is the recording speeded up?
Markov chain or Markov process
For R users:
myprobs
Also great Gorillaz reference
Wil modelling like this disappear with more 'black box' machine learning/AI approaches?
Highly unlikely.
Thank you for this wonderful lecture Prof. Brunton. Big fan of your teaching skills. I just have a small doubt about the probability matrix. To map x2 from x1, we have a probability matrix A such that x2=Ax1. And then mapping from x2 to x3, we have another probability matrix "A", such that x3=Ax2. you have considered the same A matrix for all three days. In reality, will not there be two different A matrices for three different x (x1, x2, x3)? Why we are taking them same matrix for all the remianing days as well? Or this matrix A is universal for all the x?
Albeit I'm not the prof, I know the answer to your Q. Yes, your understanding is correct, i.e. the probability matrix is updated after each iteration.
@@karatsurba4791 No, the probability matrix A doesn't change, it is the probability vector x that updates every iteration.
For Blaise Pascal, there are two kind of intelligence. People who need to see to understand and people who need to use concepts to understand. First use inductive methods and like artificial intelligence, the others use deductive methods, like to start from principles, like beautiful theories and human intelligence.
I wonder if Pr Brunton is from the first or the second kind ...
An ideally intelligent person uses both “modes” of thought. In fact, I don’t think any person leans that heavily into either mode. For the most part, we all rely on both of these epistemic approaches.
Oh, I'm a graduate student at UNT! Small world
I don’t see the links to the code
click on course website, the code is under Syllabus, part 1, Lecture 1
@@fabricetshinangi5042 Thanks. That is only the Matlab code, not the Python code he refers to in the video.
@@TheEicio It needs to be updated. I think this is a remake of an old class, and he is adding python gradually.
@@TheEicio seems like the python code is up now!
5:39 Matrices were invented to represent non-commutative system, i.e. values in each row aren't supposed to be summarized.
So, is Cloudy a linear combination of Rainy and Nice? -sincerely, a smart ass
Seattle Convergence....
Can someone please edit the squeaks out. I was really hoping to watch the videos. But the squeaks are jarring.
🙀
Thank you