Fine if you remember to index the summation properly.
State the dot product formula clearly using correct notation: for vectors u = (u₁, ..., uₙ) and v = (v₁, ..., vₙ) in Rⁿ, the dot product is u·v = Σᵢ₌₁ⁿ uᵢvᵢ. Then briefly mention that this is equivalent to the matrix product uᵀv, and note its geometric interpretation as ‖u‖‖v‖cosθ.
Pro tip: Since this is for an ML Engineer role at UiPath, connect the formula to practical applications like computing cosine similarity in embeddings or attention scores in transformers, showing you understand its relevance beyond the math.
Clearly state that u and v are vectors in Rⁿ, and denote their components as u₁, ..., uₙ and v₁, ..., vₙ.
Present the dot product as u·v = Σᵢ₌₁ⁿ uᵢvᵢ, ensuring correct index and limits.
Show the expanded version: u·v = u₁v₁ + u₂v₂ + ... + uₙvₙ, to reinforce understanding.
Note that u·v = uᵀv, where u and v are treated as column vectors, linking to linear algebra operations.
Briefly state that u·v = ‖u‖‖v‖cosθ, and relate it to ML applications like cosine similarity or attention mechanisms.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
I blanked for a second on whether the denominator uses the product of the norms or the norm of the product.
Start by defining cosine similarity as the cosine of the angle between two vectors, then present the formula clearly. Explain each component (dot product, norms) and mention that it measures orientation, not magnitude, with values in [-1, 1].
Pro tip: Mention that cosine similarity is equivalent to the dot product of L2-normalized vectors, which is useful for efficient computation in large-scale ML systems. Also note that it's invariant to scaling, making it ideal for text data where document length varies.
State that cosine similarity measures the cosine of the angle between two non-zero vectors, indicating how similar their directions are.
Present the formula: cos(θ) = (u · v) / (||u|| ||v||), where u · v is the dot product and ||u||, ||v|| are the Euclidean norms.
Clarify that the dot product captures alignment, while the norms normalize for vector length, making the measure scale-invariant.
Mention that the value ranges from -1 (opposite) to 1 (identical direction), with 0 indicating orthogonality.
Relate to use cases like text similarity, recommendation systems, and embedding comparisons, highlighting its role in high-dimensional spaces.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
These felt like warmup but they still checked that you had the square root in L2 and absolute values in L1.
Start by clearly stating the formulas for Euclidean and Manhattan distances between two points in a d-dimensional space. Then, briefly explain the intuition behind each and mention their relevance in machine learning, such as in clustering, nearest neighbor search, and loss functions.
Pro tip: Emphasize that the choice of distance metric depends on the data and problem; for example, Manhattan distance is more robust to outliers and works well for high-dimensional sparse data, while Euclidean is common for continuous, low-dimensional data.
Let the two points be p = (p1, p2, ..., pd) and q = (q1, q2, ..., qd) in a d-dimensional space.
Euclidean distance: sqrt(sum_{i=1}^d (pi - qi)^2). This is the L2 norm of the difference vector.
Manhattan distance: sum_{i=1}^d |pi - qi|. This is the L1 norm of the difference vector.
Euclidean measures straight-line distance; Manhattan measures grid-like path distance. Mention applications: Euclidean in K-means, PCA; Manhattan in robust regression, L1 regularization, and high-dimensional text data.
Both are special cases of Minkowski distance: (sum |pi - qi|^p)^(1/p) for p=2 and p=1 respectively. Discuss computational considerations and sensitivity to outliers.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
Start by clearly stating the Mean Squared Error (MSE) formula: MSE = (1/n) * Σ_{i=1}^{n} (y_i - ŷ_i)^2. Then briefly explain each component and why squaring is used, and optionally mention its role as a loss function in regression.
Pro tip: Emphasize that MSE is sensitive to outliers due to squaring, and that it's differentiable, making it suitable for gradient-based optimization. This shows deeper understanding beyond the formula.
Write the MSE formula clearly: MSE = (1/n) * Σ_{i=1}^{n} (y_i - ŷ_i)^2. Ensure correct notation for predictions and targets.
Define n as the number of samples, y_i as the true target, and ŷ_i as the predicted value. Mention that the sum is over all samples.
Explain that squaring penalizes larger errors more and ensures positive values, avoiding cancellation between positive and negative errors.
Highlight that MSE is differentiable and convex, making it suitable for optimization. Note its sensitivity to outliers.
Mention that MSE is commonly used as a loss function in regression tasks and can be extended to other metrics like RMSE.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
Start by clearly defining the MSE loss function for a single training example, then apply the chain rule to compute the gradients with respect to w and b. Show each step of the derivation, and finally express the results in a form that generalizes to multiple examples.
Pro tip: Emphasize that the gradient with respect to w is proportional to the input x, which means features with larger magnitudes get larger updates—this motivates feature scaling. Also, mention that the factor of 2 in the derivative is often absorbed into the learning rate, a common practice in deep learning frameworks.
Write the MSE for a single example: L = (1/2)(y - ŷ)^2, where ŷ = w·x + b. Explain that the 1/2 is for convenience in differentiation.
Define the error as e = (ŷ - y) or (y - ŷ) and note that the derivative of the loss with respect to ŷ is (ŷ - y).
Compute ∂L/∂w = ∂L/∂ŷ * ∂ŷ/∂w = (ŷ - y) * x. For multiple examples, sum or average over the batch.
Compute ∂L/∂b = ∂L/∂ŷ * ∂ŷ/∂b = (ŷ - y) * 1 = (ŷ - y). For multiple examples, sum or average over the batch.
Extend to N examples: ∂L/∂w = (1/N) Σ (ŷ_i - y_i) x_i and ∂L/∂b = (1/N) Σ (ŷ_i - y_i). Mention that these are used in gradient descent updates.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
Start by clearly stating both formulas, using standard notation. Then briefly explain the purpose of each: min-max for scaling to a fixed range, z-score for standardizing to mean 0 and variance 1. Finally, mention when to use each and any caveats.
Pro tip: Mention that min-max is sensitive to outliers, while z-score assumes a roughly Gaussian distribution and is less affected by outliers. Also note that z-score can produce values outside [0,1], which is fine for many algorithms but not for those requiring bounded inputs.
Write the formula: x' = (x - min(x)) / (max(x) - min(x)). Explain that it scales values to the range [0, 1].
Write the formula: x' = (x - μ) / σ, where μ is the mean and σ is the standard deviation. Explain that it centers data around 0 with unit variance.
Min-max preserves the shape of the original distribution but bounds values; z-score standardizes but does not bound values. Mention that min-max is affected by outliers, while z-score is more robust.
Use min-max when you need values in a specific range (e.g., for neural networks with sigmoid activation). Use z-score when algorithms assume normally distributed data (e.g., PCA, linear models with regularization).
Note that both should be computed on training data and applied to test data. Also mention that z-score can be used with any distribution but is most effective when data is roughly Gaussian.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
They called it a bonus but it felt like they expected it.
Start by writing the sigmoid function and its derivative, then the softmax function and its derivative (using the Jacobian matrix), and finally the binary cross-entropy formula. Explain each step briefly, emphasizing the mathematical properties and their relevance to ML. If time permits, mention numerical stability and computational considerations.
Pro tip: When deriving the softmax derivative, express it in terms of the softmax outputs themselves (using the Kronecker delta) to show you understand the elegant self-referential property. Also, mention that binary cross-entropy is often used with sigmoid output for binary classification, and note the log-sum-exp trick for numerical stability.
Write σ(x) = 1/(1+e^{-x}) and its derivative σ'(x) = σ(x)(1-σ(x)). Explain that this derivative is efficient to compute because it reuses the forward pass output.
Write softmax(z)_i = e^{z_i} / Σ_j e^{z_j}. For the derivative, provide the Jacobian: ∂softmax_i/∂z_j = softmax_i (δ_{ij} - softmax_j). Mention that this is a matrix for multi-class outputs.
Write BCE(y, ŷ) = -[y log(ŷ) + (1-y) log(1-ŷ)]. Explain that it measures the dissimilarity between true labels and predicted probabilities, and is commonly used with sigmoid activation.
Mention numerical stability (e.g., log-sum-exp trick for softmax, clipping probabilities in BCE) and computational efficiency (vectorization, avoiding overflow).
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.