The Role of MLE The role definition of Machine Learning Engineer varies in different companies. Generally speaking, MLEs from a small to medium size company tend to work around MLOps, sometimes on a production model. They usually collaborate with Applied or Data Scientists in the begining of a new ML service, understanding the data and business needs to create a model. Once the model is formulated, the rest of work will be mostly carried by MLEs.
Read MoreInterview Question 5: Sorting Algorithms
Quick Sort Time Complexity: Best O(nLogn), Worst O(n^2) class QuickSort: def quick_sort(self, arr): if len(arr) > 0: self.sort(arr, 0, len(arr) - 1) else: print('ERROR: input array is empty!') print(arr) def sort(self, arr, left, right): if left < right: partition_key = self.partition(arr, left, right) self.sort(arr, partition_key + 1, right) self.sort(arr, left, partition_key - 1) # Result: # (smaller values), arr[wall], (bigger values) # Return `wall` as the new partition_key. def partition(self, arr, left, right): pivot = arr[right] wall = left for i in range(left, right): if arr[i] < pivot: self.
Read MoreInterview Question 4: Pigeon Hole
1 There are 10 people in a room. Each person shakes hand with 3 other people, what is the total number of handshakes? A Note: we don’t care if person A shakes with B, C, D or E, F, G. But every person reaches out three times. Thus, the total number of hand reach-outs is $$ 10 * 3 = 30 $$ Every 2 reach-outs forms 1 handshake, thus total number of handshakes is 30 / 2 = 15.
Read MoreInterview Question 3: Conditional Probability
1 Q: Given 3 decks of cards, A to K. Randomly pick 1 card from each deck. What is the probability that the 3 cards are in increasing order? A $$ \mathbb{P}(\text{3 different cards} \cap \text{3 increasing values}) = \mathbb{P}(\text{3 different cards}) \times \mathbb{P}(\text{3 increasing values} | \text{3 different cards}) $$ First, make sure the three cards are different, \(\mathbb{P}(\text{3 different cards})\) is \( 1 * \frac{48}{52} * \frac{44}{52} \).
Read MoreInterview Question 2: Central Limit Theorem
1 Q: Roll 100 dice together, what is the probability that the sum of all dice is 400? A Central Limit Theorem: Let \(X_1, X_2,... X_n\) be independent and identically distributed random variables. The sum of these random variables approaches a normal distribution as \(n \rightarrow \infty\) $$ \sum_{i=1}^n X_i \sim N(n \cdot \mu, n \cdot \sigma^2) $$ , where \(\mu = E[X_i]\) and \(\sigma^2 = Var(X_i)\). Let \(X\) be the value of a die.
Read More