Tutte le specialitàTecnologia · Colloquio di lavoro

Machine learning

I colloqui di machine learning mettono alla prova le idee più delle formule. La sfida è spiegare overfitting, metriche e leakage in un inglese parlato semplice, con un esempio per ciascuno.

Parole → espressioni → frasi → parlato

Prova SpeakRole ↗
Colloquio di lavoroMachine learning
V

How do you know a model is good enough to ship?

0:18
Domanda dell’intervistatore

Machine learning

Chi intervista per i ruoli di machine learning di solito mescola teoria e giudizio pratico. Chiede che cosa fa un metodo, ma anche come capiresti che un modello è buono e che cosa può andare storto tra un notebook e un prodotto reale. Molti candidati conoscono gli algoritmi e dimenticano la seconda parte.

Usa uno schema parlato semplice: l'idea in una frase, un piccolo esempio da un problema reale e il rischio principale. Non iniziare dalla matematica. Se l'intervistatore vuole l'equazione, la chiederà, e la tua spiegazione semplice avrà già mostrato che la capisci.

  • ✓Parole → espressioni → frasi → parlato
  • ✓Senso della risposta
  • ✓Lingua

Domande comuni e risposte di esempio

What is the difference between supervised and unsupervised learning?

Qual è la differenza tra apprendimento supervisionato e non supervisionato?

Che cosa vuole sentire l'intervistatore. Etichette contro nessuna etichetta, un esempio realistico per ciascuno e il punto che valutazione e costo dell'etichettatura sono cose diverse.

Risposta di esempio in inglese da esercitare ad alta voce

In supervised learning, we have labelled examples: for each input, we know the right answer, and the model learns to predict it. Examples are predicting customer churn or marking emails as spam. In unsupervised learning, there are no labels, and the model looks for structure on its own, for example grouping customers into segments with clustering. Supervised results are easier to evaluate, because we can compare predictions with the truth. Unsupervised results need a person to judge whether the groups make sense. In practice, I first ask whether I have reliable labels, because getting good labels is often the hardest and most expensive part.

What is overfitting, and how do you deal with it?

Che cos'è l'overfitting e come lo affronti?

Che cosa vuole sentire l'intervistatore. Una definizione chiara, come individuarlo con un validation set e più rimedi, non solo uno.

Risposta di esempio in inglese da esercitare ad alta voce

Overfitting means that the model learns the training data too well, including its noise, so it works well on the training data and badly on new data. The sign is a big gap between the training score and the validation score. To detect it, I always keep a validation set or use cross-validation. To reduce it, I can collect more data, simplify the model, add regularisation, use early stopping or remove noisy features. For trees, I limit the depth. The opposite problem is underfitting: the model is too simple and is bad on both sets. I start with a simple baseline, so I know how much a complex model really adds.

How do you choose an evaluation metric for a classification problem?

Come scegli una metrica di valutazione per un problema di classificazione?

Che cosa vuole sentire l'intervistatore. Perché l'accuracy può ingannare con dati sbilanciati, precision contro recall e un legame con il costo di ciascun errore.

Risposta di esempio in inglese da esercitare ad alta voce

The right metric depends on the cost of each kind of mistake. Accuracy can be misleading when the classes are imbalanced. If only one percent of transactions are fraud, a model that always says "not fraud" is ninety-nine percent accurate and completely useless. So I look at precision and recall. Precision answers: of the cases I flagged, how many were correct? Recall answers: of all the real cases, how many did I find? For fraud or a medical test, I usually want high recall and accept more false alarms. For a spam filter, precision matters more, because blocking a real email is expensive. I choose the threshold together with the business.

What is data leakage, and how do you build features without it?

Che cos'è il data leakage e come costruisci le feature senza?

Che cosa vuole sentire l'intervistatore. Un esempio concreto, l'abitudine di dividere i dati per prima cosa, split basati sul tempo e una domanda da porsi per ogni feature.

Risposta di esempio in inglese da esercitare ad alta voce

