Classificazione: bias di previsione
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Come indicato nel
Regressione lineare
modulo, il calcolo
bias di previsione
è un controllo rapido che può segnalare problemi relativi al modello o ai dati di addestramento
all'inizio.
Il bias di previsione è la differenza tra la media
previsioni
e la media di
le etichette per dati empirici reali nella
e i dati di Google Cloud. un modello addestrato su un set di dati
dove il 5% delle email sono spam dovrebbe prevedere, in media, che il 5% dei
le email che classifica sono spam. In altre parole, la media delle etichette nel
è pari a 0, 05 e la media delle previsioni del modello dovrebbe
anche 0,05. In questo caso, il modello non ha bias di previsione. Di
il modello potrebbe avere ancora altri problemi.
Se invece il modello prevede il 50% delle volte che un'email è spam,
si è verificato un problema con il set di dati di addestramento, il nuovo set di dati a cui il modello
oppure con il modello stesso. Qualsiasi
una differenza significativa tra i due mezzi indica che il modello ha
pregiudizi.
I bias di previsione possono essere causati da:
- Differenziazione o rumore nei dati, incluso il campionamento differenziato per il set di addestramento
- Regolarizzazione troppo forte, il che significa che il modello è stato troppo semplificato e ha perso
necessaria una certa complessità
- Bug nella pipeline di addestramento del modello
- L'insieme di caratteristiche fornite al modello non è sufficiente per l'attività
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-08-13 UTC.
[null,null,["Ultimo aggiornamento 2024-08-13 UTC."],[[["\u003cp\u003ePrediction bias, calculated as the difference between the average prediction and the average ground truth, is a quick check for model or data issues.\u003c/p\u003e\n"],["\u003cp\u003eA model with zero prediction bias ideally predicts the same average outcome as observed in the ground truth data, such as a spam detection model predicting the same percentage of spam emails as actually present in the dataset.\u003c/p\u003e\n"],["\u003cp\u003eSignificant prediction bias can indicate problems in the training data, the model itself, or the new data being applied to the model.\u003c/p\u003e\n"],["\u003cp\u003eCommon causes of prediction bias include biased data, excessive regularization, bugs in the training process, and insufficient features provided to the model.\u003c/p\u003e\n"]]],[],null,["# Classification: Prediction bias\n\nAs mentioned in the\n[Linear regression](/machine-learning/crash-course/linear-regression)\nmodule, calculating\n[**prediction bias**](/machine-learning/glossary#prediction_bias)\nis a quick check that can flag issues with the model or training data\nearly on.\n\nPrediction bias is the difference between the mean of a model's\n[**predictions**](/machine-learning/glossary#prediction)\nand the mean of\n[**ground-truth**](/machine-learning/glossary#ground-truth) labels in the\ndata. A model trained on a dataset\nwhere 5% of the emails are spam should predict, on average, that 5% of the\nemails it classifies are spam. In other words, the mean of the labels in the\nground-truth dataset is 0.05, and the mean of the model's predictions should\nalso be 0.05. If this is the case, the model has zero prediction bias. Of\ncourse, the model might still have other problems.\n\nIf the model instead predicts 50% of the time that an email is spam, then\nsomething is wrong with the training dataset, the new dataset the model is\napplied to, or with the model itself. Any\nsignificant difference between the two means suggests that the model has\nsome prediction bias.\n\nPrediction bias can be caused by:\n\n- Biases or noise in the data, including biased sampling for the training set\n- Too-strong regularization, meaning that the model was oversimplified and lost some necessary complexity\n- Bugs in the model training pipeline\n- The set of features provided to the model being insufficient for the task\n\n| **Key terms:**\n|\n| - [Ground truth](/machine-learning/glossary#ground-truth)\n| - [Prediction](/machine-learning/glossary#prediction)\n- [Prediction bias](/machine-learning/glossary#prediction_bias) \n[Help Center](https://support.google.com/machinelearningeducation)"]]