Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[el] cs-229-machine-learning-tips-and-tricks #209

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
Philip Düe (translation of deep learning)
Bettina Schlager (review of deep learning)

--el
Stelios Kotzastratis (tranlation of machine learning)

--es
Erick Gabriel Mendoza Flores (translation of deep learning)
Fernando Diaz (review of deep learning)
Expand Down
289 changes: 289 additions & 0 deletions el/cs-229-machine-learning-tips-and-tricks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
**Machine Learning tips and tricks translation** [[webpage]](https://stanford.edu/~shervine/teaching/cs-229/cheatsheet-machine-learning-tips-and-tricks)

<br>

**1. Machine Learning tips and tricks cheatsheet**

&#10230; Μηχανική Μάθηση - σκονάκι με συμβουλές και κόλπα

<br>

**2. Classification metrics**

&#10230; Μετρικές Κατηγοριοποίησης

<br>

**3. In a context of a binary classification, here are the main metrics that are important to track in order to assess the performance of the model.**

&#10230; Αναφορικά με την δυαδική κατηγοριοποίηση, αυτές είναι οι βασικές μετρικές που είναι σημαντικό να παρακολουθεί κανείς όταν θέλει να αξιολογήσει την επίδοση του μοντέλου.

<br>

**4. Confusion matrix ― The confusion matrix is used to have a more complete picture when assessing the performance of a model. It is defined as follows:**

&#10230; Πίνακας Σύγχυσης - Ο πίνακας σύγχυσης (confusion matrix) χρησιμοποιείται για να υπάρχει πλήρης εικόνα στην αξιολόγηση της επίδοσης του μοντέλου. Ορίζεται ως εξής:

<br>

**5. [Predicted class, Actual class]**

&#10230; [Κατηγορία πρόβλεψης, Πραγματική κατηγορία]

<br>

**6. Main metrics ― The following metrics are commonly used to assess the performance of classification models:**

&#10230; Βασικές μετρικές - Οι ακόλουθες μετρικές συχνά χρησιμοποιούνται για να εκτιμήσουν την επίδοση μοντέλων κατηγοριοποίησης.

<br>

**7. [Metric, Formula, Interpretation]**

&#10230; [Μετρική, Τύπος, Επεξήγηση]

<br>

**8. Overall performance of model**

&#10230; Γενική επίδοση του μοντέλου

<br>

**9. How accurate the positive predictions are**

&#10230; Πόσο ακριβείς είναι οι θετικές προβλέψεις

<br>

**10. Coverage of actual positive sample**

&#10230; Κάλυψη του πραγματικού θετικού δείγματος

<br>

**11. Coverage of actual negative sample**

&#10230; Κάλυψη του πραγματικού αρνητικού δείγματος

<br>

**12. Hybrid metric useful for unbalanced classes**

&#10230; Υβριδική μετρική, χρήσιμη για μη ισορροπημένες κατηγορίες

<br>

**13. ROC ― The receiver operating curve, also noted ROC, is the plot of TPR versus FPR by varying the threshold. These metrics are are summed up in the table below:**

&#10230; ROC - Η καμπύλη ROC είναι το γράφημα του ποσοστού αληθώς θετικών αποτελεσμάτων (TPR) έναντι του ποσοστού ψευδώς θετικών αποτελεσμάτων (FPR), με μεταβλητό σύνορο. Αυτές οι μετρικές συνοψίζονται στον παρακάτω πίνακα.

<br>

**14. [Metric, Formula, Equivalent]**

&#10230; [Μετρική, Τύπο, Αντίστοιχο με]

<br>

**15. AUC ― The area under the receiving operating curve, also noted AUC or AUROC, is the area below the ROC as shown in the following figure:**

&#10230; AUC - Η περιοχή κάτω από την καμπύλη ROC, γνωστή ως AUC ή AUROC, είναι η περιοχή κάτω από την ROC καμπύλη όπως φαίνεται στην ακόλουθη εικόνα:

<br>

**16. [Actual, Predicted]**

&#10230; [Πραγματικό, Προβλεφθέν]

<br>

**17. Basic metrics ― Given a regression model f, the following metrics are commonly used to assess the performance of the model:**

&#10230; Βασικές μετρικές - Δεδομένου ενός μοντέλου παλινδρόμησης f, οι ακόλουθες μετρικές συχνά χρησιμοποιούνται για να αξιολογήσουν την επίδοση του μοντέλου:

<br>

**18. [Total sum of squares, Explained sum of squares, Περιθωριακό sum of squares]**

&#10230; [Συνολικό άθροισμα τετραγώγων, Explained άθροισμα τετραγώγων, Συνολικό άθροισμα τετραγώγων]

<br>

**19. Coefficient of determination ― The coefficient of determination, often noted R2 or r2, provides a measure of how well the observed outcomes are replicated by the model and is defined as follows:**

&#10230;

<br>

**20. Main metrics ― The following metrics are commonly used to assess the performance of regression models, by taking into account the number of variables n that they take into consideration:**

&#10230;

<br>

**21. where L is the likelihood and ˆσ2 is an estimate of the variance associated with each response.**

&#10230;

<br>

**22. Model selection**

&#10230; Επιλογή μοντέλου

<br>

**23. Vocabulary ― When selecting a model, we distinguish 3 different parts of the data that we have as follows:**

&#10230; Λεξιλόγιο - Όταν επιλέγουμε ένα μοντέλο, ξεχωρίζουμε τα δεδομένα που έχουμε σε 3 διαφορετικά κομμάτια ως εξής:

<br>

**24. [Training set, Validation set, Testing set]**

&#10230; [Σύνολο εκπαίδευσης, Σύνολο Επικύρωσης, Σύνολο Ελέγχου]

<br>

**25. [Model is trained, Model is assessed, Model gives predictions]**

&#10230; [Το μοντέλο εκπαιδεύεται, Το μοντέλο αξιολογείται, Το μοντέλο κάνει προβλέψεις]

<br>

**26. [Usually 80% of the dataset, Usually 20% of the dataset]**

&#10230; [Συνήθως 80% των δεδομένων, Συνήθως 20% των δεδομένων]

<br>

**27. [Also called hold-out or development set, Unseen data]**

&#10230;

<br>

**28. Once the model has been chosen, it is trained on the entire dataset and tested on the unseen test set. These are represented in the figure below:**

&#10230; Άπαξ και το μοντέλο επιλεγεί, εκπαιδεύεται σε όλο το σύνολο δεδομένων και ελέγχεται στο πρωτοφανές σύνολο ελέγχου. Αυτά αναπαριστώνται στην ακόλουθη εικόνα:

<br>

**29. Cross-validation ― Cross-validation, also noted CV, is a method that is used to select a model that does not rely too much on the initial training set. The different types are summed up in the table below:**

&#10230; Διασταυρωμένη επικύρωση - Η διασταυρωμένη επικύρωση (Cross-validation) ή CV, είναι μια μέθοδος που χρησιμοποιείται για να επιλεχθεί ένα μοντέλο το οποίο δεν βασίζεται υπερβολικά στο αρχικό σύνολο εκπαίδευσης. Οι διάφοροι τύποι συνοψίζονται στον παρακάτω πίνακα:

<br>

**30. [Training on k−1 folds and assessment on the remaining one, Training on n−p observations and assessment on the p remaining ones]**

&#10230;

<br>

**31. [Generally k=5 or 10, Case p=1 is called leave-one-out]**

&#10230;

<br>

**32. The most commonly used method is called k-fold cross-validation and splits the training data into k folds to validate the model on one fold while training the model on the k−1 other folds, all of this k times. The error is then averaged over the k folds and is named cross-validation error.**

&#10230;

<br>

**33. Regularization ― The regularization procedure aims at avoiding the model to overfit the data and thus deals with high variance issues. The following table sums up the different types of commonly used regularization techniques:**

&#10230;

<br>

**34. [Shrinks coefficients to 0, Good for variable selection, Makes coefficients smaller, Tradeoff between variable selection and small coefficients]**

&#10230;

<br>

**35. Diagnostics**

&#10230;

<br>

**36. Bias ― The bias of a model is the difference between the expected prediction and the correct model that we try to predict for given data points.**

&#10230;

<br>

**37. Variance ― The variance of a model is the variability of the model prediction for given data points.**

&#10230;

<br>

**38. Bias/variance tradeoff ― The simpler the model, the higher the bias, and the more complex the model, the higher the variance.**

&#10230;

<br>

**39. [Symptoms, Regression illustration, classification illustration, deep learning illustration, possible remedies]**

&#10230;

<br>

**40. [High training error, Training error close to test error, High bias, Training error slightly lower than test error, Very low training error, Training error much lower than test error, High variance]**

&#10230;

<br>

**41. [Complexify model, Add more features, Train longer, Perform regularization, Get more data]**

&#10230;

<br>

**42. Error analysis ― Error analysis is analyzing the root cause of the difference in performance between the current and the perfect models.**

&#10230;

<br>

**43. Ablative analysis ― Ablative analysis is analyzing the root cause of the difference in performance between the current and the baseline models.**

&#10230;

<br>

**44. Regression metrics**

&#10230;

<br>

**45. [Classification metrics, confusion matrix, accuracy, precision, recall, F1 score, ROC]**

&#10230;

<br>

**46. [Regression metrics, R squared, Mallow's CP, AIC, BIC]**

&#10230;

<br>

**47. [Model selection, cross-validation, regularization]**

&#10230;

<br>

**48. [Diagnostics, Bias/variance tradeoff, error/ablative analysis]**

&#10230;