What is your current job role?
Machine Learning / AI
Why is the sigmoid function needed in logistic regression? What does it allow to do?
What model would you choose for a binary classification task (vectors from R^n, labels 0 and 1)? Explain why.
Why is LayerNorm applied over the last dimension rather than over the batch?
How will we train the logistic regression? What loss function should we use?
Which techniques are cheaper than human eval (LLM-as-a-judge, model-graded)?
What to do if the points match by timestamp in the lists?
In which direction is the gradient of the function f(x) = 4x + 5 at the point x?
-- 1.1 What will the query output: SELECT campaign, COUNT(*) as rows, COUNT(DISTINCT co.user_id) AS users FROM campaigns AS ca INNER JOIN communications AS co ON ca.campaign = co.campaign GROUP BY ca.campaign AS campaign -- 1.2 How will the answer change if you change the JOIN type to LEFT? -- 1.3 Specify the order of operations in this query. -- 2. The campaigns table was fixed: duplicates removed, primary key added. -- More campaigns were conducted, and due to bugs, users started to have unsuccessful delivery attempts, and some couldn't be shown at all. -- For promotional campaigns sent to users: -- 2.1 Write a query that outputs the number of users who successfully received communication for each campaign. -- 2.2 Modify the query to output: the number of users who ultimately did not receive any successful communication, for each campaign.
From an analytical perspective, what was it? Have you dealt with A/B tests? What metrics did you use?
What is overfitting? How to detect and prevent it?.
-- # -- Marketers launch promo campaigns in the app. There are two tables: -- # -- campaigns - list of campaigns -- # -- - campaign - campaign name -- # -- - action_type - campaign type: "push" or "banner" -- # -- communications - backend log of sending communications of these campaigns to users -- # -- - user_id - user identifier -- # -- - campaign - campaign name -- # -- - status - event status: "success" or "error" -- ------------------------------------------------------------------------------------------------------------------------ -- # -- 1. Initially, the campaigns table has 4 rows: -- # -- | campaign | action_type | -- # -- |-------------|-------------| -- # -- | promo_dogs | push | -- # -- | promo_cats | banner | <- randomly duplicated -- # -- | promo_cats | banner | <- two rows -- # -- | promo_rats | push | # # -- Also known that: -- # -- campaigns promo_dogs and promo_cats were successfully conducted on 100 users each, and each user received one communication, -- # -- while promo_rats is only planned. -- # -- 1.1 What will the query output: SELECT campaign, COUNT(*) as rows, COUNT(DISTINCT co.user_id) AS users FROM campaigns AS ca INNER JOIN communications AS co ON ca.campaign = co.campaign GROUP BY ca.campaign AS campaign -- # -- 1.2 How will the answer change if you change the JOIN type to LEFT? -- # -- 1.3 List the order of execution of the operators in this query. -- Answer: promo_dogs ... ...
How does the presence of multiple zeros in a list affect the solution?
How to express the number of balls in the second basket through the number of balls in the first?
-- 1.1 What will the query output: SELECT campaign, COUNT(*) as rows, COUNT(DISTINCT co.user_id) AS users FROM campaigns AS ca INNER JOIN communications AS co ON ca.campaign = co.campaign GROUP BY ca.campaign AS campaign -- 1.2 How will the answer change if you change the JOIN type to LEFT? -- 1.3 Specify the order of execution of operators in this query. -- 2. The campaigns table has been fixed: duplicates removed, a primary key (PK) added. -- More campaigns have been conducted, due to bugs, users started to have unsuccessful communication delivery attempts, and some couldn't be shown at all. -- Example 1: communications -- | user_id | campaign | status | -- | 1000001 | promo_cats | error | -- | 1000001 | promo_cats | error | -- | 1000001 | promo_cats | success| -- | 1000001 | promo_cats | success| -- | 1000001 | promo_cats | error | -- Example 2: communications -- | user_id | campaign | status | -- | 1000002 | promo_rats | error | -- | 1000002 | promo_rats | error | -- | 1000002 | promo_rats | error | -- | 1000002 | promo_rats | error | -- | 1000002 | promo_rats | error | -- For the promotional campaigns sent to users: -- 2.1 Write a query that outputs the number of users who successfully received communication for each campaign. -- 2.2 Modify the query to output the number of users who did not receive any successful communication at all, for each campaign.
What regularization methods do you know? How does L1 differ from L2?
// Given a sorted array of integers a in non-decreasing order, an index element index, and an integer k. // Return any order of k numbers from the array that are closest in value to the element a[index]. // Constraints: // Array size 1 <= N <= 10^6; // Array elements: -10^9 <= a[i] <= 10^9; // Number 0 <= k <= N; // Index of the element 0 <= index < N. // find_k_closest(a={2, 3, 5, 7, 11}, index=3, k=2) -> {5, 7}
Write the prediction formula for logistic regression.