Это видео недоступно.
Сожалеем об этом.
Get started with using TensorFlow to solve for regression problems (Coding TensorFlow)
HTML-код
- Опубликовано: 15 авг 2024
- You often have to solve for regression problems when training your machine learning models. In this episode of Coding TensorFlow, Developer Advocate Robert Crowe discusses how to build and train a TensorFlow model using Keras, where you are looking for the model to solve for a single numerical result - in other words, regression.. Learn how to get started on regression problems, and watch to see an example involving miles-per-gallon. This requires our model to examine and learn from the data we provide, in order to predict our final number. Subscribe to the TensorFlow RUclips channel for more! → bit.ly/TensorFlow1
Get the Colab & follow along here → www.tensorflow...
UCI dataset repository → bit.ly/2k2xH8i
Watch more Coding TensorFlow → bit.ly/Coding-...
I learned more from this single video than my entire last semester, looks easy but it has lots of hidden information. Thank you
I totally agree with that
This is a very elegant piece of code. It's worth while to pause and study it.
In 3:14, there is a other way to do the One Hot Encoding using the pandas get_dummies function:
dataset.Origin = dataset.Origin.map({1: 'USA', 2: 'Europe', 3: 'Japan'})
ohe = pd.get_dummies(df.Origin)
dataset = pd.concat([dataset, ohe], axis=1).drop(columns='Origin')
By the way, thanks for the videos!
I like your way of doing it better, thanks!
Normalization does not lead to features between 0-1 rather it puts the features around 0 with std deviation of 1. It gives all the features equal variance so that no weight gets too powerful (around 6 minute mark)
Yes. he used StandardScaler, not MInMax Scaler (which transform data to [0.1])
It's called standardzation in statistics. Data are transformed to how far they are from the mean in number of standard deviations. Everybody who works with ML would benefit from doing a basic statistics course.
More precicely - you get an approximation of a N(0,1) or standard normal distribution with mean expectency at zero and normal function inflexion points at minus one and one. This given all factors/independent variables are continuous. If you have a mix of categorical and continuous variables you have to elaborate.
How can I get a real value as an output? I mean I have real world data now and I get a normalized output, I want the real value
@@juanmas07 You will have to perform multiplying with sigma and addition of mean on every weight and bias to get back real values. By the way, it is just for scaling purposes. If you are going to work only with the back prop value of the new weights learned at the end of each epoch you need to apply the above said method only for those values. Also, scaling only makes sure that your outliers are in scale, so if you are sure that there are no outliers, you do not have to add normalisation. One more thing, normalisation is applied to make sure that we get out algorithm just right. Once, we train and use it on the CV set, we can always use the inputs without normalisation on the Test set. Basically by then your algorithm will fit any kind of outlier very well.
great!! there're too much classification vids, but no regression vids. nice to see this
Agree... this gives a quick start on Regression with TF
i cant give better summary than this in short time. great job! thank you
I'm starting with TensorFlow and the video is amazing, Thanks a lot!
A minor correction: What we did here during preprocessing is Standardization (in terms of Z score) not Normalization (Min-max scaling). great video though!
Splendid lesson, clear lesson. How delicate the way he transmit ideas according python instruction. Love it!
This was so helpful in many ways in my studies. Thank you very much for the easy to understand explanations
I started with learning Tensorflow, ended looking at 1970-s car videos - how did that happen?
Hello! Where can I learn how to color Google ai black and white video on this platform?
If I could, I would categorize RUclips videos into several classes unsupervised: genius, excellent, ordinary, general, and garbage. In this way, humans would not have to waste time on garbage, just like we would not try to solve NP problems.
At 9:30 - overfitting; At smaller sample sizes e.g. via sampling of the total set, least square coefficients could be used as reference estimates (b=inv(X'X)X'y). At 10:40; why not plot the prediction errors to get outliers? And at 10:54, why not explore the residuals? Deviations from the normal distribution usually generates interesting information about the sample. Information that can be used for model improvement.
thanks . it's nice to just explain it quick and let people go back in the code and review. I'll check if you have a classification model as well
Great video!
Two questions;
- Where do you define that you're predicting the MPG and not something else?
- My PrintDot function is not recognized, I get a NameError everytime I try to run the code (im sure there are no typos). Anyone knows what the problem could be?
What do I have to write in order to get the model to estimate the MPG consumption of a single car in this case of a single row? Like throwing in cylinder, weight, etc. and getting out the MPG of my Bugatti Veyron. :D
Thanks in advance, Vito.
This is amazing. Thank you for sharing!
The learning curves showed not just a big gap (overfitting), but were increasing.
I reduced the learning rate from 0.001 to 0.0001 and the initial training then works fine - not really overfitting and the noisy increase had gone...
Sure, early stopping helps and is faster, but the diagnosis was a bit off.
HI, Thank you for this video;
Please why you have chosen 64 for Dense.
Thank you
I appreciate the tutorial, it is great! I have question just to make sure, so the percentage of data used is 64 : 16 : 20 (Training : Validation : Test)? since the validation split is 0.2 or 20% from training data (which is 80% from total data). thanks in advance :)
The tutorial on the site is now in TF 2.0.0
www.tensorflow.org/tutorials/keras/regression
Excelente aula!
This is so precise and informative. Thanks alot
Just what I was looking for!!!
Really liked the calm and cool presenter. Easy to follow and understand.
@@CarlWidigsson exactly
Requesting to make videos on NLP using TF and Deep Learning.. thank you so much for sharing such wonderful videos.
What if you have to perform regression directly from images of the cars instead of using stats of those cars
Link to the colab gives a 404 error...
same
Excellent 👌
Great lector! I love his passion to old cards :)
i have data set wherein the data tells me who is first each class,, if I provide the hole school data the regression model can predict who comes first in each class or in the school as a hole.
Keras is a great high level API !!!
Perfect! This tutorial helped me upgrade my old tensorflow code to use keras. Good tip also about normalizing. That said, for some reason the early_stop callback stops training after about 10 epochs which is way too early!
I think its saying for each epoch at time t, E_t, if E_t < E_t+1, for 10 periods, then stop. 10 epochs in this case makes sense, since he is trying to not get trapped in a local minima.
@ 6:07 min is it normalization or standardization?
I am extremely thankful that you have made a video on regression using tensor flow.
But I request you to please make a video on clustering using tensorflow
Andrew ng says to use regularisation to deal with the problem of overfitting. So what's the difference between early stopping and regularisation?
We can do regularization using early stopping technique too. The other techniques are dropout modeling and L1 or L2 penalization..
Nice tutorial, I tried using Adam optimizer, but the result was not as good as RPMprop(). Also I discovered that a learning rate greater than 0.001 with same 1000 epochs produced a slightly worse result than in the video. Thanks.
Why do we copy the dataset before doing the pre-processing? Why not directly using 'raw_dataset'?
If you have more categorical variables like make and model, etc. would you do onehot encoding for all of them?
Amazing 11 min video!
Great video. Thank you for sharing!
at 6:31 while building model he didn't specified why he took first and second layers with 64 neurons. anyone can please suggest who knows
Why did you choose the z-score to normalise the datasets ?
I don't understand
Thank you for doing it.. it’s good
Great example of usage. I've just started facing ML in those days through a Udemy Course. I'm just in doubt with one thing and I hope I'll get an answer soon: I see nowdays there is some kind of trend of hiding the maths behind those techniques, how much is convenient to study ML like this, even for a Computer Scientist like me (us, I suppose)? I feel like I'm just learning how to use Tensorflow, not ML.
That's because videos like this or courses like "Tensorflow free course Udacity" or udemy course just show you about the industrial tools to implement what a Computer Scientist does. That is truly inconvenient for you. You should know about the math behind it.
@@victornoriega3049 This is all going over my head as a beginner. Do I need to learn about ML first, and then come back and learn how to use Tensor Flow as a tool?
@@SteveRaynerMakes It is like programming: once you understand the essentials of programming, you can just study a little bit of any particular language and you can start developing right after. Well, with ML is the same: once you understand, for example, the difference between supervised and unsupervised learning, what is a regression, neural networks or deep learning, etc, you can use any ML tool easier, in less time and more confident. But the path to take is different for every person: are you a student? you have to get at least the basics of AI. are you an AI professional with no knowledge of deep learning (just machine learning) ? you need to study basic deep learning along with a few tools (such as this and pyspark). are you a professional in other technology area, interested in being a data engineer/ml engineer/data scientist,/ data analyst ? it would depend in which one of these you want to become, but I would recommend to do a bootcamp or something to learn tools and the most basics aspects of the maths so you can get an entry job soon. If you are not in a hurry, you can start developing your math skills.
I applied this model to my regression problem. But loss comes to be quite high. How to choose a correct model for my regression problem?
Thank you very much, really well explained :)
Thanks! Actually great overview of the data pipeline from start to finish! Is there a significant difference with TF 2.0? Also Colab link doesn't work anymore
Hi, how Nash-Sutcliffe efficiency loss function can be used in TensorFlow as you did for MSE?
Thanks. Just for learning purposes and to have it as an example, where is the link to the notebook? I can not find it anywhere.
So I am trying to build a model that will predict the next eruption date of Mt St Helens....would I use this Regression Network?
When I import data I'm getting shape(19,8) and data is not imported properly, can I import through pandas directly and apply tensorflow?
Hi, while trying to remove the origin column using the dataset.pop('Origin') in 3:38 , i get the error AttributeError: 'function' object has no attribute 'Origin'. I'm really new to regression problems using keras, any sort of a hint would be highly appreciated. thanks !
great!!! ihave learnt regression more on here
Great video! Thank you!!!
I'm getting following error. Pls help me:
On code:def norm(x):
return (x - train_stats['mean']) / train_stats['std']
normed_train_data = norm(train_data)
normed_test_data = norm(test_data)
Error-I: TypeError: unsupported operand type(s) for -: 'str' and 'float'
Error-II: UFuncTypeError: ufunc 'subtract' did not contain a loop with signature matching types (dtype('
My plot_loss(history) function isn't returning anything. Anyone have a similar problem?
If you're using different data it could be due to the limits you've set
great tutorial !
Can i have the dataset !
thanks !
now deployment to a html will complete my task, vg and thanks!
What are params? are they neurons? neuron links ? weights? or biases ? no clue. Not to mention what are trainable and non trainable params
I didn't get any thing which one we have to do
Can more than one user work on the same file at the same time on colab, if yes How??
Hi, I am new to Machine learning . I have a question. what if i have a new data that i want to predict how do i go about doing that? like a new entry that is not in the data set. say i have a new car . maza , 4 clyiner , etc..... what do i do to predict that?
do i need to make a brand new data like
brandnew= {maza , 4cylinger)
model.predict { newdata}?
How can I calculate the R^2 value?
is that python?
Hi, where do I download the notebook from? Please can someone provide a link?
Thx for the tutorial.
I have a question though,
Shouldn't we randomise the data first?
colab page not found here
where can i get this notebook?
and.. how does the normalization (standardisation) function even make sense? why the dataframe will match the index of the series automatically?
Link for the notebook is in the video description
Hi , Video Series is good. Is Google colab available for R language ?
Hi Teacher,
one question about categorical "ORIGIN"
The `"Origin"` column is really categorical, not numeric. So convert that to a one-hot.
why we can not train the data using categorical 1,2,3.
If you didn't convert it to one-hot encoded, the machine considers that 1
Very good!!!
if we remove output label form the training data,how will model know which value to predict?
The fit method takes 2 args - training_data_without_labels, training_labels
Now colab workbook is not accessible, its showing 404 error
Here is the updated link: www.tensorflow.org/tutorials/keras/regression
Very, very helpful.
while training the model, it's showing NaN values everywhere. How to resolve this?
you probably have nan values in training and test
i want to built ML model for house price prediction using android app what i can do predict the ML model on tensorflow and deploy on android app??
I guess that first, the model will need to be "refreshed" periodically, since the market values changes from time to time, and be properly build for the kind of house you want to predict the value. Second, you could build the app using some python framework that supports android, as TKinter, I do believe. * I'm sure that are optimized ways to accomplish your goal, though (than the ones I've wrote haha)
great! good good study, day day up!
Which language is that u said ? Golab ?
This is Awesomeness!!!!
Very helpful! Thanks so much!
Thank u for this awesome video
Very helpfull. Thank's
Maybe its a stupid question, but may I know what is a hot-column?
it's one of the ways to encode categorical variables e.g. towardsdatascience.com/categorical-encoding-using-label-encoding-and-one-hot-encoder-911ef77fb5bd
Thank you, very well explained
Excellent presentation ! Thank you !
Thanks for the video. Very interesting. I am quite new to tensorflow/programing and I have a question: Do I need to type all of that code myself from scratch or are there any shortcuts/tricks to load the code, so I can just modify?
Same question here too
You can use this link:
www.tensorflow.org/tutorials/keras/basic_regression
Ignoring a warning just like that? That was odd, coming from TF themselves.
Haha ,that's what I felt too. Afterall Google has depts too and this is a classic problem in any product development org, the engineering team hasn't passed on or trained these front ending folks on the nitty gritties
Great! Thanks Robert
Can u tell me what type of regression is this?is it multiple linear regression or polynomial regression?
when I want to make predictions with other data, now the output is normalized. How can I get a real value as an output?
how is the number of training parameters determined?
the best , thank you so much
Finally!
This is not working see the screenshot: prnt.sc/n2r4us
I am getting the same output. I did a dataset.head() on the output and I see html headers 8-(
📺💬 I see that some questions from the course are hard to do and I see your comment too why we need to split the training and validation data.
🥺💬 Yes, and I confirm that is an understanding basis since they use the MNST database with 60,000 samples and limits by only 15 epoaches, the question right and solution is right but I split the data to reach the question requirement to have at least 95% accuracy within 15 epoaches. ( Only to for the question as basis understanding )
📺💬 โจทย์มึงเวอร์นิดนึงครับ แต่ทำถูกแล้ว 🥺💬 ประมาณนั้นแหละ
📺💬 Splits data training and validation are we able the see how well the data doing in place of the before.
📺💬 model, validation, fit training, and loss optimizers, if you say that and then how do you do with the loss values from validation.
🥺💬 If I answer is to support him reason to poke his student with trick questions but it is the same you do it with accuracy you can do it with validation loss.
📺💬 Loss validation, MAE, MSE Yui stop that ...
🥺💬 Do you understand I do it for apply for work as you see they do it unfair on me when they use violence and support from the company prevent me to have a job when I answer questions on StackOverflow and Google they hired mod to leave me out with same reasons very unfairs I reply his question but he claim me copy his code on the same question and mod agreed no reasons. They keep do it even speaker at office and keep continue on local medias and speakers but I need to find my works then I exame certificate they keep on the same way rushes my actions by speakers that is violence and now they keep try to tell me to stop after many years over 10 they do not when I need only a jobs they tell to give me a jobs when the problem they created is violence somebody deaths, they bets, accidents, guns and what you cannot imagine.
🥺💬 I confirmed 100% my purpose is to find jobs and not related to them to prevent them to do it again this is 4th times and they asking by speakers violence because after midnight or with not good words to stop exames then I stop and keep learning on materials you released.
🥺💬 I confirmed 100% not about them I take exams or watch this materials since they prevent me from working no reasons I need to keep myself potential.
📺💬 Now understand his reason 100% no violence he concern about carrier .
📺💬 We are talking about loss mean-square errors.
actually this was working very slow as compare to my system
Why can't you just embed modules in Python???, well, at least just simplify the installation of packages in python???
From attempts to install TensorFlow, my ancient Soviet computer stopped installing any modules at all, thank you for the broken camputer, I will go to the kidney to buy a computer
You need a better editor for your videos.