├── Bivariate Plots ├── bi1.png ├── bi10.png ├── bi11.png ├── bi12.png ├── bi13.png ├── bi14.png ├── bi2.png ├── bi3.png ├── bi4.png ├── bi5.5.png ├── bi5.png ├── bi6.png ├── bi7.png ├── bi8.png └── bi9.png ├── Docs ├── Plots │ ├── bi_box.gif │ ├── bi_sc.gif │ ├── bi_vio.gif │ ├── mul_bar.gif │ ├── mul_box.gif │ ├── mul_box2.gif │ ├── mul_sc.gif │ ├── reg.gif │ ├── uni_bar.gif │ └── uni_box.gif ├── Presentation of Analysis.pptx ├── Report.pdf └── achitecture.png ├── Multivariate Plots ├── mp1.png ├── mp10.png ├── mp11.png ├── mp12.png ├── mp13.png ├── mp15.png ├── mp16.1.png ├── mp16.2.png ├── mp17.png ├── mp18.png ├── mp19.png ├── mp2.png ├── mp20.png ├── mp21.png ├── mp22.png ├── mp23.png ├── mp24.png ├── mp25.png ├── mp26.png ├── mp3.png ├── mp4.png ├── mp5.png ├── mp6.png ├── mp7.png ├── mp8.png └── mp9.png ├── R Scripts ├── bivariate_analysis.r ├── multi_variable_regression.r ├── multivariate_analysis.r ├── regression_analysis.r └── univariate_analysis.r ├── README.md ├── Regression Plots ├── corr.png ├── pred.png ├── reg1.png ├── reg2.png ├── reg3.png ├── reg4.png ├── reg5.png └── reg6.png ├── Univariate Plots ├── box5.png ├── box6.png ├── box8.png ├── box9.png ├── hist.png ├── hist2.png ├── hist3.png ├── hist3_.png ├── hist4.png └── hist7.png ├── indian-auto-mpg.csv └── validate.csv /Bivariate Plots/bi1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi1.png -------------------------------------------------------------------------------- /Bivariate Plots/bi10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi10.png -------------------------------------------------------------------------------- /Bivariate Plots/bi11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi11.png -------------------------------------------------------------------------------- /Bivariate Plots/bi12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi12.png -------------------------------------------------------------------------------- /Bivariate Plots/bi13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi13.png -------------------------------------------------------------------------------- /Bivariate Plots/bi14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi14.png -------------------------------------------------------------------------------- /Bivariate Plots/bi2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi2.png -------------------------------------------------------------------------------- /Bivariate Plots/bi3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi3.png -------------------------------------------------------------------------------- /Bivariate Plots/bi4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi4.png -------------------------------------------------------------------------------- /Bivariate Plots/bi5.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi5.5.png -------------------------------------------------------------------------------- /Bivariate Plots/bi5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi5.png -------------------------------------------------------------------------------- /Bivariate Plots/bi6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi6.png -------------------------------------------------------------------------------- /Bivariate Plots/bi7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi7.png -------------------------------------------------------------------------------- /Bivariate Plots/bi8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi8.png -------------------------------------------------------------------------------- /Bivariate Plots/bi9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Bivariate Plots/bi9.png -------------------------------------------------------------------------------- /Docs/Plots/bi_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/bi_box.gif -------------------------------------------------------------------------------- /Docs/Plots/bi_sc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/bi_sc.gif -------------------------------------------------------------------------------- /Docs/Plots/bi_vio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/bi_vio.gif -------------------------------------------------------------------------------- /Docs/Plots/mul_bar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/mul_bar.gif -------------------------------------------------------------------------------- /Docs/Plots/mul_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/mul_box.gif -------------------------------------------------------------------------------- /Docs/Plots/mul_box2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/mul_box2.gif -------------------------------------------------------------------------------- /Docs/Plots/mul_sc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/mul_sc.gif -------------------------------------------------------------------------------- /Docs/Plots/reg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/reg.gif -------------------------------------------------------------------------------- /Docs/Plots/uni_bar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/uni_bar.gif -------------------------------------------------------------------------------- /Docs/Plots/uni_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Plots/uni_box.gif -------------------------------------------------------------------------------- /Docs/Presentation of Analysis.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Presentation of Analysis.pptx -------------------------------------------------------------------------------- /Docs/Report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/Report.pdf -------------------------------------------------------------------------------- /Docs/achitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Docs/achitecture.png -------------------------------------------------------------------------------- /Multivariate Plots/mp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp1.png -------------------------------------------------------------------------------- /Multivariate Plots/mp10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp10.png -------------------------------------------------------------------------------- /Multivariate Plots/mp11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp11.png -------------------------------------------------------------------------------- /Multivariate Plots/mp12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp12.png -------------------------------------------------------------------------------- /Multivariate Plots/mp13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp13.png -------------------------------------------------------------------------------- /Multivariate Plots/mp15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp15.png -------------------------------------------------------------------------------- /Multivariate Plots/mp16.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp16.1.png -------------------------------------------------------------------------------- /Multivariate Plots/mp16.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp16.2.png -------------------------------------------------------------------------------- /Multivariate Plots/mp17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp17.png -------------------------------------------------------------------------------- /Multivariate Plots/mp18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp18.png -------------------------------------------------------------------------------- /Multivariate Plots/mp19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp19.png -------------------------------------------------------------------------------- /Multivariate Plots/mp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp2.png -------------------------------------------------------------------------------- /Multivariate Plots/mp20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp20.png -------------------------------------------------------------------------------- /Multivariate Plots/mp21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp21.png -------------------------------------------------------------------------------- /Multivariate Plots/mp22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp22.png -------------------------------------------------------------------------------- /Multivariate Plots/mp23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp23.png -------------------------------------------------------------------------------- /Multivariate Plots/mp24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp24.png -------------------------------------------------------------------------------- /Multivariate Plots/mp25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp25.png -------------------------------------------------------------------------------- /Multivariate Plots/mp26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp26.png -------------------------------------------------------------------------------- /Multivariate Plots/mp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp3.png -------------------------------------------------------------------------------- /Multivariate Plots/mp4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp4.png -------------------------------------------------------------------------------- /Multivariate Plots/mp5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp5.png -------------------------------------------------------------------------------- /Multivariate Plots/mp6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp6.png -------------------------------------------------------------------------------- /Multivariate Plots/mp7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp7.png -------------------------------------------------------------------------------- /Multivariate Plots/mp8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp8.png -------------------------------------------------------------------------------- /Multivariate Plots/mp9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Multivariate Plots/mp9.png -------------------------------------------------------------------------------- /R Scripts/bivariate_analysis.r: -------------------------------------------------------------------------------- 1 | library(plotly) 2 | 3 | auto_data = read.csv("C://Users/subha/Desktop/Visualization & Analysis on Automobile Dataset using Machine Learning in R/indian-auto-mpg.csv") 4 | 5 | 6 | 7 | fig <- plot_ly(y = auto_data$Mileage.Km.L, x=auto_data$Engine.CC, 8 | marker = list(line = list(width = 1))) %>% 9 | layout(xaxis = list(title = "Engine CC"), 10 | yaxis = list(title = "Mileage Km/L")) 11 | 12 | 13 | fig <- plot_ly(y = auto_data$Mileage.Km.L, x=auto_data$Power, 14 | marker = list(color="#e2594e")) %>% 15 | layout(xaxis = list(title = "Power Hp"), 16 | yaxis = list(title = "Mileage Km/L")) 17 | 18 | 19 | fig <- plot_ly(y = auto_data$Price, x=auto_data$Year, 20 | marker = list(color="rgba(0,205,149, 1)")) %>% 21 | layout(xaxis = list(title = "Year"), 22 | yaxis = list(title = "Price")) 23 | 24 | fig <- plot_ly(y = auto_data$Kilometers_Driven, x=auto_data$Year,ttype="scatter", 25 | marker = list(color="#8b0d86")) %>% 26 | layout(xaxis = list(title = "Year"), 27 | yaxis = list(title = "Distance Driven")) 28 | 29 | 30 | fig <- plot_ly(y = auto_data$Price, x=auto_data$Engine.CC, type="scatter", 31 | marker = list(color="#e0812c")) %>% 32 | layout(xaxis = list(title = "Engine CC"), 33 | yaxis = list(title = "Price")) 34 | 35 | fig <- plot_ly(y = auto_data$Price, x=auto_data$Power, type="scatter", 36 | marker = list(color="#f3da2d")) %>% 37 | layout(xaxis = list(title = "Power Hp"), 38 | yaxis = list(title = "Price")) 39 | 40 | fig <- plot_ly(y = auto_data$Power, x=auto_data$Engine.CC, type="scatter", 41 | marker = list(color="#9932CC")) %>% 42 | layout(xaxis = list(title = "Engine"), 43 | yaxis = list(title = "Power")) 44 | 45 | 46 | fig <- plot_ly(y = auto_data$Mileage.Km.L, color=auto_data$Fuel_Type, type="box") %>% 47 | layout(xaxis = list(title = "Fuel Type"), 48 | yaxis = list(title = "Mileage Km/L")) 49 | 50 | fig <- plot_ly(y = auto_data$Mileage.Km.L, color=auto_data$Transmission, type="box") %>% 51 | layout(xaxis = list(title = "Transmission Type"), 52 | yaxis = list(title = "Mileage Km/L")) 53 | 54 | fig <- plot_ly(y = auto_data$Mileage.Km.L, color=auto_data$Owner_Type, 55 | type="box",colors = "viridis") %>% 56 | layout(xaxis = list(title = "Ownership"), 57 | yaxis = list(title = "Mileage Km/L")) 58 | 59 | fig <- plot_ly(y = auto_data$Mileage.Km.L, color=as.factor(auto_data$Seats), 60 | type="violin", colors = "plasma") %>% 61 | layout(xaxis = list(title = "Number of Seats"), 62 | yaxis = list(title = "Mileage")) 63 | 64 | 65 | fig <- plot_ly(y = auto_data$Price, color=auto_data$Fuel_Type, type="box") %>% 66 | layout(xaxis = list(title = "Fuel Type"), 67 | yaxis = list(title = "Price")) 68 | 69 | 70 | fig <- plot_ly(y = auto_data$Price, color=auto_data$Transmission, type="violin") %>% 71 | layout(xaxis = list(title = "Transmission Type"), 72 | yaxis = list(title = "Price")) 73 | 74 | 75 | fig <- plot_ly(y = auto_data$Price, color=auto_data$Owner_Type, 76 | type="box",colors = "viridis") %>% 77 | layout(xaxis = list(title = "Ownership"), 78 | yaxis = list(title = "Price")) 79 | 80 | fig <- plot_ly(y = auto_data$Price, color=as.factor(auto_data$Seats), 81 | type="violin", colors = "plasma") %>% 82 | layout(xaxis = list(title = "Number of Seats"), 83 | yaxis = list(title = "Price")) 84 | 85 | 86 | fig 87 | -------------------------------------------------------------------------------- /R Scripts/multi_variable_regression.r: -------------------------------------------------------------------------------- 1 | library(caTools) 2 | library(caret) 3 | library(fastDummies) 4 | library(plotly) 5 | 6 | 7 | auto_data = read.csv("C://Users/subha/Desktop/Visualization & Analysis on Automobile Dataset using Machine Learning in R/indian-auto-mpg.csv") 8 | 9 | 10 | 11 | # Cleaning Data 12 | new_df = auto_data 13 | new_df %>% filter(Seats>0) -> new_df 14 | new_df %>% filter(Mileage.Km.L>0) -> new_df 15 | new_df %>% filter(Price<70) -> new_df 16 | new_df = new_df[3:14] 17 | new_df = new_df[,-2] 18 | 19 | new_df$Price = new_df$Price*100000 20 | 21 | # Checking 22 | sum(is.na(auto_data))==0 23 | 24 | 25 | # Creating dummy variables for categorical variables 26 | new_df <- dummy_cols(new_df, 27 | select_columns = c('Manufacturer','Fuel_Type', 28 | 'Transmission','Owner_Type'), 29 | remove_selected_columns = TRUE) 30 | 31 | auto_data = new_df 32 | 33 | 34 | 35 | # Train Test Split 36 | sample.split(auto_data$Price, SplitRatio = 0.85) -> split_tag 37 | subset(auto_data, split_tag==T) -> train 38 | subset(auto_data, split_tag==F) -> test 39 | 40 | 41 | # Building Linear Regression Model 42 | ML_Model = train(Price ~ .+poly(Power,5)+poly(Engine.CC,5)+poly(Year,5)+poly(Seats,5), 43 | data = auto_data, method = "lm",na.action = na.omit, 44 | preProcess=c("scale","center"), 45 | trControl= trainControl(method="none")) 46 | 47 | 48 | # Prediction 49 | test_pred_data = predict(ML_Model, newdata = test) 50 | pred_data = cbind(Actual=test$Price/100000, Predicted=test_pred_data/100000) 51 | pred_df = as.data.frame(pred_data) 52 | error = (pred_df$Actual-pred_df$Predicted) 53 | pred_df = cbind(pred_df,error) 54 | rmse = sqrt(mean(error^2)) 55 | 56 | 57 | # Plotting Prediction vs Actual values 58 | fit <- lm(Predicted ~ Actual, data = pred_df) 59 | 60 | pred_df %>% plot_ly(x = ~Actual) %>% 61 | add_markers(y = ~Predicted, name="Scatter") %>% 62 | add_lines(x = ~Actual, y = fitted(fit), name="Regression Line")%>% 63 | layout(xaxis = list(title = "Actual"), 64 | yaxis = list(title = "Predicted")) 65 | 66 | 67 | validate_df = read.csv("C://Users/subha/Desktop/Visualization & Analysis on Automobile Dataset using Machine Learning in R/validate.csv") 68 | val_pred_df = predict(ML_Model, newdata = validate_df) 69 | 70 | predict_data = cbind(Actual=validate_df$Price/100000, Predicted=predict_df/100000) 71 | val_pred_df = as.data.frame(predict_data) 72 | error = (val_pred_df$Actual-val_pred_df$Predicted) 73 | val_pred_df = cbind(val_pred_df,error) 74 | rmse = sqrt(mean(error^2)) 75 | 76 | -------------------------------------------------------------------------------- /R Scripts/multivariate_analysis.r: -------------------------------------------------------------------------------- 1 | library(plotly) 2 | 3 | 4 | auto_data = read.csv("C://Users/subha/Desktop/Visualization & Analysis on Automobile Dataset using Machine Learning in R/indian-auto-mpg.csv") 5 | 6 | 7 | fig <- plot_ly(auto_data, x = ~Location, color = ~Fuel_Type, colors = "viridis") %>% add_histogram()%>% 8 | layout(xaxis = list(title = "Car Count"), 9 | yaxis = list(title = "City")) 10 | 11 | fig <- plot_ly(auto_data, x = ~Location, color = ~Transmission, colors=c("#636efa","#ef553b")) %>% add_histogram()%>% 12 | layout(xaxis = list(title = "Car Count"), 13 | yaxis = list(title = "City")) 14 | 15 | fig <- plot_ly(auto_data, x = ~Location, color = ~Owner_Type, colors="Dark2") %>% add_histogram()%>% 16 | layout(xaxis = list(title = "Car Count"), 17 | yaxis = list(title = "City")) 18 | 19 | 20 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 21 | type = "scatter",color = ~Manufacturer,colors="Set2", 22 | mode = "markers",marker = list(size = 10)) %>% 23 | layout(xaxis = list(title = "Engine CC"), 24 | yaxis = list(title = "Mileage Km/L")) 25 | 26 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 27 | type = "scatter",color = ~Year,colors="viridis", 28 | mode = "markers",marker = list(size = 10)) %>% 29 | layout(xaxis = list(title = "Engine CC"), 30 | yaxis = list(title = "Mileage Km/L")) 31 | 32 | 33 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 34 | type = "scatter",color = ~Fuel_Type, colors = "Set1", 35 | mode = "markers",marker = list(size = 7)) %>% 36 | layout(xaxis = list(title = "Engine CC"), 37 | yaxis = list(title = "Mileage Km/L")) 38 | 39 | 40 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Power, 41 | type = "scatter",color = ~Year, colors="plasma", 42 | mode = "markers",marker = list(size = 7)) %>% 43 | layout(xaxis = list(title = "Power HP"), 44 | yaxis = list(title = "Mileage Km/L")) 45 | 46 | 47 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Power, 48 | type = "scatter",color = ~Fuel_Type,colors="Dark2", 49 | mode = "markers",marker = list(size = 7)) %>% 50 | layout(xaxis = list(title = "Power HP"), 51 | yaxis = list(title = "Mileage Km/L")) 52 | 53 | 54 | fig <- plot_ly(data = auto_data, y = ~Price, x=~Power, 55 | type = "scatter",color = ~Manufacturer, 56 | mode = "markers",marker = list(size = 10)) %>% 57 | layout(xaxis = list(title = "Power"), 58 | yaxis = list(title = "Price")) 59 | 60 | 61 | fig <- plot_ly(data = auto_data, y = ~Price, x=~Power, 62 | type = "scatter",color = ~Year,colors="inferno", 63 | mode = "markers",marker = list(size = 10)) %>% 64 | layout(xaxis = list(title = "Power"), 65 | yaxis = list(title = "Price")) 66 | 67 | 68 | fig <- plot_ly(data = auto_data, y = ~Price, x=~Power, 69 | type = "scatter",color = ~Fuel_Type ,colors="Dark2", 70 | mode = "markers") %>% 71 | layout(xaxis = list(title = "Power"), 72 | yaxis = list(title = "Price")) 73 | 74 | 75 | fig <- plot_ly(data = auto_data, y = ~Price, x=~Power,colors=c("#ee644e","#646ef8"), 76 | type = "scatter",color = ~Transmission, 77 | mode = "markers") %>% 78 | layout(xaxis = list(title = "Power"), 79 | yaxis = list(title = "Price")) 80 | 81 | 82 | 83 | fig <- plot_ly(data = auto_data, y = ~Kilometers_Driven, x=~Year, 84 | type = "scatter",color = ~Fuel_Type ,colors="Dark2", 85 | mode = "markers", symbol = ~Transmission) %>% 86 | layout(xaxis = list(title = "Year"), 87 | yaxis = list(title = "Distance Driven")) 88 | 89 | 90 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 91 | type = "scatter",color = ~Fuel_Type,colors="Spectral", 92 | mode = "markers",symbol = ~Transmission, 93 | symbols = c('triangle-up','x'),marker = list(size = 7)) %>% 94 | layout(xaxis = list(title = "Engine CC"), 95 | yaxis = list(title = "Mileage Km/L")) 96 | 97 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 98 | type = "scatter",color = ~Fuel_Type,colors="Spectral", 99 | mode = "markers",symbol = ~Transmission, 100 | symbols = c('triangle-up','x'),marker = list(size = 7)) %>% 101 | layout(xaxis = list(title = "Engine CC"), 102 | yaxis = list(title = "Mileage Km/L")) 103 | 104 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 105 | type = "scatter",color = ~Power,colors="plasma", 106 | symbol = ~Transmission,symbols = c('star','circle'), 107 | mode = "markers",marker = list(size = 7)) %>% 108 | layout(xaxis = list(title = "Engine CC"), 109 | yaxis = list(title = "Mileage Km/L")) 110 | 111 | fig <- plot_ly(data = auto_data, y = ~Mileage.Km.L, x=~Engine.CC, 112 | type = "scatter",color = ~Seats,colors="viridis", 113 | symbol = ~Transmission,symbols = c('star','circle'), 114 | mode = "markers",marker = list(size = 7)) %>% 115 | layout(xaxis = list(title = "Engine CC"), 116 | yaxis = list(title = "Mileage Km/L")) 117 | 118 | 119 | 120 | fig <- plot_ly(data = auto_data,y = ~Mileage.Km.L, x=~Fuel_Type, 121 | color=~Transmission,colors = "Set2" ,type="box") %>% 122 | layout(boxmode = "group", 123 | xaxis = list(title = "Fuel Type"), 124 | yaxis = list(title = "Mileage Km/L")) 125 | 126 | fig <- plot_ly(data = auto_data,y = ~Engine.CC, x=~Fuel_Type, 127 | color=~Transmission,type="box") %>% 128 | layout(boxmode = "group", 129 | xaxis = list(title = "Fuel Type"), 130 | yaxis = list(title = "Engine Capacity")) 131 | 132 | fig <- plot_ly(data = auto_data,y = ~Power, x=~Fuel_Type, 133 | color=~Transmission,colors = c("#e78ac3","#a6cee3"), type="box") %>% 134 | layout(boxmode = "group", 135 | xaxis = list(title = "Fuel Type"), 136 | yaxis = list(title = "Power (Hp)")) 137 | 138 | 139 | fig <- plot_ly(data = auto_data,y = ~Mileage.Km.L, x=~Seats, 140 | color=~Transmission,colors = c("#fb8072","#bc80bd"), type="box") %>% 141 | layout(boxmode = "group", 142 | xaxis = list(title = "Seats"), 143 | yaxis = list(title = "Mileage")) 144 | 145 | fig <- plot_ly(data = auto_data,y = ~Power, x=~Seats, 146 | color=~Transmission, colors=c("#6684ca","#ffd92f") ,type="box") %>% 147 | layout(boxmode = "group", 148 | xaxis = list(title = "Seats"), 149 | yaxis = list(title = "Power")) 150 | 151 | 152 | fig <- plot_ly(data = auto_data,y = ~Price, x=~Fuel_Type, 153 | color=I(~Transmission), colors=c("#ef553b","#00cc96") ,type="violin") %>% 154 | layout(violinmode = 'group', 155 | xaxis = list(title = "Fuel Type"), 156 | yaxis = list(title = "Price")) 157 | fig <- plot_ly(data = auto_data,y = ~Price, x=~Owner_Type, 158 | color=I(~Transmission), colors="Dark2" ,type="violin") %>% 159 | layout(violinmode = 'group', 160 | xaxis = list(title = "Owner Type"), 161 | yaxis = list(title = "Price")) 162 | 163 | 164 | 165 | fig <- auto_data %>% plot_ly(type = 'violin') 166 | fig <- fig %>% add_trace(x = ~Fuel_Type[auto_data$Transmission == 'Automatic'], 167 | y = ~Price[auto_data$Transmission == 'Automatic'], 168 | legendgroup = 'Automatic', scalegroup = 'Automatic', 169 | name = 'Automatic',side = 'negative',color = I("blue")) 170 | fig <- fig %>% add_trace(x = ~Fuel_Type[auto_data$Transmission == 'Manual'], 171 | y = ~Price[auto_data$Transmission == 'Manual'], 172 | legendgroup = 'Manual', scalegroup = 'Manual', 173 | name = 'Manual',side = 'positive',color = I("green"))%>% 174 | layout(violingroupgap = 0, 175 | xaxis = list(title = "Price"), 176 | yaxis = list(title = "Fuel Type")) 177 | 178 | 179 | fig <- auto_data %>% plot_ly(type = 'violin') 180 | fig <- fig %>% add_trace(x = ~Location[auto_data$Transmission == 'Automatic'], 181 | y = ~Price[auto_data$Transmission == 'Automatic'], 182 | legendgroup = 'Automatic', scalegroup = 'Automatic', 183 | name = 'Automatic',side = 'negative',color = I("blue")) 184 | 185 | fig <- fig %>% add_trace(x = ~Location[auto_data$Transmission == 'Manual'], 186 | y = ~Price[auto_data$Transmission == 'Manual'], 187 | legendgroup = 'Manual', scalegroup = 'Manual', 188 | name = 'Manual',side = 'positive',color = I("orange"))%>% 189 | layout(violingap = 0, 190 | violingroupgap = 0, 191 | violinmode = 'overlay', 192 | xaxis = list(title = "Location"), 193 | yaxis = list(title = "Price")) 194 | 195 | 196 | fig <- plot_ly(data = auto_data,y = ~Price, x=~Seats,type="violin") %>% 197 | layout(violingap = 0,violingroupgap = 0, 198 | violinmode = "group", 199 | xaxis = list(title = "Seats"), 200 | yaxis = list(title = "Price")) 201 | 202 | 203 | fig <- auto_data %>% plot_ly(type = 'violin') 204 | fig <- fig %>% add_trace(x = ~Fuel_Type[auto_data$Transmission == 'Automatic'], 205 | y = ~Engine.CC[auto_data$Transmission == 'Automatic'], 206 | legendgroup = 'Automatic', scalegroup = 'Automatic', 207 | name = 'Automatic',side = 'negative',color = I("#a14ef4")) 208 | 209 | fig <- fig %>% add_trace(x = ~Fuel_Type[auto_data$Transmission == 'Manual'], 210 | y = ~Engine.CC[auto_data$Transmission == 'Manual'], 211 | legendgroup = 'Manual', scalegroup = 'Manual', 212 | name = 'Manual',side = 'positive',color = I("#ff6692"))%>% 213 | layout(xaxis = list(title = "Fuel Type"), 214 | yaxis = list(title = "Engine Capacity (CC)"), 215 | violingap = 0,violingroupgap = 0,violinmode = 'overlay') 216 | 217 | 218 | 219 | fig <- auto_data %>% plot_ly(type = 'violin') 220 | fig <- fig %>% add_trace(x = ~Fuel_Type[auto_data$Transmission == 'Automatic'], 221 | y = ~Power[auto_data$Transmission == 'Automatic'], 222 | legendgroup = 'Automatic', scalegroup = 'Automatic', 223 | name = 'Automatic',side = 'negative',color = I("#ef553b")) 224 | 225 | fig <- fig %>% add_trace(x = ~Fuel_Type[auto_data$Transmission == 'Manual'], 226 | y = ~Power[auto_data$Transmission == 'Manual'], 227 | legendgroup = 'Manual', scalegroup = 'Manual', 228 | name = 'Manual',side = 'positive',color = I("#00cc96"))%>% 229 | layout(xaxis = list(title = "Fuel Type"), 230 | yaxis = list(title = "Power (Hp)"), 231 | violingap = 0,violingroupgap = 0,violinmode = 'overlay') 232 | 233 | 234 | 235 | 236 | fig 237 | 238 | -------------------------------------------------------------------------------- /R Scripts/regression_analysis.r: -------------------------------------------------------------------------------- 1 | library(caret) 2 | library(plotly) 3 | library(heatmaply) 4 | 5 | 6 | 7 | auto_data = read.csv("C://Users/subha/Desktop/Visualization & Analysis on Automobile Dataset using Machine Learning in R/indian-auto-mpg.csv") 8 | 9 | 10 | corr_df = data.frame(auto_data$Year, auto_data$Kilometers_Driven, auto_data$Engine.CC, 11 | auto_data$Power, auto_data$Seats, auto_data$Mileage.Km.L, auto_data$Price) 12 | 13 | 14 | heatmaply_cor(cor(corr_df),k_col = 2, k_row = 2) 15 | corr <- round(cor(corr_df), 1) 16 | p.mat <- cor_pmat(corr_df) 17 | corr.plot <- ggcorrplot(corr, hc.order = TRUE, type = "lower", outline.col = "white",p.mat = p.mat) 18 | corr.plot 19 | 20 | 21 | 22 | 23 | 24 | fit <- lm(Price ~ Year, data = auto_data) 25 | 26 | auto_data %>% plot_ly(x = ~Year) %>% 27 | add_markers(y = ~Price, name="Scatter", 28 | marker = list(color="#636efa")) %>% 29 | add_lines(x = ~Year, y = fitted(fit), name="Regression Line")%>% 30 | layout(showlegend = T) 31 | 32 | 33 | fit <- lm(Price ~ Kilometers_Driven, data = auto_data) 34 | 35 | auto_data %>% plot_ly(x = ~Kilometers_Driven) %>% 36 | add_markers(y = ~Price, name="Scatter", 37 | marker = list(color="#00cc96")) %>% 38 | add_lines(x = ~Kilometers_Driven, y = fitted(fit), name="Regression Line")%>% 39 | layout(showlegend = T) 40 | 41 | 42 | fit <- lm(Price ~ Engine.CC, data = auto_data) 43 | 44 | auto_data %>% plot_ly(x = ~Engine.CC) %>% 45 | add_markers(y = ~Price, name="Scatter", 46 | marker = list(color="#ab63fa")) %>% 47 | add_lines(x = ~Engine.CC, y = fitted(fit), name="Regression Line")%>% 48 | layout(showlegend = T) 49 | 50 | 51 | 52 | fit <- lm(Price ~ Power, data = auto_data) 53 | 54 | auto_data %>% plot_ly(x = ~Power) %>% 55 | add_markers(y = ~Price, name="Scatter", 56 | marker = list(color="#e28676")) %>% 57 | add_lines(x = ~Power, y = fitted(fit), name="Regression Line")%>% 58 | layout(showlegend = T) 59 | 60 | 61 | 62 | fit <- lm(Price ~ Seats, data = auto_data) 63 | 64 | auto_data %>% plot_ly(x = ~Seats) %>% 65 | add_markers(y = ~Price, name="Scatter", 66 | marker = list(color="#ffff33")) %>% 67 | add_lines(x = ~Seats, y = fitted(fit), name="Regression Line")%>% 68 | layout(showlegend = T) 69 | 70 | 71 | 72 | fit <- lm(Price ~ Mileage.Km.L, data = auto_data) 73 | 74 | auto_data %>% plot_ly(x = ~Mileage.Km.L) %>% 75 | add_markers(y = ~Price, name="Scatter", 76 | marker = list(color="#1cbe4f")) %>% 77 | add_lines(x = ~Mileage.Km.L, y = fitted(fit), name="Regression Line")%>% 78 | layout(showlegend = T) 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /R Scripts/univariate_analysis.r: -------------------------------------------------------------------------------- 1 | library(plotly) 2 | 3 | auto_data = read.csv("C://Users/subha/Desktop/Visualization & Analysis on Automobile Dataset using Machine Learning in R/indian-auto-mpg.csv") 4 | 5 | summary(auto_data) 6 | 7 | fig <- plot_ly(x = auto_data$Manufacturer, type = "histogram", 8 | marker = list(color = "rgba(255, 0, 0, 0.7)")) %>% 9 | layout(xaxis = list(title = "Manufacturer",categoryorder="total descending"), 10 | yaxis = list(title = "Car Count")) 11 | 12 | fig <- plot_ly(x = auto_data$Location, type = "histogram")%>% 13 | layout(xaxis = list(title = "Location"), 14 | yaxis = list(title = "Car Count")) 15 | 16 | 17 | fig <- plot_ly(x = as.factor(auto_data$Year), histfunc='sum',type = "histogram", 18 | marker = list(color = "rgba(0,205,149, 1)"))%>% 19 | layout(xaxis = list(title = "Year"), 20 | yaxis = list(title = "Car Count")) 21 | 22 | fig <- plot_ly(x = auto_data$Transmission, type = "histogram", 23 | marker = list(color = "#e0812c"))%>% 24 | layout(xaxis = list(title = "Transmission"), 25 | yaxis = list(title = "Car Count")) 26 | 27 | fig <- plot_ly(x = auto_data$Fuel_Type, type = "histogram", 28 | marker = list(color = "#d89f38"))%>% 29 | layout(xaxis = list(title = "Fuel Type"), 30 | yaxis = list(title = "Car Count")) 31 | 32 | fig <- plot_ly(x = as.factor(auto_data$Seats), type = "histogram", 33 | marker = list(color = "#707bfa")) %>% 34 | layout(xaxis = list(title = "Number of Seats"), 35 | yaxis = list(title = "Car Count")) 36 | 37 | 38 | 39 | fig <- plot_ly(y = auto_data$Engine.CC, type = "box")%>% 40 | layout(xaxis = list(title = "Boxplot"), 41 | yaxis = list(title = "Engine CC")) 42 | 43 | fig <- plot_ly(y = auto_data$Power, type = "box") %>% 44 | layout(xaxis = list(title = "Horse Power"), 45 | yaxis = list(title = "Engine Power")) 46 | 47 | fig <- plot_ly(y = auto_data$Mileage.Km.L, type = "box")%>% 48 | layout(xaxis = list(title = "Mileage"), 49 | yaxis = list(title = "Km per Litre")) 50 | 51 | fig <- plot_ly(y = auto_data$Price, type = "box", color=".")%>% 52 | layout(xaxis = list(title = "Price"), 53 | yaxis = list(title = "Lakhs")) 54 | 55 | 56 | fig 57 | 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R 2 | 3 | 4 | [![GitHub last commit](https://img.shields.io/github/last-commit/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R?label=Last%20commit&color=green&logo=git&logoColor=white&style=flat-square)](https://github.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R) 5 | ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R?label=Code%20size&logo=python&logoColor=white&style=flat-square) 6 | ![GitHub repo size](https://img.shields.io/github/repo-size/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R?label=Repo%20size&color=red&logo=github&logoColor=white&style=flat-square) 7 | ![GitHub stars](https://img.shields.io/github/stars/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R?label=Stars&logo=github&style=flat-square) 8 | ![GitHub issues](https://img.shields.io/github/issues/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R?label=Issues&color=yellow&logo=github&style=flat-square) 9 | 10 | 11 | #### The project aims to perform various visualizations and provide various insights from the considered Indian automobile dataset by performing data analysis that utilizing machine learning algorithms in R programming language. The considered dataset is of Indian cars that consists of various features such as model, manufacturer, year, transmission, engine, power etc. The insights that could be estimated from this dataset would be feature such as price of a specific car model that could be estimated using the other attributes of that particular car model using machine learning algorithms like Linear Regression 12 | 13 |
14 | 15 | ### 🖥️ Technologies and Tools used 16 | ![R Badge](https://img.shields.io/badge/r%20programming-%23276DC3.svg?&style=for-the-badge&logo=r&logoColor=white) 17 | ![R Studio](https://img.shields.io/badge/R%20Studio-9cf.svg?&style=for-the-badge&logo=rstudio&logoColor=222222) 18 | ![Plotly](https://img.shields.io/badge/Plotly-49587c.svg?&style=for-the-badge&logo=power-bi&logoColor=white) 19 | ![CARET](https://img.shields.io/badge/CARET%20Package-red.svg?&style=for-the-badge) 20 | ![caTools](https://img.shields.io/badge/catools-00B274.svg?&style=for-the-badge) 21 | 22 | 23 | #### 📊 Get Presentation Here 24 | [![PPT](https://img.shields.io/badge/PRESENTATION-D83B01.svg?&style=for-the-badge&logo=microsoft-powerpoint&logoColor=white)](https://drive.google.com/file/d/1XaMyFvpge_dcYuNRpxz7rg_LL3TzqVXQ/view?usp=sharing) 25 | 26 | 27 |


