Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

21BCS5066_DEEPANSHU TYAGI

SOURCE CODE
#Importing libraries
library(recommenderlab)
## Warning: package 'recommenderlab' was built under R version 4.0.3
## Loading required package: Matrix
## Loading required package: arules
## Warning: package 'arules' was built under R version 4.0.3
##
## Attaching package: 'arules'
## The following objects are masked from 'package:base':
##
## abbreviate, write
## Loading required package: proxy
## Warning: package 'proxy' was built under R version 4.0.3
##
## Attaching package: 'proxy'
## The following object is masked from 'package:Matrix':
##
## as.matrix
## The following objects are masked from 'package:stats':
##
## as.dist, dist
## The following object is masked from 'package:base':
##
## as.matrix
## Loading required package: registry
## Warning: package 'registry' was built under R version 4.0.3
## Registered S3 methods overwritten by 'registry':
## method from
## print.registry_field proxy
## print.registry_entry proxy
library(reshape2)
## Warning: package 'reshape2' was built under R version 4.0.3
library(data.table)
## Warning: package 'data.table' was built under R version 4.0.3
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:reshape2':
##
## dcast, melt
library(ggplot2)

#Retrieving data
movie_data <- read.csv("C:/Users/My PC/Desktop/New
folder/IMDB-Dataset/movies.csv", stringsAsFactors = FALSE)
rating_data <- read.csv("C:/Users/My PC/Desktop/New
folder/IMDB-Dataset/ratings.csv")

#structure
str(movie_data)
## 'data.frame': 10329 obs. of 3 variables:
## $ movieId: int 1 2 3 4 5 6 7 8 9 10 ...
## $ title : chr "Toy Story (1995)" "Jumanji (1995)" "Grumpier Old Men
(1995)" "Waiting to Exhale (1995)" ...
## $ genres : chr "Adventure|Animation|Children|Comedy|Fantasy" "Adventure|
Children|Fantasy" "Comedy|Romance" "Comedy|Drama|Romance" ...
str(rating_data)
## 'data.frame': 105339 obs. of 4 variables:
## $ userId : int 1 1 1 1 1 1 1 1 1 1 ...
## $ movieId : int 16 24 32 47 50 110 150 161 165 204 ...
## $ rating : num 4 1.5 4 4 4 4 3 4 3 0.5 ...
## $ timestamp: int 1217897793 1217895807 1217896246 1217896556 1217896523
1217896150 1217895940 1217897864 1217897135 1217895786 ...
#tabuler view
data.table(movie_data) #id,title,genres
## movieId title
## 1: 1 Toy Story (1995)
## 2: 2 Jumanji (1995)
## 3: 3 Grumpier Old Men (1995)
## 4: 4 Waiting to Exhale (1995)
## 5: 5 Father of the Bride Part II (1995)
## ---
## 10325: 146684 Cosmic Scrat-tastrophe (2015)
## 10326: 146878 Le Grand Restaurant (1966)
## 10327: 148238 A Very Murray Christmas (2015)
## 10328: 148626 The Big Short (2015)
## 10329: 149532 Marco Polo: One Hundred Eyes (2015)
## genres
## 1: Adventure|Animation|Children|Comedy|Fantasy
## 2: Adventure|Children|Fantasy
## 3: Comedy|Romance
## 4: Comedy|Drama|Romance
## 5: Comedy
## ---
## 10325: Animation|Children|Comedy
## 10326: Comedy
## 10327: Comedy
## 10328: Drama
## 10329: (no genres listed)
data.table(rating_data)
## userId movieId rating timestamp
## 1: 1 16 4.0 1217897793
## 2: 1 24 1.5 1217895807
## 3: 1 32 4.0 1217896246
## 4: 1 47 4.0 1217896556
## 5: 1 50 4.0 1217896523
## ---
## 105335: 668 142488 4.0 1451535844
## 105336: 668 142507 3.5 1451535889
## 105337: 668 143385 4.0 1446388585
## 105338: 668 144976 2.5 1448656898
## 105339: 668 148626 4.5 1451148148
#summary statistics
summary(movie_data)
## movieId title genres
## Min. : 1 Length:10329 Length:10329
## 1st Qu.: 3240 Class :character Class :character
## Median : 7088 Mode :character Mode :character
## Mean : 31924
## 3rd Qu.: 59900
## Max. :149532
summary(rating_data)
## userId movieId rating timestamp
## Min. : 1.0 Min. : 1 Min. :0.500 Min. :8.286e+08
## 1st Qu.:192.0 1st Qu.: 1073 1st Qu.:3.000 1st Qu.:9.711e+08
## Median :383.0 Median : 2497 Median :3.500 Median :1.115e+09
## Mean :364.9 Mean : 13381 Mean :3.517 Mean :1.130e+09
## 3rd Qu.:557.0 3rd Qu.: 5991 3rd Qu.:4.000 3rd Qu.:1.275e+09
## Max. :668.0 Max. :149532 Max. :5.000 Max. :1.452e+09
#we need to do some thing with genre more usefull
movie_genre <- as.data.frame(movie_data$genres, stringsAsFactors = FALSE)
movie_genre2 <- as.data.frame(tstrsplit(movie_genre[,1], "[|]", type.convert =
TRUE),stringsAsFactors = FALSE)

colnames(movie_genre2) <-c(1:10)

list_genre <- c("Action", "Adventure", "Animation", "Children",


"Comedy", "Crime","Documentary", "Drama", "Fantasy",
"Film-Noir", "Horror", "Musical", "Mystery","Romance",
"Sci-Fi", "Thriller", "War", "Western")
genre_matl <- matrix(0,10330,18)
genre_matl[1,] <- list_genre
colnames(genre_matl) <- list_genre

for (index in 1:nrow(movie_genre2)){


for(col in 1:ncol(movie_genre2)){
gen_col = which(genre_matl[1,] == movie_genre2[index,col])
genre_matl[index+1,gen_col] <- 1
}
}

genre_mat2 <- as.data.frame(genre_matl[-1,], stringsAsFactors=FALSE)

for (col in 1:ncol(genre_mat2)) {


genre_mat2[,col] <- as.integer(genre_mat2[,col])
}
str(genre_mat2)
## 'data.frame': 10329 obs. of 18 variables:
## $ Action : int 0 0 0 0 0 1 0 0 1 1 ...
## $ Adventure : int 1 1 0 0 0 0 0 1 0 1 ...
## $ Animation : int 1 0 0 0 0 0 0 0 0 0 ...
## $ Children : int 1 1 0 0 0 0 0 1 0 0 ...
## $ Comedy : int 1 0 1 1 1 0 1 0 0 0 ...
## $ Crime : int 0 0 0 0 0 1 0 0 0 0 ...
## $ Documentary: int 0 0 0 0 0 0 0 0 0 0 ...
## $ Drama : int 0 0 0 1 0 0 0 0 0 0 ...
## $ Fantasy : int 1 1 0 0 0 0 0 0 0 0 ...
## $ Film-Noir : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Horror : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Musical : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Mystery : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Romance : int 0 0 1 1 0 0 1 0 0 0 ...
## $ Sci-Fi : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Thriller : int 0 0 0 0 0 1 0 0 0 1 ...
## $ War : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Western : int 0 0 0 0 0 0 0 0 0 0 ...
#head(movie_data)
#create a search matrix that gives us films based on genres

SearchMovie <- cbind(movie_data[,1:2],genre_mat2[])

head(SearchMovie)
## movieId title Action Adventure Animation
## 1 1 Toy Story (1995) 0 1 1
## 2 2 Jumanji (1995) 0 1 0
## 3 3 Grumpier Old Men (1995) 0 0 0
## 4 4 Waiting to Exhale (1995) 0 0 0
## 5 5 Father of the Bride Part II (1995) 0 0 0
## 6 6 Heat (1995) 1 0 0
## Children Comedy Crime Documentary Drama Fantasy Film-Noir Horror Musical
## 1 1 1 0 0 0 1 0 0 0
## 2 1 0 0 0 0 1 0 0 0
## 3 0 1 0 0 0 0 0 0 0
## 4 0 1 0 0 1 0 0 0 0
## 5 0 1 0 0 0 0 0 0 0
## 6 0 0 1 0 0 0 0 0 0
## Mystery Romance Sci-Fi Thriller War Western
## 1 0 0 0 0 0 0
## 2 0 0 0 0 0 0
## 3 0 1 0 0 0 0
## 4 0 1 0 0 0 0
## 5 0 0 0 0 0 0
## 6 0 0 0 1 0 0
#many movies have several genre
#let's create sparse matrix for recommendation
ratingMatrix <- reshape2::dcast(rating_data, userId~movieId, value.var =
"rating", na.rm=FALSE) #basically our sparse matrix
ratingMatrix <- as.matrix(ratingMatrix[,-1]) #remove userIds
#Convert rating matrix into a recommenderlab sparse matrix
ratingMatrix <- as(ratingMatrix, "realRatingMatrix")

#recommendation model
recommendation_model <- recommenderRegistry$get_entries(dataType =
"realRatingMatrix")
names(recommendation_model)
## [1] "HYBRID_realRatingMatrix" "ALS_realRatingMatrix"
## [3] "ALS_implicit_realRatingMatrix" "IBCF_realRatingMatrix"
## [5] "LIBMF_realRatingMatrix" "POPULAR_realRatingMatrix"
## [7] "RANDOM_realRatingMatrix" "RERECOMMEND_realRatingMatrix"
## [9] "SVD_realRatingMatrix" "SVDF_realRatingMatrix"
## [11] "UBCF_realRatingMatrix"
lapply(recommendation_model, "[[", "description")
## $HYBRID_realRatingMatrix
## [1] "Hybrid recommender that aggegates several recommendation strategies
using weighted averages."
##
## $ALS_realRatingMatrix
## [1] "Recommender for explicit ratings based on latent factors, calculated
by alternating least squares algorithm."
##
## $ALS_implicit_realRatingMatrix
## [1] "Recommender for implicit data based on latent factors, calculated by
alternating least squares algorithm."
##
## $IBCF_realRatingMatrix
## [1] "Recommender based on item-based collaborative filtering."
##
## $LIBMF_realRatingMatrix
## [1] "Matrix factorization with LIBMF via package recosystem
(https://cran.r-project.org/web/packages/recosystem/vignettes/introduction.htm
l)."
##
## $POPULAR_realRatingMatrix
## [1] "Recommender based on item popularity."
##
## $RANDOM_realRatingMatrix
## [1] "Produce random recommendations (real ratings)."
##
## $RERECOMMEND_realRatingMatrix
## [1] "Re-recommends highly rated items (real ratings)."
##
## $SVD_realRatingMatrix
## [1] "Recommender based on SVD approximation with column-mean imputation."
##
## $SVDF_realRatingMatrix
## [1] "Recommender based on Funk SVD with gradient descend
(https://sifter.org/~simon/journal/20061211.html)."
##
## $UBCF_realRatingMatrix
## [1] "Recommender based on user-based collaborative filtering."
#we will use item based collaborative filtering

recommendation_model$IBCF_realRatingMatrix$parameters
## $k
## [1] 30
##
## $method
## [1] "Cosine"
##
## $normalize
## [1] "center"
##
## $normalize_sim_matrix
## [1] FALSE
##
## $alpha
## [1] 0.5
##
## $na_as_zero
## [1] FALSE
#let's check similarity
similarity_mat <- similarity(ratingMatrix[1:4, ],method =
"cosine",which="users")

as.matrix(similarity_mat)
## 1 2 3 4
## 1 0.0000000 0.9760860 0.9641723 0.9914398
## 2 0.9760860 0.0000000 0.9925732 0.9374253
## 3 0.9641723 0.9925732 0.0000000 0.9888968
## 4 0.9914398 0.9374253 0.9888968 0.0000000
image(as.matrix(similarity_mat), main = "User's Similarity")

#let's check similarity of movies


movie_similarity<- similarity(ratingMatrix[ ,1:4],method =
"cosine",which="items")

as.matrix(movie_similarity)
## 1 2 3 4
## 1 0.0000000 0.9669732 0.9559341 0.9101276
## 2 0.9669732 0.0000000 0.9658757 0.9412416
## 3 0.9559341 0.9658757 0.0000000 0.9864877
## 4 0.9101276 0.9412416 0.9864877 0.0000000
image(as.matrix(movie_similarity), main = "movie Similarity")

#rating values
rating_values <- as.vector(ratingMatrix@data)
unique(rating_values)
## [1] 0.0 5.0 4.0 3.0 4.5 1.5 2.0 3.5 1.0 2.5 0.5
#how much rating as count of numbers

Table_rating <- table(rating_values)


Table_rating
## rating_values
## 0 0.5 1 1.5 2 2.5 3 3.5 4
4.5
## 6791761 1198 3258 1567 7943 5484 21729 12237 28880
8187
## 5
## 14856
#most viewed movies visualization

movie_views <- colCounts(ratingMatrix) # count views for each movie


table_views <- data.frame(movie = names(movie_views),
views = movie_views) # create dataframe of views
table_views <- table_views[order(table_views$views,
decreasing = TRUE), ] # sort by number of
views
table_views$title <- NA
for (index in 1:10325){
table_views[index,3] <- as.character(subset(movie_data,
movie_data$movieId ==
table_views[index,1])$title)
}
table_views[1:6,]
## movie views title
## 296 296 325 Pulp Fiction (1994)
## 356 356 311 Forrest Gump (1994)
## 318 318 308 Shawshank Redemption, The (1994)
## 480 480 294 Jurassic Park (1993)
## 593 593 290 Silence of the Lambs, The (1991)
## 260 260 273 Star Wars: Episode IV - A New Hope (1977)
#plotting this data
ggplot(table_views[1:6, ], aes(x = title, y = views)) +
geom_bar(stat="identity", fill = 'steelblue') +
geom_text(aes(label=views), vjust=-0.3, size=3.5) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
ggtitle("Total Views of the Top Films")

#Heatmap of rating matrix

image(ratingMatrix[1:30,1:30], axes=FALSE, main = "30 X 30 heatmap")

#lot's of sparse data

#now we will
#1.select usefull data done
#2.normalize it
#3.binarize it

#you have seen the rating dataset ok so what do you think how many user needs
to
#rate a movie to be usefull let's say 50

movie_ratings <- ratingMatrix[rowCounts(ratingMatrix) >


50,colCounts(ratingMatrix) > 50]

movie_ratings
## 420 x 447 rating matrix of class 'realRatingMatrix' with 38341 ratings.
#this bunch of code finds a heatmap of top user and movies
minimum_movies<- quantile(rowCounts(movie_ratings), 0.98)
minimum_users <- quantile(colCounts(movie_ratings), 0.98)
image(movie_ratings[rowCounts(movie_ratings) > minimum_movies,
colCounts(movie_ratings) > minimum_users],
main = "Heatmap of the top users and movies")
#what we need to do much ago distribution of average rating of users
average_ratings <- rowMeans(movie_ratings)
qplot(average_ratings, fill=I("black"), col=I("blue")) +
ggtitle("Distribution of the average rating per user")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#normalize data
normalized_ratings <- normalize(movie_ratings)
sum(rowMeans(normalized_ratings) > 0.00001)
## [1] 0
#heatmap of normalized value
image(normalized_ratings[rowCounts(normalized_ratings) > minimum_movies,
colCounts(normalized_ratings) > minimum_users],
main = "Normalized Ratings of the Top Users")

#binarize means 0 and 1 we will recommend if rating of that movie


# is greater than 3.5

binary_minimum_movies <- quantile(rowCounts(movie_ratings), 0.90)


binary_minimum_users <- quantile(colCounts(movie_ratings), 0.90)

movies_watched <- binarize(movie_ratings, minRating = 1)

good_rated_films <- binarize(movie_ratings, minRating = 3.5)


image(good_rated_films[rowCounts(movie_ratings) > binary_minimum_movies,
colCounts(movie_ratings) > binary_minimum_users],
main = "Heatmap of the top users and movies")

#Collaborative Filtering System


sampled_data<- sample(x = c(TRUE, FALSE),
size = nrow(movie_ratings),
replace = TRUE,
prob = c(0.8, 0.2))
training_data <- movie_ratings[sampled_data, ]
testing_data <- movie_ratings[!sampled_data, ]

#recommendation system
recommendation_system <- recommenderRegistry$get_entries(dataType
="realRatingMatrix")
recommendation_system$IBCF_realRatingMatrix$parameters
## $k
## [1] 30
##
## $method
## [1] "Cosine"
##
## $normalize
## [1] "center"
##
## $normalize_sim_matrix
## [1] FALSE
##
## $alpha
## [1] 0.5
##
## $na_as_zero
## [1] FALSE
recommen_model <- Recommender(data = training_data,
method = "IBCF",
parameter = list(k = 30))
recommen_model
## Recommender of type 'IBCF' for 'realRatingMatrix'
## learned using 338 users.
class(recommen_model)
## [1] "Recommender"
## attr(,"package")
## [1] "recommenderlab"
info <- getModel(recommen_model)
class(info$sim)
## [1] "dgCMatrix"
## attr(,"package")
## [1] "Matrix"
top_items <- 20
image(info$sim[1:top_items, 1:top_items],
main = "Heatmap of the first rows and columns")

#we will carry out the sum of rows and columns with the similarity of the
objects above 0

sum_rows <- rowSums(info$sim > 0)


table(sum_rows)
## sum_rows
## 30
## 447
sum_cols <- colSums(info$sim > 0)
qplot(sum_cols, fill=I("steelblue"), col=I("red"))+ ggtitle("Distribution of
the column count")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#let's recommend
top_recommendations <- 10 # the number of items to recommend to each user
predicted_recommendations <- predict(object = recommen_model,
newdata = testing_data,
n = top_recommendations)
predicted_recommendations
## Recommendations as 'topNList' with n = 10 for 82 users.
#let's see some of the names
user1 <- predicted_recommendations@items[[1]] # recommendation for the first
user
movies_user1 <- predicted_recommendations@itemLabels[user1]
movies_user2 <- movies_user1
for (index in 1:10){
movies_user2[index] <- as.character(subset(movie_data,
movie_data$movieId ==
movies_user1[index])$title)
}
movies_user2
## [1] "Mask, The (1994)" "Rock, The (1996)"
## [3] "Army of Darkness (1993)" "Conspiracy Theory (1997)"
## [5] "Time to Kill, A (1996)" "Grease (1978)"
## [7] "Antz (1998)" "Leaving Las Vegas (1995)"
## [9] "Flintstones, The (1994)" "Alien³ (a.k.a. Alien 3) (1992)"
#recommender matrix
recommendation_matrix <- sapply(predicted_recommendations@items,
function(x)
{ as.integer(colnames(movie_ratings)[x]) }) # matrix with the recommendations
for each user
#dim(recc_matrix)
recommendation_matrix[]
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
## [1,] 367 1375 5 63082 3 1653 432 3948 5 2640 5 1 1573
## [2,] 733 2100 6 5418 95 2023 2599 494 112 497 19 21 3977
## [3,] 1215 1748 10 1088 165 2078 1203 36 235 420 47 39 58559
## [4,] 1597 1722 34 2599 208 2890 2791 3448 370 36 50 70 355
## [5,] 805 485 39 1876 261 3081 39 1249 541 442 153 337 586
## [6,] 1380 141 48 1374 266 4370 5618 8360 592 494 163 474 1377
## [7,] 2294 236 153 2710 317 5418 1339 2011 780 1954 208 788 168
## [8,] 25 2490 185 3751 356 2470 158 208 1088 1639 223 1278 161
## [9,] 355 3052 236 454 466 2081 653 235 1127 596 296 1408 420
## [10,] 1320 1304 260 350 494 2012 11 508 1222 266 317 1517 48394
## [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
[,25]
## [1,] 1089 62 1199 337 7 16 3 7 1374 454 1
1
## [2,] 1213 357 112 783 3 19 39 494 3527 3 3
3
## [3,] 293 724 158 1035 904 95 265 350 151 653 19
5
## [4,] 1035 745 231 1094 2353 168 344 2599 913 494 95
21
## [5,] 1234 1358 260 1207 733 172 527 1183 68358 44 151
32
## [6,] 648 2278 434 2529 1282 173 552 733 497 63082 173
44
## [7,] 2174 4995 485 3176 51662 261 733 1343 596 1479 317
70
## [8,] 1136 1777 555 3471 4370 329 802 1094 316 2167 337
95
## [9,] 529 785 587 3703 2078 377 1343 2671 1608 16 410
153
## [10,] 733 3751 805 3751 586 435 1584 2395 236 1645 434
160
## [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36]
[,37]
## [1,] 165 1028 783 235 34 2761 2006 16 11 529 7
442
## [2,] 724 231 3176 337 112 17 2078 48 47 588 2355
1597
## [3,] 1961 318 8636 364 357 261 1376 112 356 508 141
3255
## [4,] 2011 48394 5010 520 364 339 370 145 497 266 508
5010
## [5,] 2572 68358 596 780 432 442 786 344 589 36 168
72998
## [6,] 4246 1876 3671 788 440 480 2081 353 653 440 1275
231
## [7,] 110 48780 2080 1047 466 485 1485 355 736 2395 494
63082
## [8,] 661 145 435 1196 553 1073 235 368 788 3 173
2706
## [9,] 36 442 3 1320 555 1201 48 434 1088 497 4034
54286
## [10,] 2174 2001 3751 1393 596 1479 2470 474 1204 2080 2080
3448
## [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48]
[,49]
## [1,] 2001 7 377 5 168 3 913 2529 261 1 653
11
## [2,] 3671 11 529 353 440 432 410 1408 5010 5 104
17
## [3,] 1876 553 1917 745 7 497 2396 802 265 6 2791
150
## [4,] 1777 4027 1249 1584 34 590 2194 2490 62 10 440
153
## [5,] 1201 1285 4085 784 36 1094 919 2302 36 25 5
158
## [6,] 6333 337 1079 1097 261 4027 16 236 2396 34 2716
160
## [7,] 2302 440 59315 145 2804 5952 34 151 17 95 4896
235
## [8,] 5349 1275 95 1282 852 261 151 596 7143 208 8360
329
## [9,] 3448 253 163 1876 364 2762 163 63082 266 223 4085
420
## [10,] 1215 2174 168 802 786 586 168 350 596 300 3039
442
## [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60]
[,61]
## [1,] 36 1356 19 745 110 1997 39 11 2 266 36
21
## [2,] 2490 1375 50 2100 160 3147 370 21 1148 653 44
253
## [3,] 151 2355 520 1028 420 19 432 36 1732 852 62
745
## [4,] 1199 163 541 2916 588 1200 440 1968 4011 1673 70
1035
## [5,] 3 141 593 1485 590 1676 588 2791 529 586 110
1201
## [6,] 266 356 1225 1073 595 4896 805 3114 588 39 163
1210
## [7,] 494 783 1247 784 745 2997 1097 150 3253 543 165
56367
## [8,] 265 4011 1370 17 802 54286 1250 68358 265 597 168
235
## [9,] 21 49272 1485 63082 924 593 1407 919 353 708 172
1097
## [10,] 141 3996 1968 920 1246 6 1584 3751 11 261 173
163
## [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72]
[,73]
## [1,] 163 3 6365 141 21 5 7 39 3 5 1
7
## [2,] 165 494 8368 1356 497 10 32 44 110 17 223
10
## [3,] 344 3751 7147 3033 508 153 160 47 165 48 349
44
## [4,] 353 7143 2700 1784 1035 223 161 70 350 112 832
50
## [5,] 457 1101 5010 261 1968 261 196 104 377 153 1079
70
## [6,] 480 420 1203 1674 1997 293 236 110 440 185 1200
95
## [7,] 485 141 1370 596 2000 317 339 165 592 349 1201
110
## [8,] 500 161 2011 2395 2100 350 344 185 1079 367 1206
112
## [9,] 541 2699 4022 2080 2115 434 410 208 1097 368 1240
141
## [10,] 590 151 1215 1374 2174 435 454 236 1206 480 1250
150
## [,74] [,75] [,76] [,77] [,78] [,79] [,80] [,81] [,82]
## [1,] 1200 19 2294 2 10 5 292 36 168
## [2,] 1923 160 111 3 19 10 350 485 724
## [3,] 2542 592 805 7 44 32 494 1 44
## [4,] 2947 661 34 21 48 173 1028 5 2012
## [5,] 3897 1377 1544 34 95 231 1748 44 163
## [6,] 367 1517 48 44 145 266 2395 70 2804
## [7,] 2019 2710 163 48 151 288 2599 112 783
## [8,] 6377 2762 1597 95 168 292 4995 196 1047
## [9,] 1320 1479 2081 151 172 296 1088 293 785
## [10,] 2763 520 4246 160 185 300 33493 317 420

You might also like