July 10th, 2024

Leetcode but for ML

Deep-ML provides machine learning and linear algebra challenges categorized by difficulty and topic. Challenges include covariance matrices, Jacobi method, K-Means clustering, and sigmoid function. Users can track progress by signing up.

Read original articleLink Icon
Leetcode but for ML

The website Deep-ML offers a variety of machine learning and linear algebra code challenges categorized by difficulty and topic. Some of the unsolved challenges include calculating covariance matrices, solving linear equations using the Jacobi method, implementing K-Means clustering, and understanding the sigmoid activation function. Challenges range from easy tasks like matrix transposition to more complex problems such as singular value decomposition and decision tree learning. Users can sign up to attempt these challenges and track their progress.

Related

Linear Algebra 101 for AI/ML

Linear Algebra 101 for AI/ML

Introduction to Linear Algebra for AI/ML emphasizes basic concepts like scalars, vectors, matrices, vector/matrix operations, PyTorch basics, and mathematical notations. Simplified explanations aid beginners in understanding fundamental concepts efficiently.

The History of Machine Learning in Trackmania

The History of Machine Learning in Trackmania

Trackmania, a racing game, inspires machine learning projects aiming for superhuman performance. Players like Rottaca and TMRL use supervised and unsupervised learning. Innovations include track lookahead and diverse learning algorithms. Programs show progress but not human-level skills. The goal is a top-performing AI on a desktop PC, blending gaming and machine learning for innovation.

Beating NumPy's matrix multiplication in 150 lines of C code

Beating NumPy's matrix multiplication in 150 lines of C code

Aman Salykov's blog explores high-performance matrix multiplication in C, surpassing NumPy with OpenBLAS on AMD Ryzen 7700 CPU. Scalable, portable code optimized for modern CPUs with FMA3 and AVX instructions, parallelized with OpenMP for scalability and performance. Discusses matrix multiplication's significance in neural networks, BLAS libraries' role, CPU performance limits, and optimizing implementations without low-level assembly. Mentions fast matrix multiplication tutorials and upcoming GPU optimization post.

Why Use Clojure for Machine Learning?

Why Use Clojure for Machine Learning?

Clojure's functional paradigm benefits machine learning with modular, readable, and predictable code. Leveraging JVM ensures speed and portability. Integration with Java libraries like TensorFlow and PyTorch supports deep learning. Despite being less mature, Clojure shows promise in ML projects.

From the Tensor to Stable Diffusion

From the Tensor to Stable Diffusion

The GitHub repository offers a comprehensive machine learning guide covering deep learning, vision-language models, neural networks, CNNs, RNNs, and paper implementations like LeNet, AlexNet, ResNet, GRU, LSTM, CBOW, Skip-Gram, Transformer, and BERT. Ideal for exploring machine learning concepts.

Link Icon 27 comments
By @TrackerFF - 3 months
No one (well, few professionals at least) will reinvent the wheel when it comes to standard scientific computations and methods. Like numerical math, linear algebra, etc.

Looking through the problem sets in the link, the majority seems to be asking for just that.

If you're wondering whether or not someone knows how to transpose a matrix, or find the eigenvalues, let them do that on the whiteboard. No need to leetcode-ify such problems, because with 99.99% probability they'll provide you with solutions that are subpar compared to industry standard packages. There's more than time and space complexity when it comes to these problems.

EDIT: Also, you'll potentially lose a lot of high-quality candidates if you suddenly start to test people on methods they haven't worked with or seen in quite a while.

If you ask something like "please show us the equations for a support vector machine, and how you can compute a SVM" you could fail even world class ML scientists, if they haven't touched those for 10 years. Which is a very real possibility in the current ML scene.

I'd say that almost every ML interview I've had, or been part of, have been more big picture whiteboard interviews. Specific programming questions have ranked quite low on things to prioritize.

By @bArray - 3 months
This is quite a nice way to learn about ML, props for this!

Edit: I see a lot of people complaining about interviews, but instead I consider this a good resource for checking you understand fundamental principles.

By @esafak - 3 months
The hard part about ML isn't the implementation but the theory. If you're not sure what SVD is how is this going to help? https://www.deep-ml.com/problem/12
By @HiPHInch - 3 months
Thank you for your work! Is there something wrong with: https://www.deep-ml.com/problem/7 ?
By @admissionsguy - 3 months
Looks like a decent problem set to accompany an introductory ML class. No need to get so defensive. However, I thought leetcode meant algorithmic problem solving while the problems here simply ask to implement the various elementary operations.
By @mrits - 3 months
The issue with leetcode type questions is that formally trained and experienced people often could not answer these questions without specifically practicing for them. Most of the topics on this list could be covered in an introduction course.
By @renegade-otter - 3 months
If you have to "study" something for interviews every single time because it's absolutely not relevant to your day job - it's probably bullshit.