28 | 29 | 30 | ## ABSTRACT 31 |

32 | The automobile industry today is the most profitable industry. Due to increase in the income in both rural and urban sector and availability of easy finance are the main drivers of highvolume car segments. The objective of this project is to visualize and provide various insights from the considered Indian automobile dataset by performing data analysis that utilizing machine learning algorithms in R programming language. The considered dataset is of Indian cars that consists of various features such as model, manufacturer, year, transmission, engine, power etc. The insights that could be estimated from this dataset would be feature such as price of a specific car model that could be estimated using the other attributes of that particular car model using machine learning algorithms like Linear Regression. The objective also includes the study of various attributes of the considered Indian automobile dataset and finding the relationship or statistically, finding the correlation between them and visualizing the findings. The result of finding this relationship between various attributes of a vehicle will provide useful insights in building in a prediction model capable of predicting the price of a vehicle based on the other attributes. This kind of an analytics will help the consumers to decide the selling price of a vehicle without rough estimates which sometimes may underestimate the price of vehicles leading to loss of customer automobile value. Thus, this kind of analytics will certainly have a practical industry use case which might be useful to create end products to consumers which are capable of providing insights of various attributes of automobiles and also to look into analytics and knowing the segment of automobiles that are successful in the market. 33 |

34 | 35 |
36 | 37 | ## PROPOSED METHODLOGY 38 | 39 | 40 | 41 |

