Classification of IRIS dataset in TensorFlow

  Рет қаралды 16,340

Learn DL Code TF

Learn DL Code TF

Күн бұрын

Пікірлер: 72
@shivas7535
@shivas7535 5 жыл бұрын
Hi Vikraman, thank you for the tutorial, I am developing a demo model using the explained code flow as a skeleton code and this will be a part of my presentation on ML which I will be presenting for a set of audience. Thank you very much!
@sundararajan3306
@sundararajan3306 4 жыл бұрын
Hi vikraman, Thanks for this excellent video. As for cross entropy, another interpretation is that when predicted value is more sure ie. Higher probability(say, 0.9) the loss or penalty is lesser and vice versa.
@dw8200
@dw8200 7 жыл бұрын
Very nice step by step explanation. Thank you.
@manojrohitvemparala5006
@manojrohitvemparala5006 7 жыл бұрын
Very Useful Video. Thanks!
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
thanks :)
@RahulIndoriavision
@RahulIndoriavision 6 жыл бұрын
Ho gayaji subscribe. Good lesson. Keep posting more videos. All the best for your channel.
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
thank you Rahul, more videos on the way!
@SaiTeja-go6lw
@SaiTeja-go6lw 7 жыл бұрын
Hi vikrmank, It is really helpful.Please share your github repository, and explain there only like notes or PPT (Basic steps on deep learning).Hope you post more videos related to kaggle competition using of Tensorflow !!
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Hi Sai, Thanks for your feedback. Link to my Github repo: github.com/Vikramank and link to the repo where I post corresponding lecture notebooks : github.com/Vikramank/Deep-Learning- I'm participating in a few Kaggle competitions. As soon as it is over, I'll post some tutorial videos !
@contractorwolf
@contractorwolf 8 жыл бұрын
Thanks for the video, very helpful
@learndlcodetf5331
@learndlcodetf5331 8 жыл бұрын
james wolf :)
@ioemiracles5682
@ioemiracles5682 4 жыл бұрын
Thank you for your tutorial. kindly tell si it ANN?
@learndlcodetf5331
@learndlcodetf5331 4 жыл бұрын
hello, yes it is very much a neural network. It is a fundamental(basic) neural network that contains neurons for input and output layers. I have not added hidden layers to make things simple.
@muhammadrasikhkamran3017
@muhammadrasikhkamran3017 4 жыл бұрын
@@learndlcodetf5331 kindly tell how many neurons it contains at input and output layers?
@learndlcodetf5331
@learndlcodetf5331 4 жыл бұрын
​@@muhammadrasikhkamran3017 hi, there are four neurons at the input layer corresponding to the four features used and 3 neurons at the output layer corresponding to the three classes. A single weight matrix of size(4,3) connects the input layer neurons to the output layer neurons.
@muhammadrasikhkamran3017
@muhammadrasikhkamran3017 4 жыл бұрын
@@learndlcodetf5331 we can also add hidden layer. Kindly guide code to add 2 hidden layers.
@learndlcodetf5331
@learndlcodetf5331 4 жыл бұрын
Hi, it is much easy with latest TF API and Keras by adding dense layers, like model.add(Dense(6)) after input layer. But if you want to follow my approach in TF 1 version, you can declare another weight variable of shape output of the first layer(input) and input of the final layer(output)
@davidhsu1115
@davidhsu1115 7 жыл бұрын
Nice tutorial!! Could you tell how to show the optimise line which can separate to different kind of flowers when i got only two kinds of flowers?
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Hi, you need to change the shape of placeholder 'y_' to [None, 2] , 'W' to [4,2] and 'b' to [2] in cell 53. Make appropriate changes in Pandas data frame object. If you are interested in this, a new tutorial based to implement IRIS dataset in mobile handsets is coming soon :)
@davidhsu1115
@davidhsu1115 7 жыл бұрын
THX!
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Hi, my tutorial to make Android APP using TF that uses IRIS dataset is out! kzbin.info/www/bejne/imqXepWZrpJja6M
@Hiiii138
@Hiiii138 5 жыл бұрын
Sir I want to store all the predicted labels of test data..how can I do this.. please reply sir
@learndlcodetf5331
@learndlcodetf5331 5 жыл бұрын
hi, you can export the predicted labels to pandas data frame (www.geeksforgeeks.org/create-a-pandas-dataframe-from-lists/) and then export the data frame to CSV file using pandas function datatofish.com/export-dataframe-to-csv/
@anjukaimal8591
@anjukaimal8591 6 жыл бұрын
Hi Vikramnk, Thanks for the video . Can you help me in how to visualize the same in tensorboard?
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
Hi Anju, You can follow my tutorial to visualize loss or other parameters here -> kzbin.info/www/bejne/aYeoiYttaNmhrZY You can choose the same method, however, there would be minor changes since TensorFlow team depracted some functions
@soniadutta9462
@soniadutta9462 6 жыл бұрын
after downloading tensorflow in anaconda and launch jupyter notebook tensorflow works but other package I cannot import..It is showing module not found for pandas and seaborn.How can I solve it? Can you pls help me
@learndlcodetf5331
@learndlcodetf5331 5 жыл бұрын
Hello, extremely sorry for the delay in my response. You need to install Pandas and seaborn package. Since you have installed anaconda, its highly likely you have pandas installed. Try 'conda install pandas'
@contractorwolf
@contractorwolf 7 жыл бұрын
I am a little confused by what gets returned from the sess.run() code. it seems that you are looking at the first value of an array and if that value is 2, that means iris-virginica, but why is 2 == iris-virginica?
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Hi James, let me explain it step by step. 1) Our dataset contains 3 classes, viz Iris-setosa, Iris-versicolor and Iris-virginica 2) To use the class data in our code, I converted them into on-hot vectors, i.e [1,0,0] denotes Iris-setosa, [0,1,0] for Iris-versicolor and [0,0,1] Iris-virginica. 3) The output layer of our network is a softmax layer which returns a vector of 3 denoting the probability of each class. 4) The function tf.arg_max(y,1) returns the index of the class with maximum probability. 5) In our case '0' -> Iris-setosa , '1' ->Iris-versicolor and '2' -> Iris-virginica. In my code : largest = sess.run(tf.arg_max(y,1), feed_dict={x: b})[0] I am feeding a input vector 'b' the I want the output of tf.argmax(y,1) which gives me corresponding class. I hope this is clear. If not, please feel free to comment below.
@contractorwolf
@contractorwolf 8 жыл бұрын
I was able to run your code using jupyter notebook on my AWS GPU server that I setup using the instructions from course.fast.ai (for setting up a gpu server in aws that can run tensorflow and keras) Your code and explanations ran great (after I installed tensorflow and seaborn), but I was wondering about what sort of changes I would need to make so that I use a dataset with a lot more features? (i.e. more columns of data). Other than adding the new columns for the test and train data, modifying the column sizes of the placeholders and variables, I know if their are more than 3 choices I would need to make changes to the mapping for the results, but is that all? Is their anything else that would need to be done?
@learndlcodetf5331
@learndlcodetf5331 8 жыл бұрын
Hi James, Glad to know the code worked fine. If your input data already has the extra features, you don't have to do anything. But if you are trying to add your features, you need to modify input data first. Following that, modify the placeholders(input), variables(weights, bias, etc) accordingly. I suppose you are doing using Neural Networks. Don't worry about the number of features. MNIST dataset was previously solved using Nerual Networks with a large number of features(784!!!). Hope this helps. Feel free to contact me if you run into any errors!
@contractorwolf
@contractorwolf 7 жыл бұрын
+mastering deep learning with tensorflow, What about features that are classifications themselves, should they all be "one hot" encoded if they dont nicely represent a number. For example, if you dataset had a feature like "book category" that had values like history, fiction, and childrens. Should I make childrens be represented like [0, 0, 1]? If so does any of the code need to be changed other than the definition of the shape of the dataset? Thanks again for such clear explanations of this complex topic.
@hamsinisankaran2435
@hamsinisankaran2435 7 жыл бұрын
Hi , Thanks for the tutorial. Could you please tell me , how I can access a dataset remotely ?
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Hi Hamsini, There are two ways you can access dataset remotely. 1) For a popular dataset like MNIST, IRIS , CIFAR, etc TF and higher level API's of TF come with a builtin function that will download and import the dataset to your current session. For example the builtin function "tensorflow.examples.tutorials.mnist import input_data" will grab the data from web for you. 2) If you wanna grab a data from a website you can use the following python package. import urllib.request urllib.request.urlretrieve(url, file_name) Hope this helps!
@hamsinisankaran2435
@hamsinisankaran2435 7 жыл бұрын
Thank you for your response. I would prefer going with the second method. Great step by step explanation .
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
great!
@sasanksexperience1301
@sasanksexperience1301 6 жыл бұрын
Is it a nueral network model or not?
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
hi, of course, more like a single layer neural network. The input layer contains 5 neurons and the output layer (the softmax layer) contains three neurons corresponding to three classes. I made it simple so that everyone can understand. Feel free to add more layers between the input and output layers!
@ioemiracles5682
@ioemiracles5682 4 жыл бұрын
@@learndlcodetf5331 hi, kindly tell the hidden layer contains 5 neurons? and input layer contains 4 inputs
@hariomtheboss
@hariomtheboss 6 жыл бұрын
for step in xrange(epoch): _, c=sess.run([train_step,cross_entropy], feed_dict={x: x_input, y_:[t for t in y_input.as_matrix()]}) if step%500==0 : print c Error in this line
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
Hi, what error are getting? If you are using Python3.x modify the print statement to print (c)
@kalaiselvan7840
@kalaiselvan7840 7 жыл бұрын
hi vikraman. You explanation was well and good, but what should i do if i need to increase the features and classes?. It would be great you explain with six features(here features will be string instead of integers) and 5 classes.Please explain with the example and how the changes has to be made. If possible along with the code please.
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Hi, just read about decision trees and get back to me. I think it would be more apt and easy for your project since you have only binary values in your dataset
@kalaiselvan7840
@kalaiselvan7840 7 жыл бұрын
hi, yes i do know about decision trees. I just couldn't find proper explanation in implementing a decision tree model for a dataset and the training of model and using it in android studio . I am a newbie and i find it difficult to put it all together. I would be glad if you could help me sort it out. :)
@kalaiselvan7840
@kalaiselvan7840 7 жыл бұрын
my most prior question is there is a way to include tensorflow model in android using ndk, but if i use decision tree how would i import it in android studio as it does not involve tensorflow in it.
@learndlcodetf5331
@learndlcodetf5331 7 жыл бұрын
Why do you want to use TensorFlow in the first place? Scikit-learn has an awesome library for decision trees and TF as of today doesn't have supporting libraries. There are some Java APIs available for Scikit that you can use in android studio
@kalaiselvan7840
@kalaiselvan7840 7 жыл бұрын
Mastering deep learning with TensorFlow thanks vikraman. I have a managed to do decision tree using scikit learn. But I dont know how to proceed further. I couldn't find a way to integrate scikit learn model in android. Can you guide me to save and deploy my scikit learn model to Android studio. Or make a tutorial video on it, so it would be useful for everyone. Thanks in advance :)
@swilson691000
@swilson691000 6 жыл бұрын
can you do it in Python NumPy ndarray without any other imports, restriction is only import numpy as np
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
Hi, one can do it using Numpy alone. Multidimensional Arrays and mathematical functions that are contained in Numpy are the fundamental blocks of Machine Learning. TensorFlow consists of a large number of helper functions and helps us with prebuilt function instead of writing all by ourselves
@swilson691000
@swilson691000 6 жыл бұрын
Can you do a video on the topic?
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
Sure, I;ll try to do it in a while
@majusumanto9016
@majusumanto9016 6 жыл бұрын
Hello, after i watch your video.. why u dont use hidden layer to classify this data set ? Maybe if you use hidden layer (adding another layer), you can get better acuracy.
@learndlcodetf5331
@learndlcodetf5331 6 жыл бұрын
Hi Maju, Yes, you are absolutely right. The focus of this video was how to perform a simple classification task with a shallow network in TensorFlow and since I got 97% accuracy, I was like ok no need for more layers( ha ha). But I am sorry not to have discussed the additional layers here. I'll update the code if required to boost the accuracy
MNIST in TensorFLow  In-depth analysis
35:52
Learn DL Code TF
Рет қаралды 7 М.
But what is a neural network? | Deep learning chapter 1
18:40
3Blue1Brown
Рет қаралды 18 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Image Classification using CNN Keras | Full implementation
17:56
Learn With Jay
Рет қаралды 198 М.
All Machine Learning algorithms explained in 17 min
16:30
Infinite Codes
Рет қаралды 503 М.
Getting started in scikit-learn with the famous iris dataset
15:26
Data School
Рет қаралды 254 М.
Iris flower dataset classification problem: by using Keras from TensorFlow
28:23
Machine Learning Tutorial Python 12 - K Fold Cross Validation
25:20
Deep Learning with Python, TensorFlow, and Keras tutorial
20:34
sentdex
Рет қаралды 1,3 МЛН
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 212 М.
Tensorflow Tutorial #11 IRIS Dataset Tensorflow/MachineLearning
19:08
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН