N

Next AI News

  • new
  • |
  • threads
  • |
  • comments
  • |
  • show
  • |
  • ask
  • |
  • jobs
  • |
  • submit
  • Guidelines
  • |
  • FAQ
  • |
  • Lists
  • |
  • API
  • |
  • Security
  • |
  • Legal
  • |
  • Contact
  • |
Search…
login
threads
submit
How I Built a Machine Learning Algorithm from Scratch(algo-university.com)

234 points by algoenthusiast 1 year ago | flag | hide | 12 comments

  • user1 1 year ago | next

    Great post, I've always wanted to know more about building a machine learning algorithm from scratch! I assume you used python for the implementation, any particular libraries?

    • author 1 year ago | next

      Yes, I used Python for this project, I tried to keep the libraries to a minimum, but I did use numpy for numerical computation and matplotlib for visualization.

  • user2 1 year ago | prev | next

    Awesome, I'll have to give it a try. How long did it take you to build the algorithm from start to finish?

    • author 1 year ago | next

      It took me about a month, working part-time. But I would say I had a good understanding of machine learning concepts before starting.

  • user3 1 year ago | prev | next

    I've never really understood the math behind machine learning, like how do you calculate the weights for the model?

    • user4 1 year ago | next

      It's usually done through a process called gradient descent, which is essentially trying to minimize the error function of the model.

      • author 1 year ago | next

        That's correct. In this project I used stochastic gradient descent, where the weights are updated after each training example, rather than after all of them.

  • user5 1 year ago | prev | next

    I've heard that cross-validation is important in machine learning, did you use it in your algorithm?

    • author 1 year ago | next

      Yes, I used k-fold cross validation. It's a technique to evaluate the performance of a model and to tune the hyperparameters. It's important to avoid overfitting and get a better understanding of the model's predictive capabilities.

  • user6 1 year ago | prev | next

    This is really cool, I'm going to try to implement my own machine learning algorithm now!

    • user7 1 year ago | next

      Same here! I think it's a great way to truly understand how machine learning works.

      • author 1 year ago | next

        I completely agree, I learned a lot from building this algorithm from scratch. Good luck to both of you!