/r/mlclass

Photograph via snooOG

A Reddit study group for the free online version of the Stanford class "Machine Learning", taught by Andrew Ng.

The purpose of this reddit is to help each other understand the course materials, not to share solutions to assignments. Please follow the Stanford Honor Code.

Check out the studygroups for other Stanford online classes at: /r/aiclass and /r/dbclass

FAQ:

  • I'm a new user to Reddit, how does this site work?

Reddit Help.

  • I have a question about the (class / videos / quiz / homework), how can I get help?

  • Check the current posts, and see if there is already a related discussion, and ask for help there there.

    Otherwise, you can make a self post by going to the submit page, select 'text' and type in a useful title and your question. Don't forget to click on 'mlclass' at the bottom of the form. Read the Reddit submitting help.

  • Is this an official study group?

  • This is NOT the official Stanford study group.

  • When will this class start:

  • Oct. 10 2011 (check the website)

  • What textbook will be used:

  • There is no textbook, all notes are supplied by the lecturer.

    This Reddit group is focused on the Stanford ML class and closely related topics. For news and general discussion of machine learning, please visit /r/MachineLearning.

    Please follow general reddit posting guidelines. Maybe someone has ALREADY answered your question in another post! Searching for keywords in the r/mlclass subreddit will help you find other discussions about your issue.

    /r/mlclass

    4,856 Subscribers

    3

    Numpy Argsort

    0 Comments
    2021/10/22
    21:04 UTC

    1

    Insightful ML Podcast!

    Hey guys! My friends and I have been working on a tech podcast and our latest episode on Machine Learning is out now!

    This week’s episode is on Machine Learning, Artificial Intelligence and Data Science with our speaker Vaidheeswaran Archana who is an Artificial intelligence engineer at Continental and Leadership Fellow at Women Who Code.

    It’ll be great if y’all could check it out and get some amazing insights into the world of ML

    Now streaming on Spotify, Apple Music and all platforms that you love! Listen now:

    https://open.spotify.com/show/7550NpVvaE4pgaOvYo6xCp?si=OG9-FfENQxWjJ9Qd9KAJWw&nd=1

    https://podcasts.apple.com/in/podcast/the-techloop-podcast/id1528881215

    https://reddit.com/link/penu9o/video/fgjolnktejk71/player

    0 Comments
    2021/08/30
    18:19 UTC

    0

    Keras Flatten with a DNN example from scratch in Python

    0 Comments
    2021/08/27
    21:47 UTC

    0

    ModuleNotFoundError: No module named ‘sklearn’

    0 Comments
    2021/08/24
    19:31 UTC

    0

    How to use NumPy Sort

    0 Comments
    2021/08/21
    17:22 UTC

    2

    Least Squares Regression Line

    0 Comments
    2021/08/10
    09:06 UTC

    3

    People working in AI - what steps did you take to get there?

    Hi all, just trying to get a feel for different paths into the field! Any info on courses, self learning, other resources etc. welcome!

    4 Comments
    2021/08/06
    13:03 UTC

    0

    how to calculate cost function J(b1, b0)

    if we have b0 = 5000 and b1 = 200

    how would you calculate the cost function J(b1, b0)

    don't really get this

    0 Comments
    2021/05/01
    02:42 UTC

    0

    Trying to adjust this gradient descent alg to calc sum of squared residuals, but not sure how...Help me?

    def gradient_descent(data, starting_b, starting_m, learning_rate, num_iterations):
    """runs gradient descent

        Args:
            data (np.array): training data, containing x,y
            starting_b (float): initial value of b (random)
            starting_m (float): initial value of m (random)
            learning_rate (float): hyperparameter to adjust the step size during descent
            num_iterations (int): hyperparameter, decides the number of iterations for which gradient descent would run

        Returns:
            list : the first and second item are b, m respectively at which the best fit curve is obtained, the third and fourth items are two lists, which store the value of b,m as gradient descent proceeded.
        """
    # initial values
        b = starting_b
        m = starting_m

    # to store the cost after each iteration
        cost_graph = []

    # to store the value of b -> bias unit, m-> slope of line after each iteration (pred = m*x + b)
        b_progress = []
        m_progress = []

    # For every iteration, optimize b, m and compute its cost
    for i in range(num_iterations):
            cost_graph.append(compute_cost(b, m, data))
            b, m = step_gradient(b, m, array(data), learning_rate)
            b_progress.append(b)
            m_progress.append(m)

    return [b, m, cost_graph,b_progress,m_progress]

    0 Comments
    2020/11/30
    00:06 UTC

    1

    Slightly confused about the best strategy to approach here?

    In order to serve as a strategy against over-fitting, would it be better to impose a minimum number of samples at leaf nodes or is it better to impose a restriction that each leaf node must be pure (as in the instances for each node belong to the same class)?

    1 Comment
    2020/11/18
    17:46 UTC

    1

    I have created a repo which contains only source code for all the classes I took.

    0 Comments
    2020/11/01
    12:59 UTC

    4

    I have created a repo for people who wanted to get started in Machine learning.

    0 Comments
    2020/10/22
    15:50 UTC

    2

    Finding the most optimal value of theta?

    I am slightly confused about a concept but what is the way to find the optimal theta value? Is it through gradient descent?

    I'm in chapter 6 of the course and doing the programming assignment (in python). In Exercise 5 part 2, it required me to use the cost function in the utils.trainLinearReg() function which threw me off.

    Also, If anyone has up to chapter 6 with the python version, would like to ask an additional question or two as well.

    Thanks!

    edit: I think i'm confused about this utils.trainLinearReg() function if anyone could explain what that does to me

    1 Comment
    2020/08/03
    15:39 UTC

    1

    Where to learn and how to built a data driven dynamic pricing model to be used in hotel's revenue management? wich tech is best suited? any papers?

    0 Comments
    2020/07/06
    20:54 UTC

    6

    Without any doubt, gradient descent methods are fundamental when training a neural networks, especially deep neural networks. Here is an attempt on an animated lecture which demystifies this topic. Enjoy !!

    0 Comments
    2020/06/24
    19:21 UTC

    1

    Confused about this github python version of the course (link inside), where to start?

    I'm trying to use this version of the course that translate the octave to python but pretty confused:

    https://github.com/mstampfer/Coursera-Stanford-ML-Python

    I'm confused on which ones are the assignment vs. copies of the text. For example, in week 1, there are many independent .py files such as gradientDescent.py, normalEqn.py, plotData.py BUT also ex1.py that seems to have all of them conbined. Can someone who can make sense of this explain where to start?

    0 Comments
    2020/06/24
    18:11 UTC

    1

    Downloading Course Materials for Stanford ML class (Andrew Ng)

    Can anyone please provide me with a URL where I can download the examples referred to in week 2 of the class, and any other necessary example or assigned problems for the course?

    0 Comments
    2020/06/18
    21:02 UTC

    2

    Can anyone please explain this question?

    Given a set of customer records, you want to identify which customers are similar and whether there are group of customers with similar preferences.

    1- What learning technique you will use to build the machine learning model.?

    2- What data you will be using at input to the model?

    please can anyone explain in detail..

    thanks

    0 Comments
    2020/03/20
    06:07 UTC

    1

    Need help understanding fmincg

    I'm currently on assignment 4, and here is a line of code for the oneVsAll.m file.

    fmincg(@(t)(lrCostFunction(t, X, (y==c),lambda)))

    What do @(t) and t mean?

    1 Comment
    2020/02/26
    07:05 UTC

    1

    Is there a curated list of AI project I can test and interact with on the internet somewhere to have a broad idea of what the tech is capable of?

    2 Comments
    2019/09/25
    06:15 UTC

    3

    Interested in coding a revenue management AI to update best prices for hotels and airbnb accounts. Any idea of where to start or existing project on the topic? (Python preferred)

    0 Comments
    2019/09/21
    21:49 UTC

    5

    Should I use Octave or Online MATLAB for assignments? The course has tutorial for Octave, will that be helpful for MATLAB as well?

    Hi, I enrolled for the sept 2019 batch of professor Andrew's ML course. I am not a programmer but I know some Python and R. The course is using Octave / Online MATLAB and has tutorials on Octave. My question is, should I use Octave (will it be easy, since it has tutorials) or Online MATLAB?

    5 Comments
    2019/09/18
    05:31 UTC

    2

    Anyone has built an AI beauty context jet? Which tools to use to start built one that works by submitting a photo to it and have it ranked?

    0 Comments
    2019/09/13
    22:08 UTC

    3

    The 9 Free Machine Learning Courses from the World-Class Educators

    Machine Learning is everywhere and all the successful companies are employing skilled engineers to apply machine learning methods to optimally improve the personalization of their technologies.

    According to the piece published last year on Forbes about Machine Learning Engineer is the best Job which indicated that the Machine Learning jobs grew 344% between 2015 to 2018 and have an average salary of $146,085. Similarly, the Computer Vision Engineers earn an average salary of $158,303, the highest salaries in tech.

    If you want to learn Machine Learning, then this article about Free Machine Learning Courses will shed some light on how you can intellectually bootstrap your abilities and upgrade your skills to profitability in the rewarding field of Artificial Intelligence.

    0 Comments
    2019/06/20
    16:08 UTC

    0 Comments
    2019/03/23
    06:20 UTC

    1

    [Multivariate linear regression] Once I have found the theta matrix using the Normal function, how do I actually do a prediction?

    I'm using the data from Week 2's ex1data2.txt, which contains a training set of housing prices in Portland, Oregon. The first column is the size of the house (in square feet), the second column is the number of bedrooms, and the third column is the price of the house.

    In python, I computed theta using Normal function:

    def normalFn(X, y, theta):
        temp = np.dot(X.T, X)
        temp = np.linalg.inv(temp)
        temp = np.dot(temp, X.T)
        theta = np.dot(temp, y)
        return theta

    and plotted hypothesis fn which looks to be along the independent variable points.

    I now wanted to use the theta matrix computed to do a prediction. I used independent variables of 3000 and 4 and used the formula h(x) = theta^T.X:

        output = np.dot([1 ,3000 , 4], theta)
        print(output)

    However I got a way large prediction of: [[1.02166919e+09]]

    What am I missing?

    0 Comments
    2019/03/02
    08:34 UTC

    Back To Top