# <a name="ml-coding"></a> 2. ML/Data Coding :robot:
ML coding module may or may not exist in particular companies interviews. The good news is that, there are only a limited number of ML algorithms that candidates are expected to be able to code. The most common ones include:

## ML Algorithms 
- Linear regression ([code](./notebooks/linear_regression.ipynb)) :white_check_mark:

- Logistic regression ([code](./notebooks/logistic_regression.ipynb)) :white_check_mark:
  
- K-means clustering ([code](./notebooks/k_means.ipynb)) :white_check_mark:

- K-nearest neighbors ([code 1](./notebooks/knn.ipynb) - [code 2](https://github.com/MahanFathi/CS231/blob/master/assignment1/cs231n/classifiers/k_nearest_neighbor.py)) :white_check_mark:
  
- Decision trees ([code](./notebooks/decision_tree.ipynb)) :white_check_mark:
  <!-- (https://github.com/random-forests/tutorials/blob/master/decision_tree.py) -->

- Linear SVM ([code](./notebooks/svm.ipynb))
<!-- [link](https://towardsdatascience.com/support-vector-machine-introduction-to-machine-learning-algorithms-934a444fca47)) -->

* Neural networks 
  - Perceptron ([code](./notebooks/perceptron.ipynb)) 
  - FeedForward NN ([code](./notebooks/feedforward.ipynb))
  <!-- [code 1](https://github.com/alirezadir/deep-learning/blob/master/first-neural-network/my_answers.py),  -->
  <!-- [code 2](https://github.com/MahanFathi/CS231/blob/master/assignment1/cs231n/classifiers/neural_net.py)) -->
  - Softmax ([code](./notebooks/softmax.ipynb))
  - Convolution ([code](./notebooks/convolution.ipynb))
  - CNN 
  - RNN 

##  Sampling
  - stratified sampling ([link](https://towardsdatascience.com/the-5-sampling-algorithms-every-data-scientist-need-to-know-43c7bc11d17c))
  - uniform sampling
  - reservoir sampling
  - sampling multinomial distribution
  - random generator
  
## NLP algorithms 
  - bigrams
  - tf-idf

## Other 
  - Random int in range ([link1](https://leetcode.com/discuss/interview-question/125347/generate-uniform-random-integer
), [link2](https://leetcode.com/articles/implement-rand10-using-rand7/))
  - Triangle closing 
  - Meeting point  

## Sample codes
- You can find some sample codes under the [Notebooks]().