42 | The architecture of the entire project is divided into two parts which are the visualization and the data analysis parts of the project. The visualization part of the project deals with the various plotting of attributes while the data analysis part of the project deals with finding the relationship between various attributes in the dataset.

43 | First the dataset if taken into preprocessing where the data is cleaned of missing and nan values. Also, the data imputation takes place in this step. The dataset consists of many missing values and some required attributed that were false recorded as zero values like mileage which can only be a non-zero value. Since the rows that consisted missing values only amount to less than one percent of the data, rows with missing values are deleted and some rows with zero values are imputed with the mode of that particular attribute.

44 | The visualization part consists of univariate analysis, analyzing the data in perspective of a single attribute then with bivariate analysis, analysis using two attributes and then with multivariate which deals with more than two attributes at the same time. Here the attribute’s distributions are visualized using count plots, barplots, histograms, etc. The bivariate analysis is done using scatter plots, box plots, violin plots and so on. Similar plots are used in multivariate analysis but the third or more dimensions are represented on two dimensions by adding colors or size to the plot attributes.

45 | The data analysis is performed on the automobile dataset utilizing machine learning algorithms in order to study the various relationships between attributes of the considered Indian automobile dataset and attempts to consolidate the findings of the relationship between the attributes or statistically, finding the correlation between them and visualizing the findings. Of these features some of them might be a redundant and might be a good contributor to the prediction model and the task of eliminating such attributes also shall be considered. The result of finding this relationship between various attributes of a vehicle will provide useful insights in building in a prediction model capable of predicting the price of a vehicle based on the other parameters like manufacturer, year, horsepower and so on. 46 |

