Gaussian Mixture Models - The Math of Intelligence (Week 7)

  Рет қаралды 138,211

Siraj Raval

Siraj Raval

Күн бұрын

We're going to predict customer churn using a clustering technique called the Gaussian Mixture Model! This is a probability distribution that consists of multiple Gaussian distributions, very cool. I also have something important but unrelated to say in the beginning of the video.
Code for this video:
github.com/llSourcell/Gaussia...
Please Subscribe! And like. And comment. That's what keeps me going.
More learning resources:
yulearning.blogspot.nl/2014/11...
web.iitd.ac.in/~sumeet/GMM_sai...
brilliant.org/wiki/gaussian-m...
www.vlfeat.org/overview/gmm.html
www.informatica.uniroma2.it/up...
cs.nyu.edu/~dsontag/courses/ml...
statweb.stanford.edu/~tibs/sta...
Join us in the Wizards Slack channel:
wizards.herokuapp.com/
And please support me on Patreon: www.patreon.com/user?u=3191693
Follow me:
Twitter: / sirajraval
Facebook: / sirajology Instagram: / sirajraval Instagram: / sirajraval
Signup for my newsletter for exciting updates in the field of AI:
goo.gl/FZzJ5w
Hit the Join button above to sign up to become a member of my channel for access to exclusive content! Join my AI community: chatgptschool.io/ Sign up for my AI Sports betting Bot, WagerGPT! (500 spots available):
www.wagergpt.co

