Plain and Simple Estimators
Ғылым және технология
In this episode of AI Adventures, it's time to write some TensorFlow code! We'll build a linear model to recognize different kinds of flowers using a canned estimator.
Learn more through our hands-on labs → goo.gle/2B2f0Kp
Associated Medium post - Plain and Simple Estimators: goo.gl/L2YUbk
Jupyter notebook: jupyter.org/
Code from this episode: goo.gl/ChcaM9
TensorFlow Estimators: goo.gl/r1tZUW
Dataset: goo.gl/UtccyH
Watch more episodes of AI Adventures: goo.gl/UC5usG
Subscribe to get all the episodes as they come out: goo.gl/S0AS51
#AIAdventures
Пікірлер: 102
this video was created with tensorflow V 1.3.0, todays version is 2.9.1. contrib is removed. please consider updating the video.
Hi Yufeng, great video. However, when I tried to code it by hand, or even use the notebook you supplied, I realised that my Tensorflow is version 1.1 instead of 1.3 that you have. And this is in January 2018. Secondly, for a novice, you left out the data files needed for this short exercise. Yes, I understand that this is supposed to be a quick (and dirty) intro. However, the data that I downloaded, has not been wrangled yet. As you use numeric targets, instead of the flower name, can you explain which flower you assigned the value 0, 1 and 2. Lastly, the code to to load the training data does not work, which I suspect has to do with the Iris data file I downloaded from the wiki website. The data preparation is important, and you have left out this stage and not let us know this part of the workflow. Nonetheless, I truly enjoy the series of videos you have created. Thank you.
Wondeful. Looking forward to using Tensor flow soon.
Yufeng, your job is really good in having these videos to teach ML for people. My only advice is to number the videos, so that people like us in Africa will find it easy to follow the videos to learn ML/AI
Awesome series!!! Thanks a lot.
nice series.. looking forward to watch the new video 👍🏻
This is quite a nice intro to ML. I like the idea.
very nice video greate to learn machine learning in simple way
We did the same example in Multivariate Analysis. Really concise and simple to follow video. But how would we do it using images?
Excellent. Brief. Clear. Thoughtfully highlighted and focused presentation. Mr. Guo easily understood.
So basically we need to convert the Species column to integers? When watching this tutorial, somehow I feel like that the csv loading function will convert them into factors by default. If a conversion is required, why isn't the processed data provided for downloading? Thanks
Awesome Playlist!
Great job,man!
It seems that the sessions run through a Estimator are not quite the same as a normal session? For example, `.eval.()` operation and the `tf.nn.sampled_softmax_loss` function do not work, when they do for a normal session. Would love to hear some details on this phenomenon.
How do you create a prediction based on this model ?
Great but could your help me what information i have to study to deeper understand it all?
Very good job !!! Its first time that understand the ML Please go on
Whats the best way to start to get familiar with what is explained in the video? Thanks!
Hello, I have watched your videos and I like it. I try the code in my computer but my TensorFlow version is 2.0 so there is no .contrib module anymore, do you know what module can I use in my TensorFlow?
AWESOME! thanks for this video series.
@yashvardhansharma3899
5 жыл бұрын
Oh thanks
How do you predict, given a single feature (e.g. [6.4, 3.2, 4.5, 1.5]) using classifier.predict()?
Does base.load_csv_with_header takes target as the last column of the table in : base.load_csv_with_header(filename=IRIS_TRAINING, features_dtype=np.float32, target_dtype=np.int)
Hello I really appreciate your job :) I wish if you use little examples for each step and be little slower please.
@robinstraube9335
4 жыл бұрын
jup that was hard to follow if you're new to this
Is there any demo with javascript?
Hi, thanks for the videos. I am new at AI and ML. I am trying to make practice with python 3 as possible as I can. This sample witch you show in the video give me an unexpected error. Where can I put the screan? I cant find an answer online.
@ayushsahu5053
6 жыл бұрын
It'd be easier to help if you would specify the error, sir.
Fantastic!
Why do not work with the cost function in this example?
Is it important to know Tensor Flow and Python Pytorch? Which is more popular and being used by companies in the work force ? Thanks
I cannot grasp the term classifier. Can you elaborate on this term please? Thank you!
Great video! Just one thing, Im using python 3.6 but when reaching the part of code "classifier = tf.estimator.LinearClassifier" it gives me this error "AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'LinearClassifier'"
@user-kz3cw8pm6l
2 жыл бұрын
Where I can study very well
great video.
As some of the functions have become deprecated, can you please update the code? Also, I couldn't find the documentation of tf.estimator.LinearClassifier. Can you please provide the link of the documentation?
@yutaotech1262
5 жыл бұрын
He wears a ring
@SamuelChan
5 жыл бұрын
The deprecated functions to working with CSV can be replaced following the answer here stackoverflow.com/a/52662295/7515530;
what programming language will we use to write that code
@jonathanperez5599
6 жыл бұрын
Python I strongly advise you to install Anaconda yo will be able to install jupyter notebook, numpy and pandas in one step
@ironmantooltime
6 жыл бұрын
jonathan perez good tip
@calvinbernard
5 жыл бұрын
Did he write in R or Python? Also is it possible to jump right into writing machine learning models without fully understanding the basics of Python?(if Python is your choice of language)
@merttemiz7217
5 жыл бұрын
@@calvinbernard It is possible until some level however you better learn the basics if you like to write machine learning(you can check codeacademy or hackerrank)
it would be great if you could explain all lines of code @gcp
do we need python 3 for this?
Wow... superb
Finally... The place to learn ML :)
@th3godfath3r49
2 жыл бұрын
where can I get complete course of ML for free?
for thos interested in grabbing the actual csv files he's referencing in this video they are at the following url: - download.tensorflow.org/data/iris_training.csv - download.tensorflow.org/data/iris_test.csv Thank you Google for this insightful ML tf video.
Thanks very much for the explanation boy!
@PHlophe
6 жыл бұрын
are we being racist now ? unprovoked even ?
@FilippoDeltaecho
6 жыл бұрын
Lechiffresix six no.... why?
Where to download the CSVs? Can anybody tell me how to do that?
@pleabargain
6 жыл бұрын
google the data files... you can find them at github and other places.
@dusanmadar2406
6 жыл бұрын
download.tensorflow.org/data/iris_training.csv, download.tensorflow.org/data/iris_test.csv
Does this example work with Python3?
@AnkitBindal97
6 жыл бұрын
Yes
Very nice intro to ML
I followed this example and it works great BUT... I wanted to predict some values, lets say: [6.4, 3.2, 4.5, 1.5] How can I do that? I tried several ways using classifier.predict() but always got errors. Do someone know how to code a "single" prediction? (please give a working example!)
@nachobagnato
6 жыл бұрын
Sorry, you did not understand my question. I train the whole dataset but I mean That I want to predict a NEW value (a "single prediction" over the trained model). By the way I already solved this!. Thank you for your answer.
@pasanmanula6758
6 жыл бұрын
@nachobagnato , I have the same issue. Could you please tell me how did you manage to solve this problem?
@dominiclapitan8466
6 жыл бұрын
how did you do it?
@JuanRodriguez-mx8vn
5 жыл бұрын
template = (' Prediction is "{}" ({:.1f}%), expected "{}"') for pred_dict, expec in zip(predictions, expected): class_id = pred_dict['class_ids'][0] probability = pred_dict['probabilities'][class_id] print(template.format(iris_data.SPECIES[class_id], 100 * probability, expec))
@JuanRodriguez-mx8vn
5 жыл бұрын
expected = ['Setosa', 'Versicolor', 'Virginica'] predict_x = { 'SepalLength': [5.1, 5.9, 6.9], 'SepalWidth': [3.3, 3.0, 3.1], 'PetalLength': [1.7, 4.2, 5.4], 'PetalWidth': [0.5, 1.5, 2.1], } predictions = classifier.predict( input_fn=lambda:iris_data.eval_input_fn(predict_x, batch_size=args.batch_size))
In addition to knowing AI programming and Python what other languages should we have know for obtaining a job. As a beginner
@LoanwordEggcorn
3 жыл бұрын
Python is probably enough for many jobs. It is one of the world's most popular languages for machine learning and many other things.
Heres the datasets :) download.tensorflow.org/data/iris_test.csv download.tensorflow.org/data/iris_training.csv
Is this still up-to-date?
amazing
Hi can you show a video in detail about this program as I am new in python
@pleabargain
6 жыл бұрын
Python and Jupyter are very powerful... get your Jupyter instance running first... then Python will be much more interesting IMHO.
******** from tensorflow.contrib.learn.python.learn.datasets import base # Data files IRIS_TRAINING = "iris_training.csv" IRIS_TEST = "iris_test.csv" ******** I thought above code would bring in the training and test data . I get this error NotFoundError: NewRandomAccessFile failed to Create/Open: iris_training.csv : The system cannot find the file specified. ; No such file or directory looks like a great class, but cannot follow on my Jupyter notebook.
@actual_random
3 жыл бұрын
yeah they got rid of that module
Sir, i want to learning very basic level machine learning and AI.
I am not sure if I should say I understood. I appreciate your efforts, sadly for a new bee , it could be a hard time understanding what you just taught. You might want to split up the topic into multiple videos and explain elaborately. Nevertheless, your efforts are appreciated.
can you give me iris_traing csv file and also test file
1. Please show how to predict exported model on PC. 2. Please show how to predict model on PC without exporting.
Ugh. The tensorflow.contrib module is redundant now. Sad times
Went to the jupyter notebook and typed what he typed and it didn't work.
@ardithaxhikadrija4534
5 жыл бұрын
which version of python do you have
That code is very difficult to understand....If you can explain the code,it would help
Neat
I'm looking forward to the video that shows the classifiers working in real time e.g. I upload an image and the classifier immediately tells me hot dog | not hot dog.
@shreshthsinha4977
4 жыл бұрын
Can you tell me what language is he using...is it python?
Sir, can u share Ur codes in github. please provide a Github link.
@jt....
6 жыл бұрын
The code is in the description, github is not ideal for downloading a single jupyter notebook. You can download it from the link, they give: nbviewer.jupyter.org/gist/yufengg/a6dff912ab48f7a273f5704ad9ab1311
smart guy
I am eager to learn ML and UI desinging.. I am in progress of creating my own Web app that helps in education. I am a beginner to ML suggest some books, vidoe link, tutors . to make me better.
Nothing understood. I thought this series would be useful but.... not able to understand what you are doing. where's the code to copy and how to download data. Actually are we supposed to do the same thing you did in the video or just watch it
Cool grea
I converted data, now the csv looks like 6.7,3.3,5.7,2.5,0 6.7,3,5.2,2.3,1 6.3,2.5,5,1.9,2 ... training_set = base.load_csv_with_header(filename=IRIS_TRAINING, features_dtype=np.float32, target_dtype=np.int) ValueError: invalid literal for int() with base 10: 'Sepallength' any tip?
牛逼啊!各方面都牛逼!
this material is outdated!!!
No hate but you know what they say, the lower the V the smaller the D. HAHA cheers, great video
I guess this is definitely not for the beginners who is absolute beginner.
estimator is a terriable design