Visualizing a Decision Tree - Machine Learning Recipes #2

  Рет қаралды 969,611

Google for Developers

Google for Developers

Күн бұрын

Пікірлер: 589
@shakirrasheedkhankhattak9052
@shakirrasheedkhankhattak9052 5 жыл бұрын
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.
@prashantsaraswat9095
@prashantsaraswat9095 3 жыл бұрын
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.
@sandielee
@sandielee 6 жыл бұрын
for python3 and for the print statement: print (test_target) print(clf.predict(test_data))
@kaysoar
@kaysoar 8 жыл бұрын
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.
@deananderson8186
@deananderson8186 6 жыл бұрын
bKaysoar B
@amomasi9909
@amomasi9909 5 жыл бұрын
Thank you! I find it to be quite ungrateful, actually.
@karinetorres5213
@karinetorres5213 4 жыл бұрын
Eu
@dolomikal
@dolomikal 8 жыл бұрын
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!
@harrygaggles1414
@harrygaggles1414 8 жыл бұрын
As a newbie! I appreciate your work, and the training you provide! Excellent
@nzube
@nzube 8 жыл бұрын
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
@pradyumna27
@pradyumna27 8 жыл бұрын
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.
@codecruz
@codecruz 7 жыл бұрын
There is now lol
@no_more_free_nicks
@no_more_free_nicks 7 жыл бұрын
When you press spacebar then the video will stop, this is what I use to write the actual code :)
@youlearnchannel5383
@youlearnchannel5383 6 жыл бұрын
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)
@samarpratapsingh9788
@samarpratapsingh9788 4 жыл бұрын
why is their axis=0?
@samarpratapsingh9788
@samarpratapsingh9788 4 жыл бұрын
what is the axis?
@maxodo2943
@maxodo2943 4 жыл бұрын
@@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] ]
@Iwillseeyouagainin25years
@Iwillseeyouagainin25years 4 жыл бұрын
Thank you!
@coolkidmcoy
@coolkidmcoy 8 жыл бұрын
This series is so good, thank you , thank you , thank you!
@trisnayanayoenara886
@trisnayanayoenara886 4 жыл бұрын
P8 O
@oOZanlanOo
@oOZanlanOo 3 жыл бұрын
yes
@MACHINEBUILDER
@MACHINEBUILDER 7 жыл бұрын
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!!
@Abdullah-mg5zl
@Abdullah-mg5zl 6 жыл бұрын
*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!
@riyadhrahman4453
@riyadhrahman4453 8 жыл бұрын
Been waiting everyday for the new episode
@JBGordon
@JBGordon 8 жыл бұрын
+Riyadh Rahman Thanks! I'm doing my best to get these out every two weeks.
@anthonydalessandro8373
@anthonydalessandro8373 8 жыл бұрын
+Josh Gordon every two weeks?! this is blasphemy
@JerryAsher
@JerryAsher 8 жыл бұрын
+Josh Gordon Are there playlists for the individual series, as in a playlist of the ML videos?
@GoogleDevelopers
@GoogleDevelopers 8 жыл бұрын
+Jerry Asher there sure is! It's pretty small still, but stay tuned for another episode in two weeks!
@GoogleDevelopers
@GoogleDevelopers 8 жыл бұрын
+Jerry Asher Save this one! kzbin.info/www/bejne/qn_EamyGfJ2biJo
@greenfrog7174
@greenfrog7174 5 жыл бұрын
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")
@matheusferesdeoliveira5982
@matheusferesdeoliveira5982 6 жыл бұрын
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)
@yashsingh7810
@yashsingh7810 3 жыл бұрын
sadly the last part doesn't work anymore.
@orcaorka
@orcaorka 8 жыл бұрын
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.
@FsimulatorX
@FsimulatorX 8 жыл бұрын
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.
@orcaorka
@orcaorka 8 жыл бұрын
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. :)
@tarek3735
@tarek3735 5 жыл бұрын
if you have worked in depth with c it would be much easier to implement.
@DarrelFrancis
@DarrelFrancis 5 жыл бұрын
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.
@chillenld
@chillenld 8 жыл бұрын
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.
@jhonsilvaale7784
@jhonsilvaale7784 5 жыл бұрын
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!
@M310GL
@M310GL 5 жыл бұрын
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
@lamaalrweta8350
@lamaalrweta8350 4 жыл бұрын
I have an error "No module named 'sklearn' " can u help me with that?
@souranumaji4213
@souranumaji4213 7 жыл бұрын
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.
@datascienceandmachinelearn3807
@datascienceandmachinelearn3807 6 жыл бұрын
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")
@OttoFazzl
@OttoFazzl 8 жыл бұрын
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!
@ShivdhwajPandey
@ShivdhwajPandey 7 жыл бұрын
+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!
@akansha.da1iiitmk.ac.inaka290
@akansha.da1iiitmk.ac.inaka290 7 жыл бұрын
Doing it on Python 3? Don't want to pause the video and write? Find the code here: github.com/akanshajainn/Machine-Learning---Google-Developers
@vddngddnd4306
@vddngddnd4306 8 жыл бұрын
What an diction, even when i'm not native it's so easy to listen you.
@pablomarcelmx
@pablomarcelmx 5 жыл бұрын
Ok guys. Working code With PDF (Using python 3.7 and PyCharm IDE). Please keep in mind that multiple packages need to be installed for this code to run. import numpy as np import io from sklearn import tree from sklearn.datasets import load_iris 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 import pydot dot_data = io.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 = pydot.graph_from_dot_data(dot_data.getvalue()) graph[0].write_pdf("iris.pdf")
@KiloBee777
@KiloBee777 8 жыл бұрын
So glad you guys are doing these vids. Thanks!
@nkuguy
@nkuguy 8 жыл бұрын
Nice! I can't wait till work is over today so I can go through this.
@satishjasthi2500
@satishjasthi2500 8 жыл бұрын
Hey Josh your lectures are amazing please continue the series, I'll be looking forward to learn more about machine learning in future episode...
@waqqas_the_wicked
@waqqas_the_wicked 8 жыл бұрын
THANK YOU JBGordan! I can't wait till the next episode. Thanks you so much!
@Kdrahul96
@Kdrahul96 7 жыл бұрын
first video was at the right pace. This video seems like it ran in 4x speed
@mhbdev
@mhbdev 5 жыл бұрын
That's what I'm talkin about
@sachinfulsunge9977
@sachinfulsunge9977 5 жыл бұрын
@@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
@mafi8360
@mafi8360 4 жыл бұрын
Just watch it 4 times. Or stop moaning.
@oysteinludvigsen
@oysteinludvigsen 8 жыл бұрын
This is exactly what I have been looking for. Thanks a lot! Looking forward to the next episode!
@Davey-jones101
@Davey-jones101 6 жыл бұрын
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!
@jcerdas6
@jcerdas6 6 жыл бұрын
For those that were having a bad time like me running graphviz on windows, follow the below: I have followed the following steps and it worked fine for me. 1 . Download and install graphviz-2.38.msi from graphviz.gitlab.io/_pages/Download/Download_windows.html 2 . Set the path variable (a) Control Panel > System and Security > System > Advanced System Settings > Environment Variables > Path > Edit (b) add 'C:\Program Files (x86)\Graphviz2.38\bin'
@kumargerman7624
@kumargerman7624 8 жыл бұрын
Awesome SIR , The Best ML tutorial i found in 2016.... love from India
@ElVerdaderoAbejorro
@ElVerdaderoAbejorro 7 жыл бұрын
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
@furrane
@furrane 7 жыл бұрын
You deserve way more likes ! Good commenting of the code =)
@deboral.fernandes4065
@deboral.fernandes4065 7 жыл бұрын
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.fernandes4065
@deboral.fernandes4065 7 жыл бұрын
The 'open -a preview' command is valid for Mac. For Windows, use only 'start iris.pdf'.
@bostongeorge0
@bostongeorge0 8 жыл бұрын
+ 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?
@uladzislautarsunou5700
@uladzislautarsunou5700 8 жыл бұрын
Oh and thank you very much for making these videos! Appreciate it.
@barryoblarney9294
@barryoblarney9294 8 жыл бұрын
I know you can pause the video, but the code should be left up longer than the slides on what to do in general.
@TzaraDuchamp
@TzaraDuchamp 8 жыл бұрын
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.
@hikmetcancelik
@hikmetcancelik 8 жыл бұрын
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.
@yusufhalabi7437
@yusufhalabi7437 7 жыл бұрын
It works!
@andrewmao5747
@andrewmao5747 7 жыл бұрын
Another note: to open the dot file in GraphViz, you should navigate to bin/gvedit.exe
@uladzislautarsunou5700
@uladzislautarsunou5700 8 жыл бұрын
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!
@ShailendraPaliwal
@ShailendraPaliwal 8 жыл бұрын
+Uladzislau Tarsunou `clf.fit` requires some arguments. Using `clf = clf.fit(train_data, train_target)` is fine although redundant I suppose.
@helloJL
@helloJL 8 жыл бұрын
For those still encountering error with pydot, open cmd and run "pip uninstall pydot" and then run "pip install pydot2" works for me. no error and pdf will be at your working directory
@luisleal4169
@luisleal4169 8 жыл бұрын
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 ?
@williamrudebusch7850
@williamrudebusch7850 8 жыл бұрын
Wow, JBGordon! Great moves, keep it up, proud of you!
@Rhiever
@Rhiever 8 жыл бұрын
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.
@koushik7604
@koushik7604 8 жыл бұрын
Great tutorial.......lot of things to learn.....waiting for next episode.
@micky8331
@micky8331 8 жыл бұрын
the link at the end for visualization : scikit-learn.org/stable/modules/tree.html
@manuelarechiga2614
@manuelarechiga2614 7 жыл бұрын
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.
@sandeepjoshi5266
@sandeepjoshi5266 8 жыл бұрын
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 :)
@FsimulatorX
@FsimulatorX 8 жыл бұрын
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?
@saimmehmood6936
@saimmehmood6936 4 жыл бұрын
for testing data: import numpy as np #testing data test_idx = [0, 50, 100] test_target = np.array(iris.target[test_idx]) test_data = np.array(iris.data[test_idx]) print(test_target, test_data)
@saileshsivakumar1404
@saileshsivakumar1404 6 жыл бұрын
For those who are wondering how to install Graphviz for mac, start by installing a package manager like MacPorts or Homebrew and then install the package using it. Pip install for GraphViz for Mojave doesn't work correctly
@rijatru
@rijatru 8 жыл бұрын
Thanks! At last an intro to machine learning that is a true introduction :)
@candanbebek7880
@candanbebek7880 3 жыл бұрын
op pmmmmklkll li
@joeycopperson
@joeycopperson 8 жыл бұрын
nice tutorials Josh :) In addition to basic imports and install I needed following # sudo python3 -m pip install ipython # sudo python3 -m pip install pydot # sudo python3 -m pip install pydotplus # sudo apt-get install graphviz
@iWonderOfficial
@iWonderOfficial 7 жыл бұрын
Super good video! Thank you for putting in such effort - you explain in a very comprehendible manner! :)
@artemkovera5785
@artemkovera5785 7 жыл бұрын
Hello, I just published an e-book about machine learning with clustering algorithms. Would you like to get a free copy?
@HiteshSahu7
@HiteshSahu7 8 жыл бұрын
Summary :- ML Framework automatically generate decisions tree according to feature and labels in other word ML used features to decode label for input teat data. Thus accuracy of machine is heavily depend on features choosen.
@dan-mg4tc
@dan-mg4tc 7 жыл бұрын
Help: I am having an error from "graph.write_pdf("iris.pdf") saying: "AttributeError: 'list' object has no attribute 'write_pdf'"
@tamiltecheria-9471
@tamiltecheria-9471 6 жыл бұрын
same here also have you fixed it
@Endlessvoidsutidos
@Endlessvoidsutidos 6 жыл бұрын
use graph[0]
@arduinoexplorer5437
@arduinoexplorer5437 6 жыл бұрын
Having same problem
@nielagi5029
@nielagi5029 6 жыл бұрын
same problem here
@HaiderAli-bv3gl
@HaiderAli-bv3gl 6 жыл бұрын
same problm how u solve it??
@mikemetcalfe1903
@mikemetcalfe1903 7 жыл бұрын
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?
@541jesus
@541jesus 4 жыл бұрын
TowardsDataScience has an article covering how to use matplotlib over Graphviz for Python3. In their words "the dot library is a hard-to-install dependency". They cover how to install Graphviz but it is a hard-to-install dependency for Python3
@keethyanandpr
@keethyanandpr 7 жыл бұрын
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 ;)
@CrashproofCode
@CrashproofCode 8 жыл бұрын
Really great! Looking forward to the next one!
@zouhirelmezraoui1336
@zouhirelmezraoui1336 Жыл бұрын
In Summary with Concepts and Conscience
@theacademician_cse
@theacademician_cse 8 жыл бұрын
What types of reaserch work we can carry using tensaflow? I am looking for research fileld. I have completed PhD in clustering.
@spacefarers6960
@spacefarers6960 6 жыл бұрын
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?
@spacefarers6960
@spacefarers6960 6 жыл бұрын
I think I copied the complete code......
@codewithmarcin
@codewithmarcin 8 жыл бұрын
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?
@net
@net 8 жыл бұрын
Please don't stop making these.
@blazstempelj7999
@blazstempelj7999 8 жыл бұрын
Besides being a little bit fast, very well explained.
@tensorstrings
@tensorstrings 8 жыл бұрын
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.
@polkrb
@polkrb 8 жыл бұрын
Strange you don't use Python3 :)
@Vibertex
@Vibertex 5 жыл бұрын
yes
@tekki.dev.
@tekki.dev. 5 жыл бұрын
super strange
@7620313
@7620313 5 жыл бұрын
and rather annoying
@3wayinternet
@3wayinternet 6 жыл бұрын
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?
@kumardeveloper7281
@kumardeveloper7281 7 жыл бұрын
Great things to learn for a new buddy like me. @Josh Very Useful. Thanks
@freef49
@freef49 8 жыл бұрын
This series is fantastic!
@MathWithSatvan
@MathWithSatvan 7 жыл бұрын
Very Interesting ..Thanks for the short and interesting videos. Do you have website with these example codes ?
@kwakkkkkkable
@kwakkkkkkable 8 жыл бұрын
I'm having trouble opening the pdf. How do I solve this problem: 'open' is not recognized as an internal or external command
@jeremyheminger6882
@jeremyheminger6882 7 жыл бұрын
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).
@syedtabrez
@syedtabrez 8 жыл бұрын
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.
@nckporter
@nckporter 8 жыл бұрын
Awesome work, mind sharing your sublime text theme/settings? They look awesome.
@pratikmoghe9725
@pratikmoghe9725 8 жыл бұрын
the theme name is LAZY
@chaosolid
@chaosolid 5 жыл бұрын
thank you - you are answering the important questions!
@deboral.fernandes4065
@deboral.fernandes4065 7 жыл бұрын
if you are using python 3x, use the pydotplus module instead of pydot in 4:49 :)
@amaralgustavo
@amaralgustavo 7 жыл бұрын
salvou minha vida
@DavidAxelrodP
@DavidAxelrodP 8 жыл бұрын
These are so helpful. Please post more!!!
@sugandhiag
@sugandhiag 7 жыл бұрын
awesome videos , thanks Google . u are helping us in all sorts.
@georgezheng7139
@georgezheng7139 8 жыл бұрын
Thank you Josh for your vids.
@pkScary
@pkScary 8 жыл бұрын
Amazing video! Very well done - subbed. Would love to see more!
@datascienceds7965
@datascienceds7965 6 жыл бұрын
This is a very useful video. Thanks for posting this
@carlitosvodka
@carlitosvodka 7 жыл бұрын
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?
@Fnargl99
@Fnargl99 8 жыл бұрын
the link at @4:17 is not working for me.
@JeffWeakley
@JeffWeakley 8 жыл бұрын
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.
@wb7891
@wb7891 6 жыл бұрын
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?
@harelib11
@harelib11 4 жыл бұрын
I keep getting errors when trying the pdf thing
@wichofer
@wichofer 8 жыл бұрын
Nice! When will episode 3 be avaliable?
@brianmarston976
@brianmarston976 6 жыл бұрын
Hello Josh, great videos, thank you so much for making them. May we have the code to download?
@ironhidesk2024
@ironhidesk2024 7 жыл бұрын
Hi thanks for the videos ! I wanted to know which version of sklearn is being used ?
@tammaaziz
@tammaaziz 5 жыл бұрын
Thanks for this amazing content and clear explanation
@alexandeap
@alexandeap 7 жыл бұрын
Excellent video friend and thank you for the translation into Spanish as we are many people of Spanish language to whom we are interested in this fascinating subject of deep learning, thank you very much and please continue to teach us more about this latest technology. Please do not know if you can teach us to use tenzor flow with java.
@esevre
@esevre 7 жыл бұрын
So I had a problem running the part to create a PDF, but my warning said that "graph" is a list. This was fixed by accessing the first element of the list with: graph[0].write_pdf("iris.pdf") I hope this helps anyone else who had the same problem.
@vinusankars4967
@vinusankars4967 8 жыл бұрын
Great ! Sir your lectures are too good 👍
@SbotTV
@SbotTV 8 жыл бұрын
Wonderful! This fills me with ideas!
@ahnaf_chowdhury
@ahnaf_chowdhury 8 жыл бұрын
+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?
@nikhildhyani365
@nikhildhyani365 8 жыл бұрын
how tree knows what parameter to choose as starting point. Ex how it chose petal width(cm)
What Makes a Good Feature? - Machine Learning Recipes #3
5:41
Google for Developers
Рет қаралды 523 М.
MIT Introduction to Deep Learning | 6.S191
1:09:58
Alexander Amini
Рет қаралды 828 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
AI can't cross this line and we don't know why.
24:07
Welch Labs
Рет қаралды 1,5 МЛН
Genius Machine Learning Advice for 10 Minutes Straight
9:46
Data Sensei
Рет қаралды 101 М.
Let’s Write a Pipeline - Machine Learning Recipes #4
7:54
Google for Developers
Рет қаралды 506 М.
Large Language Models explained briefly
7:58
3Blue1Brown
Рет қаралды 1 МЛН
Hello World - Machine Learning Recipes #1
6:53
Google for Developers
Рет қаралды 2,6 МЛН
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 419 М.
MIT Introduction to Deep Learning (2023) | 6.S191
58:12
Alexander Amini
Рет қаралды 2 МЛН
Machine Learning Zero to Hero (Google I/O'19)
35:33
TensorFlow
Рет қаралды 1,8 МЛН