Task for Junior DataScientist @' Iris Classification
TASK # 1:
Iris Flower Classification: There are many appraoches that can be applied to classify the Iris flower dataset such as using a classifier like decision trees. For this task I will have choosen Decision Trees as the classifier as iris dataset classification problem is
- Supervised Learning problem ( the target labels are given)
- Balanced (meaning 50 records from each class so there is no class imblabance),
- Complete ( there are no values that are missing)
Methodology
- Load Iris dataset
- Segregate the data and the labels
- Divide data into train and test, I choose to have a test set of 33% adn a train of 77%. The train to test ratio has effect the accuracy in good and bad ways. The Good way is when the train test ratio let our classifier acchive higher generalization. The bad efect is overfitting when the classifier instead of learning the class concepts memorizes the patterns that belong to the class.
- The Performance of the classifier is evaluated usng
- Accuracy and
- Confusion matrix
TASK # 2:
Natral Language Processing Task: The objective is to use a classifier to segregate the data into sarcastic and non-sarcastic headlines. It is a supervised problem as we know the target label but unlike IRIS flower dataset the data here is textual and not numbers. This makes the pre-processing more chanllenging as we need to use some library like the ntlk text classification which I have used for stop words only. This solution is needs more refine feature extraction for a faster performance.
Methodology
- Load the JSON file
- Splitting into Train and Test
- Filtering the Corpus of Text based on removing the words
- Calculating features for each Token
- training the Naive Bayes Classifier
This solution has a number of issues that can be improved
- The feature extraction process can be optimized to have some feature reduction like a PCA and further represent the feature in a Bit Vector for faster access
- The choice of classifier can be a neural network with back propagation that once trained may be incrementally up trained.
TASK # 3:
SELECT student_id, name, surname, birth_date, faculty FROM student WHERE student_id IN ( SELECT student_id FROM exam_results WHERE grade>4)