Coding Challenge #104: Linear Regression with TensorFlow.js

[ad_1]
In this challenge, I use the TensorFlow.js library to create an interactive demonstration of linear regression (with stochastic gradient descent!)

🔗 TensorFlow.js:
🔗 Kaustubh Olpadkar’s tweet:

🎥 Linear Regression with Gradient Descent:
🎥 TensorFlow.js playlist:
🎥 JavaScript Promises playlist:
🎥 ES6 Arrow Function:

🚂 The Coding Train website:
💖 Support this channel on Patreon:
To buy Coding Train merchandise:
📚 Book recommendations:

💻

🎥 For More Intelligence and Learning videos:
🎥 For More Coding Challenges:

🔗
🔗


Posted

in

by

Tags:

Comments

12 responses to “Coding Challenge #104: Linear Regression with TensorFlow.js”

  1. Israr Awan Avatar

    At 7:23, line (linear function) represents the prediction. A point belonging to a line must be labelled as "guess", whereas the original label of every example should be labelled as "y". [Slip of 'marker' maybe] Nice video though. 'Desperately' waiting for Layers API video. 🙂

  2. El Osito Malote Pies Frios Avatar

    Pro, your ability to coding is amazing, you must let the virtual come out to reality, you should program arduino and create a incredible project genetic algorithm neuronal net evolution robot

  3. Luis Miguel Martinez Avatar

    There's something i don't really understand.

    I've made a program similar to this, but on Fortran. When I was taught how to do it, all they said was "you just throw in two vectors with your data, and make the program return two coefficients that plot the line". How is this any faster or more efficient than just making the computer operate with arrays? I don't understand why you specifically need to make them tensors -i assume it is because tf functions only accept tensors as arguments-. Does the implementation of the optimizer as a native function make the execution any faster?

  4. Psylocke Avatar

    do you ever get bored coding? im 17 and i think u have the years of experience same as my age. i'm taking the first baby-steps of coding and i love it but can't do it for long. how do you keep yourself motivated and curious?

  5. Rutger de Graaf Avatar

    lol do you have a green laptop on your left? =) 12:20

  6. Israr Awan Avatar

    There is this pretty cool 'syntax' to define a variable in tensorflow.js. Instead of wrapping the tf.scalar around the tf.variable (13:00), we can actually use chaining. For example: tf.variable(tf.scalar(random (1))) is same as tf.scalar(random(1)).variable(). [As I am reading documentation while watching this video, I thought I should share this "syntactic sugar"]

  7. ShemyDjent Avatar

    Your videos keep getting better. I generally use c++ and c#, but your videos are good for finding fun ideas and useful ideas. Keep it up, man!

  8. ACORAD Avatar

    omg didn't notice it lasted 44 minutes! It was a blast, good video!

  9. Beben n Avatar

    Hooray ! A coding challenge with tensorflow !

  10. Ziv Galili Avatar

    Yayyy! Keep up the good work Daniel

Leave a Reply

Your email address will not be published. Required fields are marked *