47 | 48 |
49 |


50 |


51 |


52 | 53 | ## VISUALIZATIONS 54 | 55 | ### Univariate Analysis 56 | 57 |

58 | 59 |


60 | 61 | 62 | ### Bivariate Analysis 63 |

64 |

65 | 66 |


67 | 68 | ### Multivariate Analysis 69 |

70 |

71 | 72 |


73 | 74 | ### Regression Analysis 75 |

76 | 77 |


78 | 79 | ### R2 Score of Regression Model = 0.79 80 | 81 |


82 | 83 | [📃 Project Report Here](/Docs/Report.pdf) 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Regression Plots/corr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/corr.png -------------------------------------------------------------------------------- /Regression Plots/pred.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/pred.png -------------------------------------------------------------------------------- /Regression Plots/reg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/reg1.png -------------------------------------------------------------------------------- /Regression Plots/reg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/reg2.png -------------------------------------------------------------------------------- /Regression Plots/reg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/reg3.png -------------------------------------------------------------------------------- /Regression Plots/reg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/reg4.png -------------------------------------------------------------------------------- /Regression Plots/reg5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/reg5.png -------------------------------------------------------------------------------- /Regression Plots/reg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Regression Plots/reg6.png -------------------------------------------------------------------------------- /Univariate Plots/box5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/box5.png -------------------------------------------------------------------------------- /Univariate Plots/box6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/box6.png -------------------------------------------------------------------------------- /Univariate Plots/box8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/box8.png -------------------------------------------------------------------------------- /Univariate Plots/box9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/box9.png -------------------------------------------------------------------------------- /Univariate Plots/hist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/hist.png -------------------------------------------------------------------------------- /Univariate Plots/hist2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/hist2.png -------------------------------------------------------------------------------- /Univariate Plots/hist3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/hist3.png -------------------------------------------------------------------------------- /Univariate Plots/hist3_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/hist3_.png -------------------------------------------------------------------------------- /Univariate Plots/hist4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/hist4.png -------------------------------------------------------------------------------- /Univariate Plots/hist7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Defcon27/Data-Analysis-of-Indian-Automobile-dataset-using-Machine-Learning-in-R/a14f231c30c15cbd4e1c0f0c1064d085453585fe/Univariate Plots/hist7.png -------------------------------------------------------------------------------- /validate.csv: -------------------------------------------------------------------------------- 1 | Year,Kilometers_Driven,Engine.CC,Power,Seats,Mileage.Km.L,Price,Manufacturer_Ambassador,Manufacturer_Audi,Manufacturer_Bentley,Manufacturer_BMW,Manufacturer_Chevrolet,Manufacturer_Datsun,Manufacturer_Fiat,Manufacturer_Force,Manufacturer_Ford,Manufacturer_Honda,Manufacturer_Hyundai,Manufacturer_Isuzu,Manufacturer_ISUZU,Manufacturer_Jaguar,Manufacturer_Jeep,Manufacturer_Lamborghini,Manufacturer_Land,Manufacturer_Mahindra,Manufacturer_Maruti,Manufacturer_MercedesBenz,Manufacturer_Mini,Manufacturer_Mitsubishi,Manufacturer_Nissan,Manufacturer_Porsche,Manufacturer_Renault,Manufacturer_Skoda,Manufacturer_Smart,Manufacturer_Tata,Manufacturer_Toyota,Manufacturer_Volkswagen,Manufacturer_Volvo,Fuel_Type_CNG,Fuel_Type_Diesel,Fuel_Type_LPG,Fuel_Type_Petrol,Transmission_Automatic,Transmission_Manual,Owner_Type_First,Owner_Type_Fourth,Owner_Type_Second,Owner_Type_Third 2 | 2016,10000,1199,89,5,18,7.30E+05,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0 3 | --------------------------------------------------------------------------------