Video není dostupné.
Omlouváme se.

Get started with using TensorFlow to solve for regression problems (Coding TensorFlow)

Sdílet
Vložit
  • čas přidán 26. 07. 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 CZcams channel for more! → bit.ly/TensorFlow1
    Get the Colab & follow along here → www.tensorflow.org/tutorials/...
    UCI dataset repository → bit.ly/2k2xH8i
    Watch more Coding TensorFlow → bit.ly/Coding-TensorFlow

Komentáře • 135

  • @aragorngamer3761
    @aragorngamer3761 Před 4 lety +7

    I'm starting with TensorFlow and the video is amazing, Thanks a lot!

  • @jamesthompson1956
    @jamesthompson1956 Před 3 lety +9

    This is a very elegant piece of code. It's worth while to pause and study it.

  • @antimatterwt
    @antimatterwt Před 4 lety +8

    i cant give better summary than this in short time. great job! thank you

  • @MilindParvatia
    @MilindParvatia Před 4 lety +24

    I learned more from this single video than my entire last semester, looks easy but it has lots of hidden information. Thank you

    • @akilaj
      @akilaj Před 3 lety +2

      I totally agree with that

  • @akilaj
    @akilaj Před 3 lety +3

    This was so helpful in many ways in my studies. Thank you very much for the easy to understand explanations

  • @oliverli9630
    @oliverli9630 Před 5 lety +15

    great!! there're too much classification vids, but no regression vids. nice to see this

    • @SanataniAryavrat
      @SanataniAryavrat Před 4 lety

      Agree... this gives a quick start on Regression with TF

  • @asuagar
    @asuagar Před 5 lety +12

    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!

    • @OtterSwims
      @OtterSwims Před 4 lety

      I like your way of doing it better, thanks!

  • @anthonyfernandezgonzalez8262

    Splendid lesson, clear lesson. How delicate the way he transmit ideas according python instruction. Love it!

  • @PatientEbwele
    @PatientEbwele Před 4 lety

    Great video. Thank you for sharing!

  • @haniyamaqsood9238
    @haniyamaqsood9238 Před 3 lety

    This is so precise and informative. Thanks alot

  • @CardioCareWellness
    @CardioCareWellness Před 3 lety

    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

  • @victorsilva9000
    @victorsilva9000 Před 4 lety

    Great video! Thank you!!!

  • @haseebtubing
    @haseebtubing Před 5 měsíci

    This is amazing. Thank you for sharing!

  • @genoalam
    @genoalam Před 5 lety +56

    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)

    • @user-nt1qp2vv5s
      @user-nt1qp2vv5s Před 5 lety +6

      Yes. he used StandardScaler, not MInMax Scaler (which transform data to [0.1])

    • @anselmoufc
      @anselmoufc Před 5 lety +8

      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.

    • @tmusic99
      @tmusic99 Před 5 lety +2

      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.

    • @juanmas07
      @juanmas07 Před 4 lety +2

      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

    • @isingcauseimliving
      @isingcauseimliving Před 3 lety

      @@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.

  • @lukasseifert2228
    @lukasseifert2228 Před 3 lety

    Thank you very much, really well explained :)

  • @MuhammadRizwan-uz8kr
    @MuhammadRizwan-uz8kr Před 5 lety +2

    Keras is a great high level API !!!

  • @kalekalekale
    @kalekalekale Před 5 lety

    Very, very helpful.

  • @antoniofang9535
    @antoniofang9535 Před 5 lety

    great! good good study, day day up!

  • @MrStefanVi
    @MrStefanVi Před 5 lety

    Very helpfull. Thank's

  • @greaterthanbut
    @greaterthanbut Před 4 lety

    This is Awesomeness!!!!

  • @bobsamuelson8130
    @bobsamuelson8130 Před 5 lety

    now deployment to a html will complete my task, vg and thanks!

  • @HilmyMuhammadHilmy
    @HilmyMuhammadHilmy Před 4 lety

    great!!! ihave learnt regression more on here

  • @hsoley
    @hsoley Před 3 lety

    Amazing 11 min video!

  • @jakubbielan4784
    @jakubbielan4784 Před 5 lety +1

    Great lector! I love his passion to old cards :)

  • @betanapallisandeepra
    @betanapallisandeepra Před 2 lety

    Thank you for doing it.. it’s good

  • @notarealhandle123
    @notarealhandle123 Před 4 lety +26

    I started with learning Tensorflow, ended looking at 1970-s car videos - how did that happen?

    • @jimesmith4941
      @jimesmith4941 Před 3 lety

      Hello! Where can I learn how to color Google ai black and white video on this platform?

  • @rafaelpetro7346
    @rafaelpetro7346 Před 5 měsíci

    Excelente aula!

  • @pieterherings5863
    @pieterherings5863 Před 3 lety +2

    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?

  • @richarda1630
    @richarda1630 Před 3 lety

    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

  • @01bit
    @01bit Před 3 lety

    Very good!!!

  • @anuragsharma238
    @anuragsharma238 Před 3 lety +2

    A minor correction: What we did here during preprocessing is Standardization (in terms of Z score) not Normalization (Min-max scaling). great video though!

  • @ranjeetjha1945
    @ranjeetjha1945 Před 5 lety

    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

  • @SanataniAryavrat
    @SanataniAryavrat Před 4 lety +2

    Requesting to make videos on NLP using TF and Deep Learning.. thank you so much for sharing such wonderful videos.

  • @vitotonello261
    @vitotonello261 Před 4 lety +2

    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.

  • @lawrencekrukrubo2640
    @lawrencekrukrubo2640 Před 5 lety

    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.

  • @tmusic99
    @tmusic99 Před 5 lety

    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.

  • @60pluscrazy
    @60pluscrazy Před 2 lety

    Excellent 👌

  • @keitakeita7890
    @keitakeita7890 Před 4 lety +1

    great tutorial !
    Can i have the dataset !
    thanks !

  • @Will-kt5jk
    @Will-kt5jk Před 5 lety

    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.

  • @dlowlow72
    @dlowlow72 Před 2 lety

    If you have more categorical variables like make and model, etc. would you do onehot encoding for all of them?

  • @ajaytaneja111
    @ajaytaneja111 Před 5 lety

    Hi, where do I download the notebook from? Please can someone provide a link?

  • @alvardev07
    @alvardev07 Před 5 lety +6

    Just what I was looking for!!!

    • @CarlWidigsson
      @CarlWidigsson Před 5 lety

      Really liked the calm and cool presenter. Easy to follow and understand.

    • @alvardev07
      @alvardev07 Před 5 lety

      @@CarlWidigsson exactly

  • @surafelm.w4058
    @surafelm.w4058 Před 3 lety

    Hi, how Nash-Sutcliffe efficiency loss function can be used in TensorFlow as you did for MSE?

  • @DimasAnggaFM
    @DimasAnggaFM Před 5 lety +4

    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 :)

    • @Pomme843
      @Pomme843 Před 4 lety +2

      The tutorial on the site is now in TF 2.0.0
      www.tensorflow.org/tutorials/keras/regression

  • @thienanhnguyenbui
    @thienanhnguyenbui Před 4 lety

    Very helpful! Thanks so much!

  • @ehtishamasghar6222
    @ehtishamasghar6222 Před 3 lety

    Thank you, very well explained

  • @tripzero0
    @tripzero0 Před 5 lety

    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!

    • @kylerasmussen4921
      @kylerasmussen4921 Před 5 lety

      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.

  • @kiranbabu4862
    @kiranbabu4862 Před 4 lety

    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.

  • @sifiso5055
    @sifiso5055 Před 5 lety

    Finally!

  • @thedarsideofit
    @thedarsideofit Před 5 lety

    Great! Thanks Robert

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt Před 5 lety +1

    Thank u for this awesome video

  • @juandiegomartinencinas5029

    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.

  • @sassikh4140
    @sassikh4140 Před 5 lety

    the best , thank you so much

  • @samshanmukh
    @samshanmukh Před 5 lety +1

    Andrew ng says to use regularisation to deal with the problem of overfitting. So what's the difference between early stopping and regularisation?

    • @ggtoscano1
      @ggtoscano1 Před 5 lety

      We can do regularization using early stopping technique too. The other techniques are dropout modeling and L1 or L2 penalization..

  • @aomo5293
    @aomo5293 Před rokem

    HI, Thank you for this video;
    Please why you have chosen 64 for Dense.
    Thank you

  • @VLM234
    @VLM234 Před 4 lety

    Can more than one user work on the same file at the same time on colab, if yes How??

  • @DeviKrishna01
    @DeviKrishna01 Před 3 lety

    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 !

  • @mudireddydamodhar8853
    @mudireddydamodhar8853 Před 4 lety

    Hi , Video Series is good. Is Google colab available for R language ?

  • @bloopersbehindthescene4855

    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}?

  • @khan6577
    @khan6577 Před 3 lety

    What if you have to perform regression directly from images of the cars instead of using stats of those cars

  • @JainmiahSk
    @JainmiahSk Před 4 lety

    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?

  • @thamastersmooth
    @thamastersmooth Před 3 lety

    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?

  • @santoshgurujula
    @santoshgurujula Před 5 lety

    if we remove output label form the training data,how will model know which value to predict?

    • @krishnacdunuka
      @krishnacdunuka Před 5 lety

      The fit method takes 2 args - training_data_without_labels, training_labels

  • @chrislam1341
    @chrislam1341 Před 4 lety

    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?

  • @paprila1540
    @paprila1540 Před 3 lety

    Why do we copy the dataset before doing the pre-processing? Why not directly using 'raw_dataset'?

  • @juniormedehou8200
    @juniormedehou8200 Před 3 lety

    Why did you choose the z-score to normalise the datasets ?
    I don't understand

  • @AntiAnd
    @AntiAnd Před 5 lety +2

    Thx for the tutorial.
    I have a question though,
    Shouldn't we randomise the data first?

  • @suneelkumar-ju8up
    @suneelkumar-ju8up Před 4 lety

    I didn't get any thing which one we have to do

  • @rathnakumarv3956
    @rathnakumarv3956 Před rokem

    @ 6:07 min is it normalization or standardization?

  • @tonyaltamura
    @tonyaltamura Před 5 lety

    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.

    • @victornoriega3049
      @victornoriega3049 Před 5 lety

      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.

    • @SteveRaynerMakes
      @SteveRaynerMakes Před rokem

      @@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?

    • @victornoriega3049
      @victornoriega3049 Před rokem

      @@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.

  • @AmandeepSingh-kl5lv
    @AmandeepSingh-kl5lv Před 2 lety

    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

  • @nathanas64
    @nathanas64 Před 4 lety

    Excellent presentation ! Thank you !

  • @NaveenKumar-lb5cx
    @NaveenKumar-lb5cx Před 4 lety

    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?

  • @mortyrick6789
    @mortyrick6789 Před 4 lety +1

    How can I calculate the R^2 value?

  • @maxfelderhoff961
    @maxfelderhoff961 Před 5 lety

    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?

  • @yutao1982
    @yutao1982 Před 4 měsíci

    If I could, I would categorize CZcams 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.

  • @ChuChu-id8cc
    @ChuChu-id8cc Před 5 lety

    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.

    • @sumanth.p2171
      @sumanth.p2171 Před 5 lety

      If you didn't convert it to one-hot encoded, the machine considers that 1

  • @EnryGiga
    @EnryGiga Před 3 lety

    colab page not found here

  • @psml3381
    @psml3381 Před 3 lety

    Which language is that u said ? Golab ?

  • @mohammadjamshaid9556
    @mohammadjamshaid9556 Před 4 lety

    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??

    • @skatenaveia2
      @skatenaveia2 Před 4 lety

      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)

  • @rijuldimri8356
    @rijuldimri8356 Před 4 lety

    while training the model, it's showing NaN values everywhere. How to resolve this?

    • @froozynoobfan
      @froozynoobfan Před 4 lety

      you probably have nan values in training and test

  • @kimogandall8298
    @kimogandall8298 Před 3 lety +1

    My plot_loss(history) function isn't returning anything. Anyone have a similar problem?

    • @EmileHeskeyfication
      @EmileHeskeyfication Před 3 lety +2

      If you're using different data it could be due to the limits you've set

  • @dhananjaykansal8097
    @dhananjaykansal8097 Před 4 lety

    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('

  • @cyphusvii4484
    @cyphusvii4484 Před 3 lety +1

    Link to the colab gives a 404 error...

  • @donutrangerr
    @donutrangerr Před 4 lety

    Maybe its a stupid question, but may I know what is a hot-column?

    • @yuuuu4896
      @yuuuu4896 Před 4 lety

      it's one of the ways to encode categorical variables e.g. towardsdatascience.com/categorical-encoding-using-label-encoding-and-one-hot-encoder-911ef77fb5bd

  • @juanmas07
    @juanmas07 Před 4 lety

    when I want to make predictions with other data, now the output is normalized. How can I get a real value as an output?

  • @strcyt777
    @strcyt777 Před 2 lety

    Now colab workbook is not accessible, its showing 404 error

    • @TensorFlow
      @TensorFlow  Před 2 lety

      Here is the updated link: www.tensorflow.org/tutorials/keras/regression

  • @thetruereality2
    @thetruereality2 Před 3 lety

    What are params? are they neurons? neuron links ? weights? or biases ? no clue. Not to mention what are trainable and non trainable params

  • @theja63
    @theja63 Před 5 lety +4

    Ignoring a warning just like that? That was odd, coming from TF themselves.

    • @Skandawin78
      @Skandawin78 Před 5 lety

      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

  • @tlhermit
    @tlhermit Před 3 lety

    Can u tell me what type of regression is this?is it multiple linear regression or polynomial regression?

  • @facundosepulveda3473
    @facundosepulveda3473 Před 3 lety

    how is the number of training parameters determined?

  • @unnikrishnanadoor
    @unnikrishnanadoor Před 5 lety

    This is not working see the screenshot: prnt.sc/n2r4us

    • @mikebailey2970
      @mikebailey2970 Před 5 lety

      I am getting the same output. I did a dataset.head() on the output and I see html headers 8-(

  • @Jirayu.Kaewprateep
    @Jirayu.Kaewprateep Před rokem

    📺💬 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.

  • @venkateshpathi8860
    @venkateshpathi8860 Před 4 lety

    actually this was working very slow as compare to my system

  • @masteronepiece6559
    @masteronepiece6559 Před 5 lety +1

    You need a better editor for your videos.

  • @user-sd6uw9bw5f
    @user-sd6uw9bw5f Před 3 lety

    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