[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Weighting results

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 1

File: mysql-logo.jpg (75KB, 1020x426px) Image search: [Google]
mysql-logo.jpg
75KB, 1020x426px
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 query
SELECT * 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 aliaseses

SELECT 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.
Thread posts: 11
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.