Choosing the Perfect Camera

I’ve always been intereted in photography but, i’ve never actually tried it. When I did research on camera’s, I found so many sources and reading reviews took a long time. Since, I’m an amateur photgrapher, my budget is around 500-700 Dollars. I’ve accumulated the top camera’s that is in my budget but it’s hard to distinquish between them. I’ve accumalted a list of ratings from various retail websites for the cameras I am most interested in. From this, I wil build a recommender system that will help narrow my decission.

Read the collected data

dslr <- read.csv("https://raw.githubusercontent.com/mgankhuyag/data618/master/dslr.csv",header = TRUE)



dslr %>%  kable(caption = "DSLR Camera Ratings by Retail Users") %>% kable_styling("striped", full_width = TRUE)
DSLR Camera Ratings by Retail Users
X Amazon Best.Buy Walmart Bhphotovideo Techradar Adorama cnet
Nikon D3500 4.6 4.8 5.0 4.4 4.0 4.7 NA
Nikon D5600 4.4 NA NA 4.7 4.0 4.7 4.0
Nikon D5300 4.4 4.8 NA 4.8 4.0 4.8 4.0
Nikon D610 4.3 4.8 4.4 4.5 NA 4.5 4.0
Canon EOS Rebel T6 4.5 4.7 4.4 4.8 4.0 4.7 3.0
Canon EOS Rebel T7 4.7 4.7 5.0 4.5 3.5 4.7 NA
Canon EOS Rebel T7i 4.7 4.9 4.6 4.8 4.0 4.9 3.5
Canon EOS Rebel T6i 4.6 4.8 4.6 4.8 4.0 4.7 3.5

Split The Data

paste("Training Data")
## [1] "Training Data"
print(train)
##      Amazon Best.Buy Walmart Bhphotovideo Techradar Adorama cnet
## [1,]    4.7      4.7     5.0          4.5       3.5     4.7   NA
## [2,]    4.6      4.8     5.0          4.4       4.0     4.7   NA
## [3,]    4.4      4.8      NA          4.8       4.0     4.8  4.0
## [4,]    4.4       NA      NA          4.7       4.0     4.7  4.0
## [5,]    4.7      4.9     4.6          4.8       4.0     4.9  3.5
## [6,]    4.6      4.8     4.6          4.8       4.0     4.7  3.5
paste("Testing Data")
## [1] "Testing Data"
print(test)
##      Amazon Best.Buy Walmart Bhphotovideo Techradar Adorama cnet
## [1,]    4.5      4.7     4.4          4.8         4     4.7    3
## [2,]    4.3      4.8     4.4          4.5        NA     4.5    4

Mean & RMSE

#Mean of Training
mean_train <- mean(train, na.rm = TRUE)
paste("Mean =" ,print(round(mean_train,2)))
## [1] 4.48
## [1] "Mean = 4.48"
error <- mean_train - train
paste("error =" ,print(round(error,2)))
##      Amazon Best.Buy Walmart Bhphotovideo Techradar Adorama cnet
## [1,]  -0.22    -0.22   -0.52        -0.02      0.98   -0.22   NA
## [2,]  -0.12    -0.32   -0.52         0.08      0.48   -0.22   NA
## [3,]   0.08    -0.32      NA        -0.32      0.48   -0.32 0.48
## [4,]   0.08       NA      NA        -0.22      0.48   -0.22 0.48
## [5,]  -0.22    -0.42   -0.12        -0.32      0.48   -0.42 0.98
## [6,]  -0.12    -0.32   -0.12        -0.32      0.48   -0.22 0.98
##  [1] "error = -0.22" "error = -0.12" "error = 0.08"  "error = 0.08" 
##  [5] "error = -0.22" "error = -0.12" "error = -0.22" "error = -0.32"
##  [9] "error = -0.32" "error = NA"    "error = -0.42" "error = -0.32"
## [13] "error = -0.52" "error = -0.52" "error = NA"    "error = NA"   
## [17] "error = -0.12" "error = -0.12" "error = -0.02" "error = 0.08" 
## [21] "error = -0.32" "error = -0.22" "error = -0.32" "error = -0.32"
## [25] "error = 0.98"  "error = 0.48"  "error = 0.48"  "error = 0.48" 
## [29] "error = 0.48"  "error = 0.48"  "error = -0.22" "error = -0.22"
## [33] "error = -0.32" "error = -0.22" "error = -0.42" "error = -0.22"
## [37] "error = NA"    "error = NA"    "error = 0.48"  "error = 0.48" 
## [41] "error = 0.98"  "error = 0.98"
rmse_train <- sqrt(mean((error^2),na.rm=TRUE))
paste("RMSE =" ,print(round(rmse_train,2)))
## [1] 0.42
## [1] "RMSE = 0.42"

calculate BIAS

bias_camera <- round(((rowMeans(train, na.rm=TRUE))-mean_train),2)
bias_publisher <-round(((colMeans(train,na.rm = TRUE))-mean_train),2)
bias_camera
## [1]  0.04  0.11 -0.01 -0.12  0.01 -0.05
bias_publisher
##       Amazon     Best.Buy      Walmart Bhphotovideo    Techradar 
##         0.09         0.32         0.32         0.19        -0.56 
##      Adorama         cnet 
##         0.27        -0.73