Data leakage is when the model gets information during training that it will not have at prediction time. The result is a great score in the notebook and a poor result in production. A common example is a feature that is created after the event, like a refund flag when we predict churn. Another is fitting a scaler on the whole dataset before the split. So I split the data first and do all feature engineering inside a pipeline fitted on the training part only. For time-based problems, I split by time, not randomly. For every feature, I ask: will I know this value at prediction time?

How do you take a model to production and keep it healthy?

Come porti un modello in produzione e lo mantieni in salute?

Che cosa vuole sentire l'intervistatore. Il packaging, il tipo di serving, un rilascio sicuro, il monitoraggio del data drift e un piano per riaddestramento e rollback.

Risposta di esempio in inglese da esercitare ad alta voce

A model in a notebook is only the first step. For production, I package the model together with its preprocessing, version it, and serve it either as an API for real-time predictions or as a batch job. Before the release, I compare it with the current solution, often in shadow mode or with an A/B test. After the release, I monitor the service, like latency and errors, but also the input data and the predictions. The world changes, so the data can drift, and the quality drops silently. I set alerts, keep the option to roll back, and plan retraining. I also make sure that features are calculated in the same way in training and in serving.

Come pronunciare i termini chiave

overfitting
òu-ver-fìt-ing
precision
pri-sìzh-on (la «zh» è la «j» francese di «jour»)
recall
rì-col
regularisation
règ-iu-la-rai-zèi-shon
gradient
grèi-di-ent
variance
vèa-ri-ans
feature
fì-cer

Frasi utili per rispondere

  • It depends on the cost of a false positive and a false negative.Dipende dal costo di un falso positivo e di un falso negativo.
  • First I would build a simple baseline.Per prima cosa costruirei una baseline semplice.
  • The model works well on the training data but not on new data.Il modello funziona bene sui dati di addestramento ma non su dati nuovi.
  • I would check for data leakage.Controllerei se c'è data leakage.
  • We measured it on a held-out test set.L'abbiamo misurato su un test set tenuto da parte.
  • The data may have drifted since we trained the model.I dati potrebbero essere andati in drift da quando abbiamo addestrato il modello.
  • I would validate this with an experiment.Lo validerei con un esperimento.

Errori comuni da evitare

  • Confondere "feature" e "future". Feature si dice FEE-cher, future si dice FYOO-cher, e in questo campo dirai "feature" tutto il giorno.
  • Leggere i numeri in modo poco chiaro. Di' "zero point nine five" o "ninety-five percent", e fai attenzione all'accento in fifteen (fifTEEN) e fifty (FIFty).
  • Citare l'accuracy senza parlare del bilanciamento delle classi. Un'accuracy alta su dati sbilanciati può non significare nulla.
  • Partire da una rete neurale profonda per ogni problema. Per molti problemi con dati tabulari un modello semplice è una baseline solida, e dirlo mostra giudizio.
  • Descrivere il modello ma mai l'obiettivo di business. Di' quale decisione supporta la previsione e come capiresti che ha aiutato.

Domande frequenti

Quanta matematica devo saper spiegare?

Devi saper spiegare l'intuizione dietro i modelli e le funzioni di perdita più comuni e descrivere in modo semplice la discesa del gradiente. Le lunghe derivazioni sono più frequenti nei ruoli di ricerca che in quelli applicati.

Quali strumenti devo citare?

Nomina quelli che hai usato davvero, per esempio scikit-learn, PyTorch o XGBoost, e di' come tracciavi gli esperimenti e le versioni. Un elenco breve e onesto è meglio di uno lungo.

Come parlo di un progetto quando i dati sono riservati?

Descrivi il tipo di problema, il tipo di dati e il tuo approccio senza nomi né cifre esatte. Concentrati sulle tue decisioni: come hai diviso i dati, quale metrica hai scelto e che cosa hai fatto quando il primo modello ha fallito.

Leggere una risposta non è la stessa cosa che dirla. Esercita ogni domanda ad alta voce, poi confronta il significato e la lingua della tua risposta.

Prova SpeakRole ↗

Altri argomenti in quest’area