Пікірлер: 242
@tomhas4442
@tomhas4442 3 жыл бұрын
3:44 Intro, Gaussian Distribution, Probability Density Function (PDF) 7:38 GMM Intro 9:08 Covariance matrix 10:15 GMM Definition, K Gaussians 11:30 How to apply GMM for classification 12:30 Problem statement, Fitting a GMM model, Maximum Likelihood Estimate (MLE) 13:58 Similarity to Kmeans clustering algorithm 16:13 Expectation maximization (EM) algorithm and difference to Gradient Descent 18:15 When to apply GMM, anomaly detection, clustering, object tracking 19:30 Coding example with Python 25:10 EM algorithm workflow in practice, Log Likelihood 27:54 EM algorithm visual / walkthrough 36:30 Summary great video, many Thanks :)
@jericklee8071
@jericklee8071 5 жыл бұрын
From a muddy blur to crystal clear in 30 min, thank you very much for this video Siraj
@CrazySkillz15
@CrazySkillz15 5 жыл бұрын
Thank you! Your videos helped me a lot... I was so lost and confused about this topic that I was on the verge of giving up. Checked out your tutorials that gave a lot of useful information and insights. Thanks a tonne! :) :D Keep up the good stuff
@alinazari6563
@alinazari6563 4 жыл бұрын
I love how passionate you are about this
@getinenglish3472
@getinenglish3472 3 жыл бұрын
Wow! Finally I got my head around this subject. Well done and amazing teaching skills 👏🏻 Andre
@tarekamineafir714
@tarekamineafir714 6 жыл бұрын
Really thanks man, your video helped me a lot in my Hyperspectral Images classification project's
@RoxanaNoe
@RoxanaNoe 5 жыл бұрын
I watch 4-5 vídeos of you per day. I'm Learning generative models for drug Design Siraj. Watch your videos not only motivates me, also makes my life & study fun and cool.
@antonylawler3423
@antonylawler3423 6 жыл бұрын
Siraj. The depth and range of your knowledge still continues to amaze me.
@SirajRaval
@SirajRaval 6 жыл бұрын
thanks Antony!
@hammadshaikhha
@hammadshaikhha 6 жыл бұрын
Siraj, I think it would of been helpful if you showed the resulting clusters that you get from the gaussian mixture model approach in your data. You showed how to model your data using the gaussian mixture, but I am unclear on how we get the specific clusters (say 2 clusters) from that?
@GugaOliveira70
@GugaOliveira70 6 жыл бұрын
Thank you very much! Your explication is very good and educative! I'm recommending your channel to my friends too.
@jayce8978
@jayce8978 6 жыл бұрын
In case you have bad results using Gaussian mixtures, keep in mind the EM optimization only has local convergence properties, just like gradient descent: it can get stuck. Restarting the the density estimation with other initial parameters might solve it ! :)
@SirajRaval
@SirajRaval 6 жыл бұрын
thanks Jason!
@TechResearch05
@TechResearch05 6 жыл бұрын
Clearly explained the concept!!! Great presentation
@vivilee7290
@vivilee7290 6 жыл бұрын
Love this video. It presents so clear.
@mayurkulkarni755
@mayurkulkarni755 6 жыл бұрын
Super tutorial! Thank you so much!
@DosellIo1
@DosellIo1 6 жыл бұрын
Great series!!!! even helps me in my AI learning curve at Udacity. Thanks for it. rgds tibor
@011azr
@011azr 6 жыл бұрын
Those are really strong motivating words in the beginning :). Thanks.
@I77AGIC
@I77AGIC 6 жыл бұрын
you are getting better and better at explaining these things Siraj! keep up the great work you are helping a lot of people
@vg6004
@vg6004 6 жыл бұрын
This is very helpful for my machine learning exam! Stay awesome, Siraj!
@adarshsrivastava1074
@adarshsrivastava1074 5 жыл бұрын
Great Video! Really helpful for Data scence students..
@idiocracy10
@idiocracy10 6 жыл бұрын
warning: when he finger styles his hair, get ready for hardcore info dump. PS: 3blue1brown series on linear algebra has THE BEST vid on eigen vectors/value pairs, no joking.
@KarfontaAlec
@KarfontaAlec 6 жыл бұрын
Love the motivation at the start, preach!
@ethereumnews3873
@ethereumnews3873 6 жыл бұрын
you are the best source of ML... thanks for your attention(s) and love to AI!!!!!
@boscojay1381
@boscojay1381 4 жыл бұрын
Hi Siraj, I appreciate your videos and I love your content. I' am working on a project on cross-matching using active learning, what advice would you have for me? I' am trying to build something scalable but not so computationally intense.
@TheStartupKid
@TheStartupKid 6 жыл бұрын
i just loved the energy :D
@asif7601
@asif7601 3 жыл бұрын
Very energetic presentation. Kept me attentive throughout the video. Hit the sub 2 minutes in it.
@ngplradhika
@ngplradhika 6 жыл бұрын
Your accent reminds me of Mitchell from Modern Family(fav character) :') Also great video thanks!!
@susmapant605
@susmapant605 6 жыл бұрын
Great presentation about GMM !! Thanks
@bosepukur
@bosepukur 6 жыл бұрын
thank you siraj for such amazing videos....u really are the best
@ego_sum_liberi
@ego_sum_liberi 6 жыл бұрын
Thank you for this great lecture and video...
@kakolelouch5261
@kakolelouch5261 6 жыл бұрын
Hi Siraj, wonderful video! I am wandering what is the difference between Gaussian mixture model and least square method in the data fitting' view?
@user-ry4yi5hb2o
@user-ry4yi5hb2o 6 жыл бұрын
Thank you very much for the great video!! Siraj is god of explanation
@simonmandlik910
@simonmandlik910 6 жыл бұрын
Where do I get the dataset? It is not mentioned anywhere and is not in Github repository either
@imtryinghere1
@imtryinghere1 5 жыл бұрын
Dataset can be found at: raw.githubusercontent.com/brianspiering/gaussian_mixture_models/master/bimodal_example.csv
@BiranchiNarayanNayak
@BiranchiNarayanNayak 6 жыл бұрын
Very well explained..... I was lost while our college professor was explaining GMM and EM...
@kshiteejsheth9416
@kshiteejsheth9416 6 жыл бұрын
hey siraj ! EM is a heuristic with no guarantees for global convergence. there have been recent algorithms based on method of moments, random projections etc. which provably recover the gmm under some assumptions
@valentinocostabile9314
@valentinocostabile9314 6 жыл бұрын
Great! u solved smartly my doubts... thanks man =)
@siddharthshah7767
@siddharthshah7767 6 жыл бұрын
Bruh you’re helping me pass my class. Thanks
@vinay1744
@vinay1744 6 жыл бұрын
Siraj this is Awesome!! Brother... Man you gave awesome reference links. Exploring them gave full knowledge on the concept. Rewatching the video after that made Complete sense.. Hope i find a Job at ML and DL and support you on Patreon
@spiderman7616
@spiderman7616 6 жыл бұрын
Hey Siraj! Just found your channel and it doesn't cease to amaze. I am learning a lot about AI and ML with your vibrant and enthusiastic expression. My 2 cents would be to talk a tiny bit slower but it is up to you. Congrats and Keep up the Good Work!
@SirajRaval
@SirajRaval 6 жыл бұрын
thanks Kashyap!
@jinitgandhi1197
@jinitgandhi1197 4 жыл бұрын
suggestion at time 6:45 minutes, the y values aren't the probabilities of the x values, intuitively the probability for a single point on the gaussian will be 0.
@nehadureja
@nehadureja 4 жыл бұрын
Thank you. Very helpful video. :)
@morakan9956
@morakan9956 6 жыл бұрын
Love the lecture style! Wish the topic covers multivariate as well
@slavko321
@slavko321 6 жыл бұрын
The quality of the audience is reflected from the content:) Thank you for sharing and helping understand complex subjects in an approachable way. (and not dumbing it down:)
@rage0397
@rage0397 5 жыл бұрын
Loved the explanation. If I have to model 6 features instead of 2, and use a sliding windows approach on my dataframe (I need to find the anomalous windows), how can I modify the weights and the rest of the code? Just looking for direction.
@gokulprasad888
@gokulprasad888 6 жыл бұрын
Thanks Siraj, good one!!
@TheMrCatDogRabbit
@TheMrCatDogRabbit 6 жыл бұрын
Hey thanks for the video, However i noticed that your solution is rather hardcoded for a mixture of 2 distributions. What if we are dealing with a more complicated data set and we do not know how many distributions will be mixed? Is there any deterministic approach to find out this number?
@shoshkich
@shoshkich 6 жыл бұрын
Hey Siraj, I have vectors with 10 components, thus 10 features. I labeled the vectors by 4 classes. I wanna use GMMs to calculate the probabilities for a new incoming vector belonging to each one of the classes. What do I use? Do I have to create a GMM for every class? If yes, how to model a GMM to a 10 feature vector? Or could or even should I use Multivariate Gaussian Distributions instead?
@brunoribeiro512
@brunoribeiro512 6 жыл бұрын
Great video, I tried running your code on my terminal and it's giving the error that 'GaussianMixture' object has no attribute 'loglike', would you happen to know why an error like would occur, or anyone by that matter. Thank you so much
@chasegraham246
@chasegraham246 6 жыл бұрын
So the probability density function looks more intimidating than it really is. Thanks for explaining it. If you had to choose between a semester of linear algebra or statistics, which would you choose?
@CarlosCosta-gs8rb
@CarlosCosta-gs8rb 6 жыл бұрын
Hi. Great again Siraj. You're the best on that online apparently. Should we have a video about non-parametric estimation or Higher Order statistics, perhaps ICA?
@suryaphaneeth3230
@suryaphaneeth3230 6 жыл бұрын
Hello Siraj, I am working on a project to extract the total bill from restaurant receipts. Is there any way that I could use CNN or any other deep learning techniques to achieve this. I am new to Ml and would greatly appreciate your suggestions.
@MsSmartFox
@MsSmartFox 4 жыл бұрын
@Siraj , why do you change the formula at 29:54? instead of sigma^2 you are using abs(sigma).
@BahriddinAbdiev
@BahriddinAbdiev 5 жыл бұрын
I have some questions: 1. In the end, what we achieved: probability distribution of people whether they keep playing the game? 2. May it cause overfitting if we set too many gaussian distributions? Regards.
@ericsteinberger4101
@ericsteinberger4101 6 жыл бұрын
@Siraj Raval Where can I see when and where the meet ups are?
@alessandrorosati969
@alessandrorosati969 Жыл бұрын
I have the problem with the gaussian mixture models, I don't know how generate outliers uniformly in the p-parallelotope defined by the coordinate-wise maxima and minima of the ‘regular’ observations in R?
@jcxmej
@jcxmej 6 жыл бұрын
Siraj I have a question/problem. I have two data inputs which is to be comparatively trained by a learning model. It's not a multiple set of data but only one. It's a set of pair of inputs. I have been reading pairwise svm. How do I do that? Is there a better model.
@larryteslaspacexboringlawr739
@larryteslaspacexboringlawr739 6 жыл бұрын
thank you for Gaussian Mixture
@mykle2069
@mykle2069 6 жыл бұрын
You're the best! You've helped turn this 19 year old from a lazy kid into an inspired workaholic
@SirajRaval
@SirajRaval 6 жыл бұрын
so amazing! Keep it up
@fayezbayzidify
@fayezbayzidify 6 жыл бұрын
same! although I am 15 though
@mathematicalninja2756
@mathematicalninja2756 6 жыл бұрын
3:45 Siraj, in my information theory class, I was told Gaussian distribution as the distribution which assumes the least about the data (maximized differential entropy for a given variance) so maybe you can include that in your explanation when someone asks why we assume Gaussian distribution apart from the central limit theorem.
@gabrielcustodiodasilva
@gabrielcustodiodasilva 6 жыл бұрын
You is amazing! Siraj!
@sanzeej91
@sanzeej91 6 жыл бұрын
Awesome work Siraj
@bkovnkk6105
@bkovnkk6105 6 жыл бұрын
WE ARE "THE ONE" :) regards come from CN
@tensorhack5271
@tensorhack5271 6 жыл бұрын
Hi, Im following this channel for a while now and love that you create different series. can you make a small series of basic examples next, so it's easier to learn and get started. With one of your first videos I've just created an sklearn programm that had 50 examples of fruit and car names and with KNN I've got pretty good results. but they are not perfect. now I want to use deep learning for that and would love to see a series where you give different simple examples like this to compare and get started using the different libaries and algorithms. And yes you created some beautiful similar content before but it's not exactly that. Best Wishes
@mauropappaterra
@mauropappaterra 5 жыл бұрын
We love you Siraj
@pandawendao
@pandawendao 6 жыл бұрын
the iteration function is empty, which makes the current code completely random, it should be "mix.Mstep(mix.Estep())" inside that function
@Aureole62
@Aureole62 4 жыл бұрын
Like he understands that
@nicholascantrell1179
@nicholascantrell1179 6 жыл бұрын
At 4:35, it appears that the score is nonnegative. Although a Gaussian distribution is a close approximation in this case, could a log-normal distribution also be used in a Gaussian Mixture Model? Are there advantages to selecting a Gaussian distribution instead?
@juandez87
@juandez87 4 жыл бұрын
If we add to the covariance matrix the gradient decent of the covariance matrix will the result stay positive definite?
@rohanghige
@rohanghige 6 жыл бұрын
Such a good video that I clicked like button for 10 times :)
@singlesam41
@singlesam41 5 жыл бұрын
ended up with "no thumbs up" :P
@adarshranjan6656
@adarshranjan6656 2 жыл бұрын
How do I use this for spectra (wavelength, flux, flux_error) instead of a histogram?
@avinashsingh1618
@avinashsingh1618 6 жыл бұрын
Hey I am trying to make a feature subset selection project using GMM clustering. Can you help me out with that?
@zehaozhang798
@zehaozhang798 6 жыл бұрын
Hello can anyone tell me where do I find the dataset i.e. the csv data file used in the code? Thanks.
@eliza337
@eliza337 5 жыл бұрын
I am trying to use your notebook and getting this error -- any ideas?? I am getting an error for #checking the fitting process AttributeError: 'GaussianMixture' object has no attribute 'loglike'
@rebiiahmed7836
@rebiiahmed7836 6 жыл бұрын
Hi Siraj Raval, we love you from Tunisia
@SAI-kg6bb
@SAI-kg6bb 5 жыл бұрын
Good explanation :)
@farzadfayyaz6953
@farzadfayyaz6953 2 жыл бұрын
when I do your codes couldnot find data file error? Why? how can find it?
@rotimibabalola8742
@rotimibabalola8742 6 жыл бұрын
Please where can I get the data you used in the video?
@teamsarmuliadi6960
@teamsarmuliadi6960 5 жыл бұрын
You're the real man! Why didn't you come to Indonesia? We also have ML/DL community here. :) Anyway, thanks for your elaboration of GMM, it is indeed helpful and easy to understand. Cheers!
@fuzzypenguino
@fuzzypenguino 6 жыл бұрын
Siraj's desktop background has the Sierra mountains, but doesn't OS Sierra not work with Tensorflow and OpenAI and other machine learning stuff?
@bitvox
@bitvox 6 жыл бұрын
Hi, your videos are great!. Please cover VGG, Alexnet, and others sometime.
@SirajRaval
@SirajRaval 6 жыл бұрын
thanks Aamir!
@Abhitechno01
@Abhitechno01 6 жыл бұрын
It's always great and informative to watch and learn from your video. But my question is a non technical, but do provide a solution plz... Question : I saw your github profile, and I'm curious what filters you applied on your profile pic(dp) ?? :p ps: I already told you this question is going to be a non-technical one and Yes !!! you have been on my youtube's subscription list from the very beginning. Cheers !!!
@MorisonMs
@MorisonMs 6 жыл бұрын
You can use gradient descent. it's a standard maximization problem (likelihood).. the variable here is denoted by theta, where theta (for gmm) is the mean, variances (co variance matrix) and the probabilities for every gaussian. nothing stochastic when you have the given data points, a no more complex function then loss of a network.
@getinenglish3472
@getinenglish3472 3 жыл бұрын
I keep getting this error : AttributeError Traceback (most recent call last) in 10 try: 11 mix.iterate() ---> 12 if mix.loglike > best_loglike: 13 best_loglike = mix.loglike 14 best_mix = mix AttributeError: 'GaussianMixture' object has no attribute 'loglike' I am not sure what to do in this case. Any ideas? Thank you
@pierre-louistermidor7118
@pierre-louistermidor7118 2 жыл бұрын
good job!
@julioargumedo6722
@julioargumedo6722 6 жыл бұрын
Hey Siraj thank you. If you ever come to México, you'll have a room, a meal, a beer and a friend :)
@chitralalawat8106
@chitralalawat8106 5 жыл бұрын
Here, x1, x2... are the vecors or are the data points of a vector x?
@leodong6060
@leodong6060 6 жыл бұрын
Wondering if you would post the lecture notes/slides somewhere?
@harleymckee
@harleymckee 6 жыл бұрын
siraj, my guy.. this is so 🔥. will you be in Amsterdam sept 4-16 ?
@Selahmescudi
@Selahmescudi 5 жыл бұрын
You are saving me in ML classes dude! Thanks a lot
@kabita2301
@kabita2301 5 жыл бұрын
hello, I know this video is a bit old (in internet years :D) but I wanted to leave my positive feedback. I found your video because I am preparing for an exam and your energy gave me that burst of motivation I needed just now. Also, your method was very didactic, you explained something very complex in an understandable and enjoyable manner. Thank you so much! Congratulations, best wishes to you!
@thepresistence5935
@thepresistence5935 Жыл бұрын
Where I can get the blog he is following?
@AishwaryaRadhakrishnan34
@AishwaryaRadhakrishnan34 4 жыл бұрын
Awesome !!!!!!
@dan92white
@dan92white 5 жыл бұрын
Great presentation and really well explained! Are you using AWS Sagemaker for this?
@hemilysantos600
@hemilysantos600 6 жыл бұрын
Hi, how to change the variance and average Gaussian function in matlab? Can you show an example of what the code looks like?
@flydragoon88
@flydragoon88 6 жыл бұрын
you are awesome!
@mojiheydari
@mojiheydari 4 жыл бұрын
omg. I just discovered your channel..... sOOOOOOOOOOOO gOOOOOOOOOOOd
@McMurchie
@McMurchie 6 жыл бұрын
Siraj never fails to inspire, and I agree with his point strongly - we are the most important community in the world today. We all have a common goal, of making the world better with the best tech we have to offer. I for one am working on a universal translator not just for spoken languages, but for sign, braille and more. ML and NNs has moved my research forward by at least a decade.
@SirajRaval
@SirajRaval 6 жыл бұрын
awesome thanks Adam!
@SubhojeetPramanik406
@SubhojeetPramanik406 6 жыл бұрын
When my friends ask me how to start with machine learning and AI, I tell them Siraj is the way to go! Thanks for making the AI community so cool! Yes we are the COOL GUYS!
@SirajRaval
@SirajRaval 6 жыл бұрын
hell yeah! thanks
@nomercysar
@nomercysar 5 жыл бұрын
Thanks for reading theory to me. Couldn't do that by myself
@Arik1989
@Arik1989 5 жыл бұрын
I know you're being sarcastic, but honestly, I'm looking for people to do just that for me, I HATE reading technical material.
@PabloMartinez-ut8on
@PabloMartinez-ut8on 6 жыл бұрын
You can visit us in Uruguay! Everyone is welcome in Uruguay and especially, people who motivate the world to be better, like you @siraj!
@weibinma1627
@weibinma1627 5 жыл бұрын
Appreciate !
@tensenpark
@tensenpark 6 жыл бұрын
lolll I read about this model and though, Jeez, maybe I should send a message to Siraj to explain this to me. Well, nvm, he already did. Thanks man!
EM Algorithm : Data Science Concepts
24:08
ritvikmath
Рет қаралды 64 М.
K-Means Clustering - The Math of Intelligence (Week 3)
30:56
Siraj Raval
Рет қаралды 174 М.
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 47 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 49 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
Clustering (4): Gaussian Mixture Models and EM
17:11
Alexander Ihler
Рет қаралды 276 М.
Generative Models - The Math of Intelligence #8
9:03
Siraj Raval
Рет қаралды 52 М.
Gaussian Mixture Model | Object Tracking
15:56
First Principles of Computer Vision
Рет қаралды 31 М.
Probability Theory - The Math of Intelligence #6
9:31
Siraj Raval
Рет қаралды 159 М.
Gaussian Mixture Models
17:27
Serrano.Academy
Рет қаралды 67 М.
Hyperparameter Optimization - The Math of Intelligence #7
9:51
Siraj Raval
Рет қаралды 109 М.
52 - What is GMM and how to use it for Image segmentation?
29:28
DigitalSreeni
Рет қаралды 32 М.
Dimensionality Reduction - The Math of Intelligence #5
10:49
Siraj Raval
Рет қаралды 118 М.