Question
Problem 3 (4 points) Download the Mobile Price Classification data set (train.csv). Read the data in its original format (.csv) by using the function
Problem 3 (4 points) Download the Mobile Price Classification data set (train.csv). Read the data in its original format (.csv) by using the function read.csv() in to the data frame mobile_data. In this dataset, there are 2000 observations with 21 variables. The variables are listed as they appear in the data file. Variable Name battery-power blue clock_speed dual sim fc four-g |Description energy charge that a battery will hold and how long a device will run before the battery needs recharging. "1" for phone has bluetooth and "0" for phone doesn't have bluetooth speed at which a single microprocessor core exe- cutes instructions "1" for phone that can handle 2 sim cards simul- taneously and "0" for phone that can only handle 1 sim card at a time The mega pixels that the front camera can sup- port "1" for 4G capability on phone and "0" for no 4G capability on phone Internal Memory of the phone in Gigabytes int_memory m_depth Mobile Depth in cm mobile_wt Weight of mobile phone n_cores Number of cores in the phone's microprocessor The mega pixels that the primary camera can sup- port px_height Pixel Resolution Height px_width Pixel Resolution Width ram Random Access Memory in Megabytes sc_h SC_W talk time three_g touch screen wifi price_range Screen height of phone in cm Screen width of phone in cm the total time a battery can power a phone while the phone is used to receive or perform a call "1" for 3G capability on phone and "0" for no 3G capability on phone "1" for touchscreen capability on phone and "0" for no touchscreen capability on phone "1" for wireless network connection capability on phone and "0" for no wireless connection capa- bility on phone "0" for low cost phones, "1" for medium cost phones, "2" for high cost phones, and "3" for very high cost phones Let's work on the Mobile Price Classification dataset using the package ggplot2. You can use the following code to install this package. Use ggplot2 to make all the required plots and data visualizations. # Load the package library(ggplot2) (a) Make a scatter plot between the variables battery-power vs ram. Add colors based on price range. (b) Recreate the plot from Part a, and add the trend lines for each price range separately. (c) Make density curves of the ram where the 4 price ranges are in one plot. (d) Make box plots of the ram where the 4 price ranges are in one plot. (e) Make a violin plot of the ram where the 4 price ranges are in one plot. (f) Make a stacked bar plot to show the relationship between price range and log(ram).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started