К содержанию
Вся база

Product Analyst/DS

10 вопросов · 46 мин · лайв-кодинг · сложность средняя

00:0046:05

Запись — после входа.

О чём разговор

Stratified k-fold split, uneven label counts, shuffling, edge cases, Big-O complexity

Этапы

  1. 1Лайв-кодинг

Все вопросы

  1. 03:58

    If you would like to briefly introduce yourself, then we can jump into that.

    Поведенческий
  2. 05:17

    Our goal is to design and implement a function for stratified k-fold cross-validation: given a list of labels and a number of folds, assign each label to a fold so that the folds have equal lengths and the same label distribution as the original list.

    Код
  3. 27:00

    Why do we need option one? I thought you chose the list of lists, right?

    Код
  4. 27:47

    Can you first verify why this solution is correct?

    Код
  5. 28:53

    Does your code handle a case where the labels are not perfectly divisible, like three dogs and two cats, or how would you go about handling that?

    Код
  6. 32:18

    If you don't specify the seed, the output should change when you rerun it, right?

    Код
  7. 33:23

    Now, what other edge cases can you think of that you can cover?

    Код
  8. 37:44

    Would you like to check the case where you have more than two unique labels, for example dog, cat, and bird?

    Код
  9. 38:50

    Maybe we can now discuss the time and space complexity of the code that you wrote?

    Код
  10. 40:42

    How did you conclude that the two loops together would be O(n)?

    Код

Ключевые моменты

  1. 05:17

    Task setup: stratified k-fold

  2. 28:53

    Indivisible split: three dogs and two cats

  3. 30:31

    Checking the shuffle

  4. 33:23

    Searching for edge cases

  5. 40:42

    Complexity: why two loops give O(n)

Отрывок из разговора

28:53
Interviewer

Now, let's consider the case that the number of dogs and cats or the labels basically, the distinct labels that you have are not perfectly divisible. So in this case, we had four dogs. You could have in each bowl two dogs. And then we had t

29:31
Candidate

Yeah. Let me think about this case. Let me structure my mind. So it's, I mean, my code handled this. And in this case, so your example is like dog, dog, dog, and cat, cat, right?

30:01
Interviewer

Yes, for example.

30:03
Candidate

Yes. My, in this case, the output will be here. the cut okay let me think so the output will be here the fault fault zero is going to be two dogs and one cat fault one is going to be one dog and one cat actually yeah

30:31
Interviewer

so do you want to test your code or even like with the current code do you want to check if the shuffling works properly as well yeah okay so

Что вынести

A 45-minute live-coding round in Python: the candidate wrote a function that assigns labels to folds for stratified k-fold cross-validation, keeping fold sizes equal and class proportions intact. The interviewer tested uneven class splits, shuffling, edge cases (one class, k larger than the number of items, three classes) and time and space complexity. The solution worked and the candidate covered the edge cases, but the O(n) reasoning needed follow-up questions; the recruiter will share the result.

Разбор собран по записи разговора.

Расшифровка

00:00
Interviewer

Thank you. Thank you. All right. I'm going to use the asury of the asury of the oh

01:58
Candidate

Thank you. Hi, how are you? Hi.

02:51
Interviewer

This is name, right?

02:53
Candidate

Yeah, it's name.

02:54
Interviewer

Let me join with you. And nice to meet you. I will allow the note taker just to like the left note taker to join the meeting. Yeah, so I'm I'm name. I'm a data scientist at Lyft. And today's interview will be a coding interview, 45 minutes, I'm going to share a coder pad link with you and they are going to be working on a coding question together. Sure, sure. Yeah. And then the first five minutes we can have a very brief introduction and then I'll share the link with you. And then we can have 35 minutes on the coding part and then the last five minutes for Q&A. Does that sound good?

03:56
Candidate

Sounds great.

03:58
Interviewer

Yeah, thanks. So, yeah, thanks for your time. If you would like to briefly introduce yourself, then we can jump into that.

04:07
Candidate

Sure. My name is name. I will provide a very high-level introduction, so we kind of save our time. So if we will need to talk more, we can talk after. So basically, I'm a senior data scientist. My few last projects were for company and company. it was completely different projects. I was working, I was developing a recommendation system, I was developing an image recognition pipelines with LLM agentic triage. So it's like a part of like usual data science responsibilities when you set up AB test for different critical project features, dashboards, ETL pipelines. So this is like very short summary about me.

04:47
Interviewer

Yes, sounds great. Thank you. So now in the chat, I'll share the coder pad link with you. And then after you open the coder pad, if you could just share your screen.

Дальше — после входа. Это бесплатно и займёт минуту.

Войти и читать

Похожие собеседования

Lyft

Product Analyst/DS

Запись — после входа1:01:54Скрининг

Active rider drop, coupon targeting, A/B test design, commute probabilities, coupon ROI

Вопрос03:22

Monthly active riders dropped 7% month over month. How would you analyze and investigate this issue to understand what's going on?

  • product analytics
  • conversion funnel
  • A/B tests
Английский

Lyft

Product Analyst/DS

Запись — после входа47:35Кейс

Rider experience metrics, trip funnel, ETA target, driver incentives, external factors

Вопрос13:22

How would you structure an approach to identify the right rider experience metrics and set a numerical target for each, and what core experiences would you consider?

  • Product case
  • Marketplace metrics
  • Trip funnel
Английский

Lyft

Product Analyst/DS

Запись — после входа41:26Техническое

Passenger churn model: labels, features, boosting, overfitting, metric and threshold

Вопрос07:17

How are you going to come up with the labels, and are you going to treat it as a binary classification or a regression?

  • ML
  • churn model
  • feature engineering
Английский

USPIO

Product Analyst/DS

Запись — после входа39:00С руководителем

Метрики, антифрод, дисбаланс классов, отбор фичей, разбор проекта-факапа, SMS-платформа

Вопрос01:21

Расскажи о своём опыте, используемых инструментах, подходах, процессах и взаимодействии с командой и стейкхолдерами.

  • Метрики классификации
  • Антифрод
  • Дисбаланс классов
Русский$6 000/ мес