PLEASE SHOW ALL WORK AND COMMENT ALL CODE The Objective of this coding problem is the prediction of a proposed metro ectension construction project based on the people'es opinion. There are three alternatives to choose they are as follows: Eglington-Pickering Line Airport-Vaughn Line Airposrt-Hamilton Line Each record is represented by 16 features. Task-1: Metro-Ext.xlsx is the training and test dataset; you will considerr 80% of the data for training and 20% for the test. Build (1) Logistic regression (2) KNN and (3) Naive Bayes model to predict on the test data set and compute the confusion matrix for each model and compare the result. deliverables = coding files (.py and .ipynb), and a discussions of confusion matrix for both models metro-EXT.xlsx (Please place chart in EXCEL) Feasibility and Constructability Slopes and Gradients Urban Realm Geology and Soil Stability Land Acquisition Work Opportunities Economy in Movement of People Revenue Generation Access to the Social, Recreational and Emergency Services Neighbourhood Acceptance (Sound, Vibration, etc) Improvement of Quality of Life Convenience in Movement of People Protection of the Ecosystem Pollution (Water, Air, Soil, Visual) Control CO2 Emission Control Conservation of Vegetation and Plants 4.1 3.1 3.2 4.3 3.1 3.5 3.3 3.9 3.9 2.8 3.1 3.7 3.1 3.4 2.4 2.9 3.7 2.8 2.9 4.1 3.9 4.5 4.3 3.7 3.6 2.1 3.3 4.3 2.8 2.9 3.0 3.0 4.1 3.2 2.4 3.8 3.4 4.3 4.7 4.2 4.7 1.9 2.4 4.5 3.7 3.6 3.4 2.3 3.6 3.2 2.2 4.0 4.0 4.6 3.9 3.3 4.4 2.0 3.5 3.9 3.2 2.9 2.9 2.4 3.7 3.0 3.3 3.6 4.1 3.5 3.9 3.9 4.8 1.9 3.3 4.2 2.6 2.4 2.6 2.8 3.9 2.5 3.3 4.5 3.5 3.4 3.8 3.7 3.5 1.7 3.0 4.5 3.0 3.5 2.9 2.6 4.8 3.9 2.9 4.5 3.4 4.3 4.5 4.5 3.8 2.0 3.1 4.7 3.1 2.9 2.5 3.7 3.3 3.1 3.0 4.1 4.1 4.4 4.4 3.6 4.0 1.9 2.9 4.1 3.4 2.2 3.7 3.3 4.7 3.3 3.2 3.9 4.0 4.2 4.2 3.8 4.0 2.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2 3.6 3.0 2.5 2.4 1.7 2.2 2.4 3.0 2.5 3.0 2.3 4.2 2.8 3.1 2.3 2.1 2.9 3.4 3.2 3.0 2.2 1.9 1.8 2.7 2.7 3.2 2.4 3.4 2.5 3.3 2.5 1.5 2.9 2.5 3.3 3.8 2.1 2.0 1.8 3.4 2.8 3.1 2.1 4.3 2.7 3.4 2.7 2.5 3.1 2.3 3.1 3.4 1.8 2.3 2.0 3.7 2.7 3.0 2.1 4.8 3.2 3.0 1.9 2.1 2.6 2.4 2.9 2.6 2.0 1.5 1.8 2.9 2.9
PLEASE SHOW ALL WORK AND COMMENT ALL CODE
The Objective of this coding problem is the prediction of a proposed metro ectension construction project based on the people'es opinion. There are three alternatives to choose they are as follows:
- Eglington-Pickering Line
- Airport-Vaughn Line
- Airposrt-Hamilton Line
Each record is represented by 16 features.
Task-1:
Metro-Ext.xlsx is the training and test dataset; you will considerr 80% of the data for training and 20% for the test. Build (1) Logistic regression (2) KNN and (3) Naive Bayes model to predict on the test data set and compute the confusion matrix for each model and compare the result.
deliverables = coding files (.py and .ipynb), and a discussions of confusion matrix for both models
metro-EXT.xlsx (Please place chart in EXCEL)
Feasibility and Constructability | Slopes and Gradients | Urban Realm | Geology and Soil Stability | Land Acquisition | Work Opportunities | Economy in Movement of People | Revenue Generation | Access to the Social, Recreational and Emergency Services | Neighbourhood Acceptance (Sound, Vibration, etc) | Improvement of Quality of Life | Convenience in Movement of People | Protection of the Ecosystem | Pollution (Water, Air, Soil, Visual) Control | CO2 Emission Control | Conservation of Vegetation and Plants |
4.1 | 3.1 | 3.2 | 4.3 | 3.1 | 3.5 | 3.3 | 3.9 | 3.9 | 2.8 | 3.1 | 3.7 | 3.1 | 3.4 | 2.4 | 2.9 |
3.7 | 2.8 | 2.9 | 4.1 | 3.9 | 4.5 | 4.3 | 3.7 | 3.6 | 2.1 | 3.3 | 4.3 | 2.8 | 2.9 | 3.0 | 3.0 |
4.1 | 3.2 | 2.4 | 3.8 | 3.4 | 4.3 |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