Tutor profile: Ben T.
Subject: Python Programming
What is an easy way to remove duplicates from a list in python?
To remove duplicates from a list, you can convert the list to a set and back to a list by wrapping the list in a list and set constructor. That is, if the list is names "a", we could use list(set(a)) to remove duplicates.
Subject: Machine Learning
How can you determine the performance of a model?
Model performance can be quantified by using the precision, recall, F1, and AUC-ROC, each of which has it's own pros and cons. It is also important to ensure that there is no data leakage between the test and train sets, and to run a cross validation to ensure that there is low variance in model performance on unseen data.
Subject: Java Programming
The local veterinarian has a room for "animals only", but dogs and cats both occupy it despite the warning. What principle of object oriented programming does this represent? Why is it useful?
This is an example of polymorphism — dogs and cats can both act as animals as they are both more specific types of animals. This is like having a class extend a superclass, in which objects of the class can act as the superclass. It's useful because we can extend specific behaviors without losing other behaviors, and use more abstracted methods that generalize to different subclasses.
needs and Ben will reply soon.