> /DATA-SCIENCE
Data Mining: Prediction & Classification
R assignment building prediction and classification models for property valuation and wheat variety identification, using linear regression, decision trees, and random forests.
View on GitHub// Features08 ITEMS
- Property price prediction via linear regression, stepwise AIC reduction, decision tree, and random forest
- RMSE comparison across all four models to select the best predictor
- Wheat variety classification across three varieties (Canadian, Kama, Rosa)
- LDA assumption checking: multicollinearity, multivariate normality, and homogeneity of covariance
- ROC curve comparison across LDA, two decision tree variants, and random forest
- Outlier detection and removal via ggpairs and jitter facet plots
- Decision tree visualised with rpart.plot to extract key differentiating splits
- Final CSVs exported with .pred / .pred_class columns appended to test data
// Challenges03 LOGGED
CHALLENGE 01
- PROBLEM
- LDA assumptions failed on wheat data despite visually linear class separation
- SOLUTION
- Multicollinearity in size features (length, width, perimeter) and heterogeneous covariances ruled out LDA, multinomial logistic, and Naive Bayes. random forest used instead
CHALLENGE 02
- PROBLEM
- Rushed straight into modelling without exploratory analysis on the property dataset
- SOLUTION
- Iterated across four model types and compared RMSE empirically; random forest won with lowest training RMSE
CHALLENGE 03
- PROBLEM
- Namespace conflict between stats::step and tidymodels step functions
- SOLUTION
- Resolved with explicit stats:: namespace prefix, mirroring C++ scope resolution