Dear Statalisters,
I would like to ask for your help on using multiple loops on Stata.
I want to measure how similar are the genres used by each director on her/his films - on each point of the director's career.
The genre similarity scores will be calculated using two steps:
1) I will measure the Jaccard Similarity between the movie pairs, which would be calculated by dividing the number of genres in both movies by the number of genres in either movie.
2) I will take the average Jaccard Similarity of the movies for each career point of the director.
For example, director 1 has directed 17 films in total.
at the point where the director has directed only one movie (movies_tag ==1), the similarity score would be blank, because there needs to be at least two movies to calculate the similarity score.
at the point where the director has directed two movies (movies_tag == 2), the similarity score would be the Jaccard Similarity of the 1st and 2nd movie.
at the point where the director has directed two movies (movies_tag == 3), the similarity score would be the average Jaccard Similarity of 1st/2nd movie, 2nd/3rd movie, and 1st/3rd movie (three movie pairs)
This would continue until the director's 17th film, where the similarity score would be the average Jaccard Similarity between the 17 movies, or 17C2 movie pairs equating 136 movie combinations.
The illustrative sample is given below, consisting of 10 directors with 18 different movie genres.
Because I need to calculate the genre similarity score on each director at each point of the director's career,
I have come up with a loop (that walks over each director id) to which another loop is embedded (that walks over each point of the director's career)
xtset directorid movies_tag
su directorid, meanonly
gen Temporary_Jaccard = 0
gen Jaccard = 0
gen denominator = 0
gen consistency = 0
forvalues i=1/`r(max)' {
levelsof movies_tag if directorid == `i', local(movielist)
foreach j of local movielist {
local consider = `j'-1
forvalues k = 1/`consider' {
gen Temporary = 0
gen Union = 0
replace Temporary = Temporary + 1 if directorid == `i' & gen_Action == 1 & L`k'.gen_Action == 1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Adult== 1 & L`k'.gen_Adult==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Adventure== 1 & L`k'.gen_Adventure==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Animation== 1 & L`k'.gen_Animation==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Biography== 1 & L`k'.gen_Biography==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Comedy== 1 & L`k'.gen_Comedy==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Crime== 1 & L`k'.gen_Crime==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Documentary== 1 & L`k'.gen_Documentary==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Drama== 1 & L`k'.gen_Drama==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Family== 1 & L`k'.gen_Family==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Fantasy== 1 & L`k'.gen_Fantasy==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_FilmNoir== 1 & L`k'.gen_FilmNoir==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_GameShow== 1 & L`k'.gen_GameShow==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_History== 1 & L`k'.gen_History==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Horror== 1 & L`k'.gen_Horror==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Music== 1 & L`k'.gen_Music==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Musical== 1 & L`k'.gen_Musical==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Mystery== 1 & L`k'.gen_Mystery==1
replace Union = Union + 1 if directorid==`i' & (gen_Action==1 | L`k'.gen_Action==1)
replace Union = Union + 1 if directorid==`i' & (gen_Adult==1 | L`k'.gen_Adult==1)
replace Union = Union + 1 if directorid==`i' & (gen_Adventure==1 | L`k'.gen_Adventure==1)
replace Union = Union + 1 if directorid==`i' & (gen_Animation==1 | L`k'.gen_Animation==1)
replace Union = Union + 1 if directorid==`i' & (gen_Biography==1 | L`k'.gen_Biography==1)
replace Union = Union + 1 if directorid==`i' & (gen_Comedy==1 | L`k'.gen_Comedy==1)
replace Union = Union + 1 if directorid==`i' & (gen_Crime==1 | L`k'.gen_Crime==1)
replace Union = Union + 1 if directorid==`i' & (gen_Documentary==1 | L`k'.gen_Documentary==1)
replace Union = Union + 1 if directorid==`i' & (gen_Drama==1 | L`k'.gen_Drama==1)
replace Union = Union + 1 if directorid==`i' & (gen_Family==1 | L`k'.gen_Family==1)
replace Union = Union + 1 if directorid==`i' & (gen_Fantasy==1 | L`k'.gen_Fantasy==1)
replace Union = Union + 1 if directorid==`i' & (gen_FilmNoir==1 | L`k'.gen_FilmNoir==1)
replace Union = Union + 1 if directorid==`i' & (gen_GameShow==1 | L`k'.gen_GameShow==1)
replace Union = Union + 1 if directorid==`i' & (gen_History==1 | L`k'.gen_History==1)
replace Union = Union + 1 if directorid==`i' & (gen_Horror==1 | L`k'.gen_Horror==1)
replace Union = Union + 1 if directorid==`i' & (gen_Music==1 | L`k'.gen_Music==1)
replace Union = Union + 1 if directorid==`i' & (gen_Musical==1 | L`k'.gen_Musical==1)
replace Union = Union + 1 if directorid==`i' & (gen_Mystery==1 | L`k'.gen_Mystery==1)
replace Temporary_Jaccard = (Temporary/Union) + Temporary_Jaccard if directorid==`i' & movies_tag == `j'
drop Temporary Union
}
egen Sum_Temporary_jaccard = sum(Temporary_Jaccard) if directorid == `i' & movies_tag <= `j'
replace Jaccard = Sum_Temporary_jaccard
replace denominator = `consider' * (`consider'+1) / 2 if directorid ==`i' & movies_tag == `j'
replace consistency = Jaccard / denominator if directorid ==`i' & movies_tag == `j'
drop Sum_Temporary_jaccard
}
}
My own translation of code is as follows:
1. For each director (identified by 'directorid'),
2. For each career point (identified by 'movielist'),
3. Calculate the sum of pairwise Jaccard Similarity score between the director's latest movie in the career point and prior movies and save it in the variable 'Temporary_Jaccard'.
For example, if j = 3, pairwise similarity of movie 1/3 and movie 2/3 would be calculated.
4. Calculate the sum of 'Temporary_Jaccard' until the career point, which would return the sum of pairwise Jaccard Similarity between all movie combinations until the career point.
Save the value in the variable 'Sum_Temporary_jaccard', then divide it by the the number of movie combinations, using the variable 'denominator'. Save the final similarity score in the variable `consistency'.
While my code returns the correct similarity score, it incorporates three loops (foreach, foreach, forvalues) so that it takes too long time to go through the whole dataset incorporating thousands of directors.
Would there be a way to derive the desired output without using so many loops embedded together? I would really appreciate it if there's an alternative way that is much faster and efficient.
Thank you for reading.
I would like to ask for your help on using multiple loops on Stata.
I want to measure how similar are the genres used by each director on her/his films - on each point of the director's career.
The genre similarity scores will be calculated using two steps:
1) I will measure the Jaccard Similarity between the movie pairs, which would be calculated by dividing the number of genres in both movies by the number of genres in either movie.
2) I will take the average Jaccard Similarity of the movies for each career point of the director.
For example, director 1 has directed 17 films in total.
at the point where the director has directed only one movie (movies_tag ==1), the similarity score would be blank, because there needs to be at least two movies to calculate the similarity score.
at the point where the director has directed two movies (movies_tag == 2), the similarity score would be the Jaccard Similarity of the 1st and 2nd movie.
at the point where the director has directed two movies (movies_tag == 3), the similarity score would be the average Jaccard Similarity of 1st/2nd movie, 2nd/3rd movie, and 1st/3rd movie (three movie pairs)
This would continue until the director's 17th film, where the similarity score would be the average Jaccard Similarity between the 17 movies, or 17C2 movie pairs equating 136 movie combinations.
The illustrative sample is given below, consisting of 10 directors with 18 different movie genres.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(directorid movies_tag gen_Action gen_Adult gen_Adventure gen_Animation gen_Biography gen_Comedy gen_Crime gen_Documentary gen_Drama gen_Family gen_Fantasy gen_FilmNoir gen_GameShow gen_History gen_Horror gen_Music gen_Musical gen_Mystery) 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 3 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 4 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 1 5 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 6 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 7 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 8 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 9 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 10 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 11 0 0 0 0 0 1 0 0 0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 1 0 0 0 0 0 0 0 0 0 0 0 0 3 56 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 3 57 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 4 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 4 3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 4 4 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 4 5 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 5 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 5 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 end
Because I need to calculate the genre similarity score on each director at each point of the director's career,
I have come up with a loop (that walks over each director id) to which another loop is embedded (that walks over each point of the director's career)
xtset directorid movies_tag
su directorid, meanonly
gen Temporary_Jaccard = 0
gen Jaccard = 0
gen denominator = 0
gen consistency = 0
forvalues i=1/`r(max)' {
levelsof movies_tag if directorid == `i', local(movielist)
foreach j of local movielist {
local consider = `j'-1
forvalues k = 1/`consider' {
gen Temporary = 0
gen Union = 0
replace Temporary = Temporary + 1 if directorid == `i' & gen_Action == 1 & L`k'.gen_Action == 1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Adult== 1 & L`k'.gen_Adult==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Adventure== 1 & L`k'.gen_Adventure==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Animation== 1 & L`k'.gen_Animation==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Biography== 1 & L`k'.gen_Biography==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Comedy== 1 & L`k'.gen_Comedy==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Crime== 1 & L`k'.gen_Crime==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Documentary== 1 & L`k'.gen_Documentary==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Drama== 1 & L`k'.gen_Drama==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Family== 1 & L`k'.gen_Family==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Fantasy== 1 & L`k'.gen_Fantasy==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_FilmNoir== 1 & L`k'.gen_FilmNoir==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_GameShow== 1 & L`k'.gen_GameShow==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_History== 1 & L`k'.gen_History==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Horror== 1 & L`k'.gen_Horror==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Music== 1 & L`k'.gen_Music==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Musical== 1 & L`k'.gen_Musical==1
replace Temporary = Temporary + 1 if directorid==`i' & gen_Mystery== 1 & L`k'.gen_Mystery==1
replace Union = Union + 1 if directorid==`i' & (gen_Action==1 | L`k'.gen_Action==1)
replace Union = Union + 1 if directorid==`i' & (gen_Adult==1 | L`k'.gen_Adult==1)
replace Union = Union + 1 if directorid==`i' & (gen_Adventure==1 | L`k'.gen_Adventure==1)
replace Union = Union + 1 if directorid==`i' & (gen_Animation==1 | L`k'.gen_Animation==1)
replace Union = Union + 1 if directorid==`i' & (gen_Biography==1 | L`k'.gen_Biography==1)
replace Union = Union + 1 if directorid==`i' & (gen_Comedy==1 | L`k'.gen_Comedy==1)
replace Union = Union + 1 if directorid==`i' & (gen_Crime==1 | L`k'.gen_Crime==1)
replace Union = Union + 1 if directorid==`i' & (gen_Documentary==1 | L`k'.gen_Documentary==1)
replace Union = Union + 1 if directorid==`i' & (gen_Drama==1 | L`k'.gen_Drama==1)
replace Union = Union + 1 if directorid==`i' & (gen_Family==1 | L`k'.gen_Family==1)
replace Union = Union + 1 if directorid==`i' & (gen_Fantasy==1 | L`k'.gen_Fantasy==1)
replace Union = Union + 1 if directorid==`i' & (gen_FilmNoir==1 | L`k'.gen_FilmNoir==1)
replace Union = Union + 1 if directorid==`i' & (gen_GameShow==1 | L`k'.gen_GameShow==1)
replace Union = Union + 1 if directorid==`i' & (gen_History==1 | L`k'.gen_History==1)
replace Union = Union + 1 if directorid==`i' & (gen_Horror==1 | L`k'.gen_Horror==1)
replace Union = Union + 1 if directorid==`i' & (gen_Music==1 | L`k'.gen_Music==1)
replace Union = Union + 1 if directorid==`i' & (gen_Musical==1 | L`k'.gen_Musical==1)
replace Union = Union + 1 if directorid==`i' & (gen_Mystery==1 | L`k'.gen_Mystery==1)
replace Temporary_Jaccard = (Temporary/Union) + Temporary_Jaccard if directorid==`i' & movies_tag == `j'
drop Temporary Union
}
egen Sum_Temporary_jaccard = sum(Temporary_Jaccard) if directorid == `i' & movies_tag <= `j'
replace Jaccard = Sum_Temporary_jaccard
replace denominator = `consider' * (`consider'+1) / 2 if directorid ==`i' & movies_tag == `j'
replace consistency = Jaccard / denominator if directorid ==`i' & movies_tag == `j'
drop Sum_Temporary_jaccard
}
}
My own translation of code is as follows:
1. For each director (identified by 'directorid'),
2. For each career point (identified by 'movielist'),
3. Calculate the sum of pairwise Jaccard Similarity score between the director's latest movie in the career point and prior movies and save it in the variable 'Temporary_Jaccard'.
For example, if j = 3, pairwise similarity of movie 1/3 and movie 2/3 would be calculated.
4. Calculate the sum of 'Temporary_Jaccard' until the career point, which would return the sum of pairwise Jaccard Similarity between all movie combinations until the career point.
Save the value in the variable 'Sum_Temporary_jaccard', then divide it by the the number of movie combinations, using the variable 'denominator'. Save the final similarity score in the variable `consistency'.
While my code returns the correct similarity score, it incorporates three loops (foreach, foreach, forvalues) so that it takes too long time to go through the whole dataset incorporating thousands of directors.
Would there be a way to derive the desired output without using so many loops embedded together? I would really appreciate it if there's an alternative way that is much faster and efficient.
Thank you for reading.
Comment