Guest User

Untitled

a guest
Jan 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # Set working directory
  2. setwd("/Users/oindrilasen/WORK_AREA/Data Science/kaggle/Digit_Recognizer")
  3. # Load the data
  4. digits_train <- data.matrix(read.csv("train.csv"))
  5. # check the dimension
  6. dim(digits_train) # 42000, 785
  7. # Check the structure
  8. str(digits_train)
  9. View(head(digits_train))
  10. # Let's check the Lable column uniue values
  11. unique(digits_train[,1])
  12. # Let's check how many records are there for each number
  13. table(digits_train[,1])
  14. # let's plot the Number's count
  15. barplot(table(digits_train[,1]), col=rainbow(10, 0.5),
  16. main="Digits Count in Train")
Add Comment
Please, Sign In to add comment