-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.R
54 lines (45 loc) · 1.18 KB
/
main.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Main File - Evaluation of Machine Learning models for water quality classification
# Load required libraries
install.packages("plyr")
library(plyr)
install.packages("caret")
library(caret)
install.packages("reshape2")
library(reshape2)
install.packages("FactoMineR")
library(FactoMineR)
install.packages("factoextra")
library(factoextra)
install.packages("rpart")
library(rpart)
install.packages("rattle")
library(rattle)
install.packages("rpart")
library(rpart.plot)
install.packages("RColorBrewer")
library(RColorBrewer)
install.packages("e1071")
library(e1071)
install.packages("naivebayes")
library(naivebayes)
install.packages("ROCR")
library(ROCR)
install.packages("pROC")
library(pROC)
install.packages("kernlab")
library(kernlab)
# Source other files
## Execute data import and cleaning
source("data_import_cleaning.R")
## Perform exploratory data analysis
source("eda.R")
## Train and evaluate decision tree model
source("decision_tree_model.R")
## Train and evaluate SVM model
source("svm_model.R")
## Train and evaluate Naive Bayes model
source("naive_bayes_model.R")
## Evaluate model performance
source("performance_evaluation.R")
## Perform cross-validation
source("cross_validation.R")