Thank you so much. I just wanted to wrap my head around what a decision tree is. It was at the edge of my understanding. You brought everything into focus and made it crystal clear.
@sandielee6 жыл бұрын
for python3 and for the print statement: print (test_target) print(clf.predict(test_data))
@shakirrasheedkhankhattak90525 жыл бұрын
I just started ML and found it very helpful, great start, great examples, well-organized lectures. I am a beginner in ML and loved it, Some times the motivation to TECH might be boosted if you found a great source of learning.
@kaysoar8 жыл бұрын
For the 2 people who are demanding for videos... could you ask in a nicer way? High quality video content requires time, and I doubt making these videos is the only thing he has to do at Google... Cheers.
@deananderson81866 жыл бұрын
bKaysoar B
@amomasi99095 жыл бұрын
Thank you! I find it to be quite ungrateful, actually.
@karinetorres52134 жыл бұрын
Eu
@dolomikal8 жыл бұрын
I love how clear and concise these videos are. I feel like I am learning very efficiently because of the broad perspective and how you're teaching to the problem. I can't wait to get into further detail as well as become familiar with more basic concepts. In my opinion your syntax is fine, anyone can pause the video if they want to google each specific line. For someone with a programming background, low calculus/linear algebra knowledge, and zero ML knowledge, this is the best source on the topic! As others have noted, would LOVE to see the submission pace pickup (only because these are so well done! not complaining here!). Great job!
@pradyumna278 жыл бұрын
usually I play the videos in 1.25X or 1.5X speed, this series is real exception, and made me realize, there is no 0.75x.
@codecruz7 жыл бұрын
There is now lol
@no_more_free_nicks7 жыл бұрын
When you press spacebar then the video will stop, this is what I use to write the actual code :)
@harrygaggles14148 жыл бұрын
As a newbie! I appreciate your work, and the training you provide! Excellent
@youlearnchannel53836 жыл бұрын
Working code in python 3.7 , without the pdf : import numpy as np from sklearn.datasets import load_iris from sklearn import tree iris = load_iris() test_idx = [0,50,100] #training data train_target = np.delete(iris.target, test_idx) train_data = np.delete(iris.data, test_idx, axis=0) #testing data test_target = iris.target[test_idx] test_data = iris.data[test_idx] clf = tree.DecisionTreeClassifier() clf.fit(train_data, train_target) print (test_target) print (clf.predict(test_data)) #viz code # test data print (test_data[1],test_target[1]) print (iris.feature_names,iris.target_names)
@samarpratapsingh97884 жыл бұрын
why is their axis=0?
@samarpratapsingh97884 жыл бұрын
what is the axis?
@maxodo29434 жыл бұрын
@@samarpratapsingh9788 the given array (iris.data) is a 2 dimensional array, thus arrays in an array. Example: [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] if you would imagine this as table, each array would represent a line as Table: Col1 Col2 Col3 Col4 Row1: 1 2 3 4 Row2: 5 6 7 8 Row3: 9 10 11 12 "row" means "axis=0" in this context. By this line "np.delete(arrayVar, 1, axis=0)" he deletes the elment of index 1 in arrayVar arrayVar = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] test = np.delete(arrayVar, 1, axis=0) test: [ [1, 2, 3, 4], [9, 10, 11, 12] ]
@Iwillseeyouagainin25years4 жыл бұрын
Thank you!
@nzube8 жыл бұрын
God... I've been waiting for this all week. I liked it before I clicked. Your courses are just very simple and helpful. more excited about writing machine learning code. please don't make us wait this long again... we are the binge generation... lol... amazing work you are doing keep it up
@MACHINEBUILDER7 жыл бұрын
Thanks so much! - I''ve been trying to install anaconda and other sklearn packages like that, but I was unsuccessful... earlier today, I tried to create my own classifier without using any imported modules, but I was unsuccessful... and, now, after I'd seen this video with VISUALIZING the decision tree, I've just figured out how to make it!! It worked! It can classify : Apples, Oranges, Bananas, Pineapples, and Watermelons just based on weight(g) and texture(bumpy/smooth)! This video was amazingly helpful!!
@riyadhrahman44538 жыл бұрын
Been waiting everyday for the new episode
@JBGordon8 жыл бұрын
+Riyadh Rahman Thanks! I'm doing my best to get these out every two weeks.
@anthonydalessandro83738 жыл бұрын
+Josh Gordon every two weeks?! this is blasphemy
@JerryAsher8 жыл бұрын
+Josh Gordon Are there playlists for the individual series, as in a playlist of the ML videos?
@GoogleDevelopers8 жыл бұрын
+Jerry Asher there sure is! It's pretty small still, but stay tuned for another episode in two weeks!
@GoogleDevelopers8 жыл бұрын
+Jerry Asher Save this one! kzbin.info/www/bejne/qn_EamyGfJ2biJo
@coolkidmcoy8 жыл бұрын
This series is so good, thank you , thank you , thank you!
@trisnayanayoenara8864 жыл бұрын
P8 O
@oOZanlanOo3 жыл бұрын
yes
@orcaorka8 жыл бұрын
I've studied AI and programmed very similar stuff (ID3 algorithm and neural nets) from scratch in C, and it took me hundreds of lines! Holy sh** I didn't know it could be this easy.
@FsimulatorX8 жыл бұрын
seriously? in C? Dude I just switched from C to Python because I thought stuff like that would be impossible and if not, VERY complicated.
@orcaorka8 жыл бұрын
FsimulatorX it was a course requirement. :) the algorithms are actually pretty simple and easy to understand. but i have to agree, programming it in C is tedious! I remember debugging my code for 6 hours because it kept crashing. turns out i missed a single asterisk and the memory was leaking. :)
@tarek37355 жыл бұрын
if you have worked in depth with c it would be much easier to implement.
@chillenld8 жыл бұрын
Excellent series! I just turned in my term project for my senior undergrad AI course and I'm looking to continue the work in my spare time without the restrictions of the course and having a more application driven series is extremely valuable. I'm really excited to see the amount of resources available for machine learning, as it's a surprisingly friendly field to get started in and I can't wait to see what problems people can solve just by learning a little python and some basic theory. My pet project right now is AI driven stylistic revision for technical writing.
@Abdullah-mg5zl6 жыл бұрын
*quick summary of video:* ====================== - there are *several types of classifiers* , each with their own *pros/cons* - one of the pros of a decision tree classifier is that it is *human readable* ("interpret-able") - let's talk a little bit about terminology used to describe the data that you use to train your classifier - let's assume you want to train your classifier to be able to predict the sex of people based on their height, weight, and bone density - you have a bunch of example data, each example consists of a height, weight, bone density, and the corresponding sex (male or female) - we call the height, weight, and bone density *features* - we call the male/female the *class* or *label* - there are a bunch of free data sets out there that you can use to practice machine learning - a popular one is called the iris data set - the iris data set has a bunch of different flower types, along with their petal width, sepal width, etc - again, the petal width, sepal width, etc would be called *features* while the actual flower type would be called the *label* - scikit-learn has a lot of these common data sets built in - for example, you can use the iris data set by doing *data_set = load_iris()* - data_set.data[0] is a list of the features of the 0-eth example in the data set - data_set.data[1] is a list of the features of the 1-eth example - data_set.target[0] is the label for the 0-eth example - and so on...I think you get it - usually, you splits your data set into two subsets - you use one of the subsets to train your classifier - you use the other subset to test how well your trained classifier predicts - a decent rule of thumb is 2/3 to train and 1/3 to test *key thing to take away from the video:* ================================ Lots of different types of classifiers out there, decision tree is just one of them. One of the pros of a decision tree is that it is human readable. There are a bunch of free data sets that are easily importable in scikit-learn, use them to practice machine learning. Use about 2/3 of your data to train, and the other 1/3 to test. Hope that was helpful!! P.S. thanks so much for these videos, they are so well made!
@DarrelFrancis5 жыл бұрын
Very well thought out and easy-to-follow introduction. One suggestion: for people who are not aware of the "print ()" requirement of Python 3, it would be worth pointing it out for viewers in one of the earlier videos. Luckily I was aware, but with this small addition, the whole of the tutorial is easy to follow for someone with experience of any other programming language.
@matheusferesdeoliveira59826 жыл бұрын
Hey guys, for those who are using Python 3, the code showed on the video might not work. I made some alterations at the end of the code to generate the graph and it worked. # Import from sklearn.datasets import load_iris import numpy as np from sklearn import tree iris = load_iris() # Showing the data (this part I changed too) print(iris.data[0]) print(iris.target[0]) for i in range(len(iris.target)): print('Example {},\t label {},\t features {}'.format(i , iris.target[i] , iris.data[i])) # Training data test_idx = [0,50,100] train_target = np.delete(iris.target, test_idx) train_data = np.delete(iris.data, test_idx, axis=0) # Testing data test_target = iris.target[test_idx] test_data = iris.data[test_idx] clf = tree.DecisionTreeClassifier() clf.fit(train_data, train_target) print(test_target) print(clf.predict(test_data)) # Exporting the decision tree from sklearn.externals.six import StringIO import pydot dot_data = StringIO() tree.export_graphviz(clf, out_file=dot_data, feature_names=iris.feature_names, class_names=iris.target_names, filled=True, rounded=True, impurity=False) # I used this module (graphviz) to generate the graph import graphviz as gp graph = gp.Source(dot_data.getvalue()) graph.render("iris", view = True)
@yashsingh78103 жыл бұрын
sadly the last part doesn't work anymore.
@bostongeorge08 жыл бұрын
+ josh gordon: Great video to learn about the basics. Two questions: In the decision tree - why do you ask for petal width twice? Should not you ask about third feature instead? The problem arises once the features arent unique to species. ie. the range of values for one feature is farly similar for two and more species. This is where probabilities and combination of features must be used, I assume. Is decision tree the appropriate type of classifier?
@luisleal41698 жыл бұрын
At any given node, the three must "ask a question" about only one feature? For example arent there any complex cases where the node asks: feature1 < 5 and feature6= 2 ?
@OttoFazzl8 жыл бұрын
The way material is presented is very nice and Josh Gordon is very good at explaining. Content itself is very introductory though. Can't wait to get to more advanced topics like deep learning with TensorFlow!
@datascienceandmachinelearn38076 жыл бұрын
Hi everyone, The code for Python 3 is already below. Best wishes. import numpy as np from sklearn.datasets import load_iris from sklearn import tree iris = load_iris() test_idx = [0,50,100] # training data train_target = np.delete(iris.target, test_idx) train_data = np.delete(iris.data, test_idx, axis=0) # testing data test_target = iris.target[test_idx] test_data = iris.data[test_idx] clf = tree.DecisionTreeClassifier() clf = clf.fit(train_data, train_target) print(test_target) print(clf.predict(test_data)) from sklearn.externals.six import StringIO import pydotplus dot_data = StringIO() tree.export_graphviz(clf, out_file = dot_data, feature_names = iris.feature_names, class_names = iris.target_names, filled = True, rounded = True, impurity = False) graph = pydotplus.graph_from_dot_data(dot_data.getvalue()) graph.write_pdf("iris.pdf")
@souranumaji42137 жыл бұрын
Very Straight Forward and much easier to learn and grasp the materials at a time. please conduct a online video series on machine learning for advanced level. very Impressive technique of teaching. thanks a lot for contribution, SIR.
@micky83318 жыл бұрын
the link at the end for visualization : scikit-learn.org/stable/modules/tree.html
@mikemetcalfe19037 жыл бұрын
If the features were "what it does" rather than "what it looks like" then would'nt you have the start of a database of how things might be used to solve problems? So for example, having "what an axe does", aka. what it might be used for (eg cut wood), then if I have what a tree does, aka. what it can be used for, (provide wood) then I can match up suggestions for how to chop down a tree?
@vddngddnd43068 жыл бұрын
What an diction, even when i'm not native it's so easy to listen you.
@dan-mg4tc7 жыл бұрын
Help: I am having an error from "graph.write_pdf("iris.pdf") saying: "AttributeError: 'list' object has no attribute 'write_pdf'"
@tamiltecheria-94716 жыл бұрын
same here also have you fixed it
@Endlessvoidsutidos6 жыл бұрын
use graph[0]
@arduinoexplorer54376 жыл бұрын
Having same problem
@nielagi50296 жыл бұрын
same problem here
@HaiderAli-bv3gl6 жыл бұрын
same problm how u solve it??
@ElVerdaderoAbejorro7 жыл бұрын
I have created a github repo with all of the code for all of the recipes of this series. I've used Python3 for all recipes. I've also updated all of the libraries and have added some things to the code here and there. Check it out: github.com/TheCoinTosser/MachineLearningGoogleSeries
@furrane7 жыл бұрын
You deserve way more likes ! Good commenting of the code =)
@keethyanandpr7 жыл бұрын
Nice video for easy learning. Just wondering if the for loop should actually loop on total data items than target items (somehow I felt it was 4, but then understood there are as many targets in the dataset as the data items itself). Not a big deal since both amount to 150 ;)
@3wayinternet6 жыл бұрын
This code make error "TypeError: 'numpy.ndarray' object is not callable " But it works good when I rewrite "test_idx" to "test_index" Why is it so?
@uladzislautarsunou57008 жыл бұрын
Hi. In this video we learn from the data by doing "clf.fit(train_data, train_target)" whereas in the previous video we re-set the variable clf. The exact line from the previous video is "clf = clf.fit(features, labels)". I'm using the IDE PyCharm and that caused it to make a warning. Was setting clf = clf.fit a mistake? In either case what is the exact implication of doing that line? To my understanding clf is just an Object so there is no 'real' differences between the two statements but just doing 'clf.fit' as opposed to assigning it seems like a cleaner design. Maybe this was already answered or I am asking this in a poor way but some insight would really be appreciated, thanks!
@ShailendraPaliwal8 жыл бұрын
+Uladzislau Tarsunou `clf.fit` requires some arguments. Using `clf = clf.fit(train_data, train_target)` is fine although redundant I suppose.
@ShivdhwajPandey7 жыл бұрын
+josh At 3:48 getting ValueError: Number of labels=3 does not match number of samples=147, seems np delete is messing somewhere, import numpy as np from sklearn.datasets import load_iris from sklearn import tree iris = load_iris() test_idx = [0,50,100] #training data train_target = iris.target[test_idx] train_data = np.delete(iris.data, test_idx, axis=0) print train_data #testing data test_target = iris.target[test_idx] test_data = iris.data[test_idx] clf = tree.DecisionTreeClassifier() clf.fit(train_data, train_target) print test_target
7 жыл бұрын
Thanks for the series! It is the best one so far I have seen!
@manuelarechiga26147 жыл бұрын
Hello, thanks for the video. I have a doubt, for the features I only can use number or I can use for example text with information like a error code to determine specifics step to solved the error (label), among others features maybe numeric or text. Thanks again.
@FsimulatorX8 жыл бұрын
My question is who created the tree? Was it pre made by people or did the machine create it first and then people made a visual map/tree of what the machine thinks?
@Rhiever8 жыл бұрын
I really enjoy this series! I think it would be beneficial if you presented everything in Jupyter Notebooks and released those notebooks alongside your videos.
@Davey-jones1016 жыл бұрын
Hello everyone! I know I'm quite late, but if anyone could help it would be wonderful. My problem is at 3:53 , when I need to test the code. This is the error message on line 9: AttributeError: 'function' object has no attribute 'target' Please help, thanks!
@MuammarElKhatib8 жыл бұрын
pydot is not working in python3. :/
@JBGordon8 жыл бұрын
I see! I just created a Docker image to help, with all the dependencies setup and installation instructions. This is for Python 2, but it'll let you create the PDF at least. Hope this helps! hub.docker.com/r/jbgordon/recipes/
@MuammarElKhatib8 жыл бұрын
Thanks for the docker image Josh. At the moments I wrote my comment, I ended up installing all requirements in python2. Thanks also for the nice videos. Cheers.
@yedhuk8 жыл бұрын
You can use pydotplus instead of pydot, like mentioned here: stackoverflow.com/questions/38176472/graph-write-pdfiris-pdf-attributeerror-list-object-has-no-attribute-writ
@MuammarElKhatib8 жыл бұрын
+Yedhu Krishnan thanks for the information :).
@emadehsan8 жыл бұрын
Use conda to install these $ conda install -c anaconda pydot=1.0.28 $ conda install -c anaconda graphviz=2.38.0
@waqqas_the_wicked8 жыл бұрын
THANK YOU JBGordan! I can't wait till the next episode. Thanks you so much!
@greenfrog71745 жыл бұрын
if you using python3 (at 4:23), try graph.render('iris") here is the source code scikit-learn.org/stable/modules/tree.html#tree from sklearn.datasets import load_iris from sklearn import tree import graphviz iris = load_iris() clf = tree.DecisionTreeClassifier() clf.fit(iris.data, iris.target) dot_data = tree.export_graphviz(clf, out_file=None, feature_names=iris.feature_names, class_names=iris.target_names, filled=True, rounded=True, impurity=False) graph = graphviz.Source(dot_data) graph.render("iris")
@jhonsilvaale77845 жыл бұрын
Hi! I used Jupyter Notebook from Anaconda (with Python 3), and i used the next code, and it worked!: # Import from sklearn.datasets import load_iris import numpy as np from sklearn import tree iris = load_iris() # Showing the data (this part I changed too) print(iris.data[0]) print(iris.target[0]) for i in range(len(iris.target)): print('Example {},\t label {},\t features {}'.format(i , iris.target[i] , iris.data[i])) # Training data test_idx = [0,50,100] train_target = np.delete(iris.target, test_idx) train_data = np.delete(iris.data, test_idx, axis=0) # Testing data test_target = iris.target[test_idx] test_data = iris.data[test_idx] clf = tree.DecisionTreeClassifier() clf.fit(train_data, train_target) print(test_target) print(clf.predict(test_data)) # Exporting the decision tree from sklearn.externals.six import StringIO import pydot dot_data = StringIO() tree.export_graphviz(clf, out_file=dot_data, feature_names=iris.feature_names, class_names=iris.target_names, filled=True, rounded=True, impurity=False) # I used this module (graphviz) to generate the graph import graphviz as gp graph = gp.Source(dot_data.getvalue()) graph.render("iris", view = True) #Saludos desde Chile!
@M310GL5 жыл бұрын
También, para exportar el árbol de decisiones se puede seguir el ejemplo dado en la documentación de scikit-learn para no recurrir a pydot ni StringIO: import graphviz dot_data = tree.export_graphviz(clf, out_file=None, feature_names=iris.feature_names, class_names=iris.target_names, filled=True, special_characters=True) graph = graphviz.Source(dot_data) graph.render("iris") #Saludos desde México
@lamaalrweta83504 жыл бұрын
I have an error "No module named 'sklearn' " can u help me with that?
@wb78916 жыл бұрын
Just watched the first Machine Learning Recipies, and halfway through this, I was wondering if this was a good place to start learning how to code. Any recommendations?
@spacefarers69606 жыл бұрын
Traceback (most recent call last): File "main.py", line 40, in graph.write_pdf('iris.pdf') AttributeError: 'list' object has no attribute 'write_pdf' Am I the only one seeing that?
@spacefarers69606 жыл бұрын
I think I copied the complete code......
@kwakkkkkkable8 жыл бұрын
I'm having trouble opening the pdf. How do I solve this problem: 'open' is not recognized as an internal or external command
@jeremyheminger68827 жыл бұрын
The script simply exports the file as a *.pdf. You might consider running your python script in a local server environment /var/www/html for example then simply linking to the PDF in your browser. I am running a local server (no GUI and accessing it via shell and browser).
@satishjasthi25008 жыл бұрын
Hey Josh your lectures are amazing please continue the series, I'll be looking forward to learn more about machine learning in future episode...
@sandeepjoshi52668 жыл бұрын
If you could do all the programming in a Jupyter notebook, it would look really nice in videos and avoid switching between sublime text and terminal :)
@theacademician_cse7 жыл бұрын
What types of reaserch work we can carry using tensaflow? I am looking for research fileld. I have completed PhD in clustering.
@oysteinludvigsen8 жыл бұрын
This is exactly what I have been looking for. Thanks a lot! Looking forward to the next episode!
@harelib114 жыл бұрын
I keep getting errors when trying the pdf thing
@deboral.fernandes40657 жыл бұрын
could not open the pdf in 4:27 ... The CMD showed the message: 'open' is not recognized as an internal or external command, operable program or batch file. Somebody knows what I do?
@deboral.fernandes40657 жыл бұрын
The 'open -a preview' command is valid for Mac. For Windows, use only 'start iris.pdf'.
@barryoblarney92948 жыл бұрын
I know you can pause the video, but the code should be left up longer than the slides on what to do in general.
@KiloBee7778 жыл бұрын
So glad you guys are doing these vids. Thanks!
@nkuguy8 жыл бұрын
Nice! I can't wait till work is over today so I can go through this.
@syedtabrez8 жыл бұрын
what is test_idx=[0,50,100] are these features of iris or any other values.I could not find these values in wikipedia.If those are values then how the algorithm is getting features based on those values??Little bit confused.
@ahnaf_chowdhury8 жыл бұрын
+Josh Gordon Hi Josh! if I set, test_idx = [20, 70, 120] then the output should be [0 1 2] but I get [0 2 2]. Can you explain why?
@DeenAdamx8 жыл бұрын
How did pydot works ? I'm getting an import error that says 'no module named pydot' . Did i miss something ?
@PlaneTony8 жыл бұрын
+Deen Adam I had a bit of a nightmare with this issue on OS X, I found that using Anaconda with python 2.7 instead of 3.4 solved the problem. This is what Josh is using too in the videos. I hope this helps
@DeenAdamx8 жыл бұрын
+Tony Yates Well, Thanks i will give it a try.
@Walters9548 жыл бұрын
+Deen Adam I was able to use pydot-ng for python 2.7
@concohabin15528 жыл бұрын
+Deen Adam this github page might help nbviewer.jupyter.org/github/habinez/Google-ML-Recipes/tree/master/
@JBGordon8 жыл бұрын
Here's a docker image with all the dependencies setup: hub.docker.com/r/jbgordon/recipes/ Hope this helps!
@nikhildhyani3658 жыл бұрын
how tree knows what parameter to choose as starting point. Ex how it chose petal width(cm)
@MathWithSatvan7 жыл бұрын
Very Interesting ..Thanks for the short and interesting videos. Do you have website with these example codes ?
@Kdrahul967 жыл бұрын
first video was at the right pace. This video seems like it ran in 4x speed
@mhbdev5 жыл бұрын
That's what I'm talkin about
@sachinfulsunge99775 жыл бұрын
@@mhbdev You have an option called as pause on youtube bro this is quality content of ML right here no one clarifies this much so appreciate it please
@mafi83604 жыл бұрын
Just watch it 4 times. Or stop moaning.
@silentofthewind5 жыл бұрын
I'm following along with him in Spyder but the iris.pdf file I'm creating doesn't have any filled colors... can anyone help explain why?
@insain93028 жыл бұрын
are there only 2 vids on the playlist? i really wanna follow this.
@MonaJalal8 жыл бұрын
Why do you have axis=0 in training_data = np.delete(iris.data, test_idx, axis=0) ?
@sundarrajn10038 жыл бұрын
i have the same question..
@wanderingeek8 жыл бұрын
From what I understand, axis=0 is the vertical axis. So the rows that are deleted are the rows which are indexed by the values in text_idx vertically. For example, if text_idx = [2,5,7], and axis = 0, the 2nd, 5th and 7th rows would be deleted. Also, if test_idx=[2,5,7], but axis = 1, then the 2nd, 5th and 7th columns are deleted, as axis=1 is the horizontal axis. Hope this helps.
@jaguar_akki7 жыл бұрын
stackoverflow.com/questions/3877491/deleting-rows-in-numpy-array I think here is best expatiation. hope this helps Thank you
@ンシノ-f2b6 жыл бұрын
All programs have moved but pdf files can not be opened. Is it because it is done in a virtual environment?
@uladzislautarsunou57008 жыл бұрын
Oh and thank you very much for making these videos! Appreciate it.
@rajverma257 жыл бұрын
Lot properties of these data sets don't exist from sklearn package. Do you recommend something updated?
@fazil476 жыл бұрын
I'm not getting the coloured graph instead I'm getting a control process error.
@leonhardeuler98396 жыл бұрын
However, I couldn't find the code for visualization. Where is it?
@carlitosvodka7 жыл бұрын
NameError Traceback (most recent call last) in () 12 test_data = iris.data[test_idx] 13 ---> 14 clf = tree.DecisionTreeClassifier() 15 clf.fit(train_data, Train_target) NameError: name 'tree' is not defined when did we define the tree?
@JeffWeakley8 жыл бұрын
Hey Josh, great stuff. I realize it takes awhile to make these. Is there anyway to get notified when a new video comes out???? thanks.
@ironhidesk20247 жыл бұрын
Hi thanks for the videos ! I wanted to know which version of sklearn is being used ?
@kumargerman76248 жыл бұрын
Awesome SIR , The Best ML tutorial i found in 2016.... love from India
@codewithmarcin8 жыл бұрын
As someone that just recently got interested in ML. These sort of videos are fantastic. Really looking forward to the next episode. +Google Developers Just as others have asked, and I know it's probably asking a lot but is there any chance you could release these videos more frequently?
@koushik76048 жыл бұрын
Great tutorial.......lot of things to learn.....waiting for next episode.
@saifululum59946 жыл бұрын
i have homework from my college about ML exactly Decision Tree fro data iris, but i must create manually model decision tree of data iris, could you explain how about if create model manually(i mean manual with paper)?
@fasiabbu8 жыл бұрын
Hi Josh.. great videos.. however i was trying to setup my environment for Graphics Viz.. trying to import pydot for python3 in spyder editor.. was not successful.. Can i know what environment you have been using?
@JBGordon8 жыл бұрын
I think I got lucky on my Mac. I created a Docker image to help folks having trouble: hub.docker.com/r/jbgordon/recipes/
@fasiabbu8 жыл бұрын
Cool thanks josh.. i will try that route..
@davidoh09058 жыл бұрын
I installed pydot by running "conda install -c anaconda pydot=1.0.28" in my sublime console but when I run the file in terminal it says there is no module called pydot. How do I work around this? please help. thank you!
@tensorstrings8 жыл бұрын
How will the syntax change when running these examples in windows? I'm using the anaconda download with scikit and am getting attribute errors in this example. Particularly, the lines that include '.target' or '.data'. I'm still somewhat novice with python.
@AndiRHermawan8 жыл бұрын
any solution for pydot in python3 (3.5.1) ?
@JBGordon8 жыл бұрын
Hey - I created a Docker image to help, with all the dependencies setup and installation instructions. This is for Python 2, but it'll let you create the PDF at least. Hope this helps! hub.docker.com/r/jbgordon/recipes/
@AndiRHermawan8 жыл бұрын
thank you, that's really help me :)
@martakixd7 жыл бұрын
Hello! Can you put all the links in the description, it's easier to search than diggind the video. Thank you =)
@shivjitiwari88564 жыл бұрын
On which screen are you working? Please help me to catch you
@TusharSharmabigdreamer1017 жыл бұрын
if i have a extreme large feature set and training set, wont the decision tree hog memory and be slow?
@steveoshaughnessy37366 жыл бұрын
Where is the pdf saved? I've got everything working in Jypyter Notebook and Python 3. I just searched my entire C drive and found nothing.
@rajendrachede24306 жыл бұрын
which are the better books to learn machine learning from the scratch
@freef498 жыл бұрын
This series is fantastic!
@engr.md.shahriarforhad10916 жыл бұрын
I have some errors following: File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "C:/Users/Std User/.spyder-py3/ml3.py", line 17, in test_target=iris.target(test_idx) TypeError: 'numpy.ndarray' object is not callable. How can I solve this prob?
@nkunam3 жыл бұрын
FileNotFoundError: [WinError 2] "dot" not found in path. I keep getting that error when I try to write the dot object into "iris.pdf". How can I fix this? Please help
@lorhannascimento2003 жыл бұрын
Use: >>> from sklearn import tree >>> tree.plot_tree(clf) Or first install graphviz for python in your PC and graphviz for Windows, Mac or Ubuntu. Then: >>> import graphviz >>> dot_data = tree.export_graphviz(clf, out_file=None, feature_names=iris.feature_names, class_names=iris.target_names, filled=True) >>> graph = graphviz.Source(dot_data, format="png") >>> graph
@thebuzz20108 жыл бұрын
Can someone explain the purpose behind this line "dot_data = StringIO()"
@petercheney26426 жыл бұрын
It's a string buffer that can store strings
@hirenrana37417 жыл бұрын
here we check only petal width what's about other feature??
@wichofer8 жыл бұрын
Nice! When will episode 3 be avaliable?
@therinyoung41197 жыл бұрын
I can't open the pdf file. I'm getting an error message that says the file is corrupt. I'm using windows 10 64bit.
@IceW4ve8 жыл бұрын
Awesome videos man! Is it possible to provide something like a "cheat sheet" where the most important terms of machine learning are summarized? Would be great! :D
@JBGordon8 жыл бұрын
+Roman Bauernfeind Fantastic idea! Yes. I already filmed ep #3, but I will put this in ep #4.
@MrNeuroMind5 жыл бұрын
What is the name of the program he is using to write pythoon code in?
@fazil476 жыл бұрын
Is there an updated version of this video?
@Fnargl998 жыл бұрын
the link at @4:17 is not working for me.
@kryptons-galaxy5 жыл бұрын
Unable to create the pdf, despite of all dependencies installed Traceback (most recent call last): File "/home/tbd/PycharmProjects/tensorEnv/MLiris2.py", line 42, in graph.write_pdf("iris.pdf") AttributeError: 'list' object has no attribute 'write_pdf'
@williamrudebusch78508 жыл бұрын
Wow, JBGordon! Great moves, keep it up, proud of you!
@TzaraDuchamp8 жыл бұрын
Here is my solution to this problem. I rewrote the code: from sklearn.datasets import load_iris from sklearn import tree iris = (load_iris()) clf = (tree.DecisionTreeClassifier()) clf = (clf.fit(iris.data, iris.target)) tree.export_graphviz(clf, out_file='irisTree.dot', feature_names=iris.feature_names, class_names=iris.target_names, filled=True, rounded=True, special_characters=True) This will create an irisTree.dot file in the folder where you saved your .py file. From there you can either open Graphiz and load the .dot or you can open up a terminal and write: "dot -Tpng -O" and then drag in your .dot file. This will create a .png.
@hikmetcancelik8 жыл бұрын
instead of opening the terminal you can call it from your script. Simply include "from subprocess import call" at the top of your script and "call(["dot", "-Tpdf", "irisTree.dot", "-o", "irisTree.pdf"])" for the last line.
@yusufhalabi74377 жыл бұрын
It works!
@andrewmao57477 жыл бұрын
Another note: to open the dot file in GraphViz, you should navigate to bin/gvedit.exe
@MonaJalal8 жыл бұрын
Also could you please share the link to github page? It would be great to see the source-code.
@cosmicnikhil7 жыл бұрын
Please help I'm getting the following error importerror no module named sklearn.datasets, I have installed anaconda 2.Any help would be greatly appreciated
@zhvng7 жыл бұрын
What's the syntax for "print" in the for loop?
@shravilpotdar7 жыл бұрын
+JBGordon ... Please could you tell me from where I can find datasets like this?