Это видео недоступно.
Сожалеем об этом.

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

Комментарии • 135

  • @MilindParvatia
    @MilindParvatia 4 года назад +25

    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 3 года назад +2

      I totally agree with that

  • @jamesthompson1956
    @jamesthompson1956 3 года назад +9

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

  • @asuagar
    @asuagar 5 лет назад +11

    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 4 года назад

      I like your way of doing it better, thanks!

  • @genoalam
    @genoalam 5 лет назад +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 5 лет назад +6

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

    • @anselmoufc
      @anselmoufc 5 лет назад +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 5 лет назад +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 4 года назад +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 3 года назад

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

  • @oliverli9630
    @oliverli9630 5 лет назад +15

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

    • @SanataniAryavrat
      @SanataniAryavrat 4 года назад

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

  • @antimatterwt
    @antimatterwt 4 года назад +8

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

  • @aragorngamer3761
    @aragorngamer3761 4 года назад +7

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

  • @anuragsharma238
    @anuragsharma238 3 года назад +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!

  • @anthonyfernandezgonzalez8262
    @anthonyfernandezgonzalez8262 4 года назад +5

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

  • @akilaj
    @akilaj 3 года назад +3

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

  • @notarealhandle123
    @notarealhandle123 4 года назад +26

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

    • @jimesmith4941
      @jimesmith4941 3 года назад

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

  • @yutao1982
    @yutao1982 4 месяца назад

    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.

  • @tmusic99
    @tmusic99 5 лет назад

    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.

  • @CardioCareWellness
    @CardioCareWellness 3 года назад

    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

  • @pieterherings5863
    @pieterherings5863 3 года назад +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?

  • @vitotonello261
    @vitotonello261 4 года назад +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.

  • @haseebtubing
    @haseebtubing 6 месяцев назад

    This is amazing. Thank you for sharing!

  • @Will-kt5jk
    @Will-kt5jk 5 лет назад

    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.

  • @aomo5293
    @aomo5293 Год назад

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

  • @DimasAnggaFM
    @DimasAnggaFM 5 лет назад +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 4 года назад +2

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

  • @rafaelpetro7346
    @rafaelpetro7346 5 месяцев назад

    Excelente aula!

  • @haniyamaqsood9238
    @haniyamaqsood9238 3 года назад

    This is so precise and informative. Thanks alot

  • @alvardev07
    @alvardev07 5 лет назад +6

    Just what I was looking for!!!

    • @CarlWidigsson
      @CarlWidigsson 5 лет назад

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

    • @alvardev07
      @alvardev07 5 лет назад

      @@CarlWidigsson exactly

  • @SanataniAryavrat
    @SanataniAryavrat 4 года назад +2

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

  • @khan6577
    @khan6577 3 года назад

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

  • @cyphusvii4484
    @cyphusvii4484 3 года назад +1

    Link to the colab gives a 404 error...

  • @60pluscrazy
    @60pluscrazy 2 года назад

    Excellent 👌

  • @jakubbielan4784
    @jakubbielan4784 5 лет назад +1

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

  • @kiranbabu4862
    @kiranbabu4862 4 года назад

    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.

  • @MuhammadRizwan-uz8kr
    @MuhammadRizwan-uz8kr 5 лет назад +2

    Keras is a great high level API !!!

  • @tripzero0
    @tripzero0 5 лет назад

    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 5 лет назад

      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.

  • @rathnakumarv3956
    @rathnakumarv3956 Год назад

    @ 6:07 min is it normalization or standardization?

  • @ranjeetjha1945
    @ranjeetjha1945 5 лет назад

    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

  • @samshanmukh
    @samshanmukh 5 лет назад +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 5 лет назад

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

  • @lawrencekrukrubo2640
    @lawrencekrukrubo2640 5 лет назад

    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.

  • @paprila1540
    @paprila1540 3 года назад

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

  • @dlowlow72
    @dlowlow72 2 года назад

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

  • @hsoley
    @hsoley 3 года назад

    Amazing 11 min video!

  • @PatientEbwele
    @PatientEbwele 4 года назад

    Great video. Thank you for sharing!

  • @AmandeepSingh-kl5lv
    @AmandeepSingh-kl5lv 2 года назад

    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

  • @juniormedehou8200
    @juniormedehou8200 4 года назад

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

  • @betanapallisandeepra
    @betanapallisandeepra 2 года назад

    Thank you for doing it.. it’s good

  • @tonyaltamura
    @tonyaltamura 5 лет назад

    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 5 лет назад

      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 Год назад

      @@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 Год назад

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

  • @NaveenKumar-lb5cx
    @NaveenKumar-lb5cx 4 года назад

    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?

  • @lukasseifert2228
    @lukasseifert2228 3 года назад

    Thank you very much, really well explained :)

  • @richarda1630
    @richarda1630 3 года назад

    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

  • @surafelm.w4058
    @surafelm.w4058 3 года назад

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

  • @juandiegomartinencinas5029
    @juandiegomartinencinas5029 3 года назад

    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.

  • @thamastersmooth
    @thamastersmooth 3 года назад

    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?

  • @JainmiahSk
    @JainmiahSk 4 года назад

    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?

  • @DeviKrishna01
    @DeviKrishna01 3 года назад

    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 !

  • @HilmyMuhammadHilmy
    @HilmyMuhammadHilmy 4 года назад

    great!!! ihave learnt regression more on here

  • @victorsilva9000
    @victorsilva9000 4 года назад

    Great video! Thank you!!!

  • @dhananjaykansal8097
    @dhananjaykansal8097 5 лет назад

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

  • @kimogandall8298
    @kimogandall8298 3 года назад +1

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

    • @EmileHeskeyfication
      @EmileHeskeyfication 3 года назад +2

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

  • @keitakeita7890
    @keitakeita7890 4 года назад +1

    great tutorial !
    Can i have the dataset !
    thanks !

  • @bobsamuelson8130
    @bobsamuelson8130 5 лет назад

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

  • @thetruereality2
    @thetruereality2 3 года назад

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

  • @suneelkumar-ju8up
    @suneelkumar-ju8up 4 года назад

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

  • @VLM234
    @VLM234 4 года назад

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

  • @bloopersbehindthescene4855
    @bloopersbehindthescene4855 5 лет назад

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

  • @mortyrick6789
    @mortyrick6789 4 года назад +1

    How can I calculate the R^2 value?

  • @ajaytaneja111
    @ajaytaneja111 5 лет назад

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

  • @AntiAnd
    @AntiAnd 5 лет назад +2

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

  • @EnryGiga
    @EnryGiga 3 года назад

    colab page not found here

  • @chrislam1341
    @chrislam1341 4 года назад

    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?

  • @mudireddydamodhar8853
    @mudireddydamodhar8853 4 года назад

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

  • @ChuChu-id8cc
    @ChuChu-id8cc 5 лет назад

    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 5 лет назад

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

  • @01bit
    @01bit 3 года назад

    Very good!!!

  • @santoshgurujula
    @santoshgurujula 5 лет назад

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

    • @krishnacdunuka
      @krishnacdunuka 5 лет назад

      The fit method takes 2 args - training_data_without_labels, training_labels

  • @strcyt777
    @strcyt777 2 года назад

    Now colab workbook is not accessible, its showing 404 error

    • @TensorFlow
      @TensorFlow  2 года назад

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

  • @kalekalekale
    @kalekalekale 5 лет назад

    Very, very helpful.

  • @rijuldimri8356
    @rijuldimri8356 4 года назад

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

    • @froozynoobfan
      @froozynoobfan 4 года назад

      you probably have nan values in training and test

  • @mohammadjamshaid9556
    @mohammadjamshaid9556 4 года назад

    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 4 года назад

      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)

  • @antoniofang9535
    @antoniofang9535 5 лет назад

    great! good good study, day day up!

  • @psml3381
    @psml3381 3 года назад

    Which language is that u said ? Golab ?

  • @greaterthanbut
    @greaterthanbut 4 года назад

    This is Awesomeness!!!!

  • @thienanhnguyenbui
    @thienanhnguyenbui 4 года назад

    Very helpful! Thanks so much!

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 5 лет назад +1

    Thank u for this awesome video

  • @MrStefanVi
    @MrStefanVi 5 лет назад

    Very helpfull. Thank's

  • @donutrangerr
    @donutrangerr 4 года назад

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

    • @yuuuu4896
      @yuuuu4896 4 года назад

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

  • @ehtishamasghar6222
    @ehtishamasghar6222 3 года назад

    Thank you, very well explained

  • @nathanas64
    @nathanas64 4 года назад

    Excellent presentation ! Thank you !

  • @maxfelderhoff961
    @maxfelderhoff961 5 лет назад

    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?

  • @theja63
    @theja63 5 лет назад +4

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

    • @Skandawin78
      @Skandawin78 5 лет назад

      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

  • @thedarsideofit
    @thedarsideofit 5 лет назад

    Great! Thanks Robert

  • @tlhermit
    @tlhermit 3 года назад

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

  • @juanmas07
    @juanmas07 4 года назад

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

  • @facundosepulveda3473
    @facundosepulveda3473 3 года назад

    how is the number of training parameters determined?

  • @sassikh4140
    @sassikh4140 5 лет назад

    the best , thank you so much

  • @sifiso5055
    @sifiso5055 5 лет назад

    Finally!

  • @unnikrishnanadoor
    @unnikrishnanadoor 5 лет назад

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

    • @mikebailey2970
      @mikebailey2970 5 лет назад

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

  • @Jirayu.Kaewprateep
    @Jirayu.Kaewprateep Год назад

    📺💬 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 5 лет назад

    actually this was working very slow as compare to my system

  • @user-sd6uw9bw5f
    @user-sd6uw9bw5f 3 года назад

    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

  • @masteronepiece6559
    @masteronepiece6559 5 лет назад +1

    You need a better editor for your videos.