Everyone copies the FAANG interview process because it looks cool - except that FAANG is just a welfare program for recent graduates, who indulge in peer interview hazing because they are not doing anything else. They don't study for Leetcode because they want to DO something - they study because of the money. But in a real company you have to DO things.

What has Google done in the last decade that is REALLY useful? Google Gmail and Docs can be maintained by probably 50 people, their search has gotten useless and all they do is kill their own products because maintenance toil is a total drag.

Like the dumb brain teasers that Google "pioneered" in 2000s. How many golf balls can fit in a 747? I don't know, but I can estimate how many can fit up your a...

This Leetcode nonsense will go the way of THAT, in time.

Just no.

By @drfunk - 3 months
Nice project! I have a few qualms with the instructions (sometimes misleading or unclear) and the implementation. For instance some problems fail, because 0. is considered different from 0.0

Using np.testing.assert_allclose in your asserts would solve this I think (https://numpy.org/doc/stable/reference/generated/numpy.testi...).

Happy to contribute / elaborate if you think it's be useful! :)

By @diimdeep - 3 months
I like Code Kata approach, it allows to learn and practice.

But dislike siloed websites like Leetcode where they ask you to bear with their awful web experience, I want to keep my code and notes offline and close in case I need it in a year or 10 years.

Approach with simple test files and exercises is more appealing to me https://github.com/dabeaz-course/python-mastery

So what is the goal here, to be like Leetcode ? or spread knowledge ? If latter, put material as plain markdown and .py files on github repo, we will say thank you.

By @sourabhv - 3 months
While this might be helpful to gain a deeper understanding, but adding a time constraint and making it something that can be asked in an interview sounds painful. Please make this a github repo instead like python_koans
By @sk11001 - 3 months
Typically what happens for ML engineering roles is that you have a regular Leetcode round as for any other SWE position and an additional round with ML questions without coding - there's no ML-specific LC questions. Which is nice as a candidate because it's yet another thing to prepare for, even if the questions are relevant and being able to solve them is kind of neat.
By @mchab - 3 months
Created a discord for anyone that had any recommendations or wants to stay up to date on new questions we are working on https://discord.gg/s4uVTQwk
By @ZoomerCretin - 3 months
The first example is a bit confusing.

Example: input: a = [[1,2],[2,4]], b = [1,2] output:[5, 10] reasoning: 11 + 22 = 5; 12+ 24 = 10

Which 1 and 2 correspond to the 1 and 2 from a and b?

By @MOARDONGZPLZ - 3 months
I haven’t seen anyone ask these types of questions for interviewing for ML positions. They feel like ChatGPT or straight from a textbook. Can you share how you arrived at these questions?
By @sweezyjeezy - 3 months
Edit: previous title was "Leetcode for ML" or somesuch...

I like the idea and might try some! But as a warning: leetcode is specifically aimed at prepping for interviews, and I've never seen questions like these in an interview (I'm somewhere between an MLE and ML researcher FWIW). The most common kinds of ML-specific things in my experience are:

- ML system design (basically everyone does this)

- ML knowledge questions ("explain ADAM etc.")

- probability + statistics knowledge

- ML problem solving in a notebook (quite rare, but some do it)

By @DasCorCor - 3 months
This website is super buggy. Sign up with Google doesn't work. The code editor keeps running in to tabs vs spaces issues. Defaults to 2 space tabs like it is Javascript.
By @iknownthing - 3 months
I'm curious how you run the python code in the browser
By @anualvis - 3 months
Is it down for anyone else too?
By @Xeamek - 3 months
Great resource!
By @kebsup - 3 months
It's sad how a lot of people see this as "a bad way to test job candidates" rather than a "fun way to practice ML skills".
By @htrp - 3 months
Please don't.

Leetcode already ruined so many coding interviews by asking people to do bullshit like

"Output data from a stream in order, make the solution performant"

Why would you ruin ML for us too?

Looking at your site, problem #1 is Multiply a matrix times a vector..... in no universe is that a legitimate ML interview question.

Also ML is such a huge field (everything from statistical learning through to transformer neural networks), I fail to see how you could say your solution tests core skills. If I'm hiring for an ASR Role, it's going to be very different than for a CV role.

By @rty32 - 3 months
My nightmare has finally come true.