Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Predict Outcomes with Regression Functions in JavaScript

    javascriptJavaScript

    Regression involves analyzing multiple sources of data and predicting a response based off the results of the data. It takes using the k-nearest neighbors algorithm to the next level by choosing a N number of closest neighbors and taking the average between them. Let’s write a function that tries to predict how many pies our restaurant should make today!