Hey /g/,
I'm working on a system that pulls and ranks certain YouTube videos in order to find content with a high approval from the people watching but that isn't very popular.
I use the querySELECT * FROM `videos` ORDER BY LIKECOUNT / VIEWS * (VIEWS / SUBSCRIBERS) * LIKERATIO DESC, which does the job fairly well in terms of finding relatively underappreciated videos.
What I'd like to do is add some sort of small multiplier that gives larger channels preference over smaller ones.
I'd like a channel with, for example, 20k subs and 98% approval to be on the same scale as a channel with 1M with 96% and a channel with 30 subscribers with 100% overwhelming approval.
Is there some sort of math or something MySQL that would allow me to weight these results properly?
Also, I had no idea how impractical using the code tag is for one line
>>56506015
What about just dividing everything by some number?
>>56506015
you need to use column aliasesesSELECT name, LIKECOUNT / VIEWS * (VIEWS / SUBSCRIBERS) * LIKERATIO AS secretsauce FROM `videos` ORDER BY secretsauce DESC
or something similar to this
>>56506086
Is there any way I could take that and weight it based on subscriber count? Also, all results are relative, so something like(secretsauce*.90)+(subscribers*.10)wouldn't work
>>56506143
what about (secretsauce * subscribers) / subscribers
>>56506237
They'd just cancel each other out, like (2 * 5) / 5, but diving it by subs times some sort of number to weight the sub count very lightly would be perfect
>>56506343
so like a weighted t-test or a ANOVA of some kind?
I don't have a solution, but I think what you're doing is cool, and when you've completed the software, I'd like to be able to use it if you wish to make it available. Do you have a github account or something I could watch for progress?
>>56507678
THIS
>>56506015
Each video should have a creator ID field of some sort. Then it becomes a matter of finding the ID in a list of users and getting the relevant channel stats. Probably need at least 2-3 tables for this and some JOINing.