brave-intl / bat-publisher Goto Github PK
View Code? Open in Web Editor NEWRoutines to identify publishers for the BAT. ( deprecated )
License: Mozilla Public License 2.0
Routines to identify publishers for the BAT. ( deprecated )
License: Mozilla Public License 2.0
The procedure implemented by Synopsis.prototype.weights
in index.js determines how Brave distributes its votes to publishers according to the caller-supplied attention weights w_i and publisher pin weights p_i.
The procedure to distribute n votes is currently simply to draw a multinomial sample of publishers weighted by the w_i, ignoring the p_i. (Presumably the caller just sets w_i = p_i where p_i is specified, but I don't know; the caller is somewhere in browser-laptop or something.)
After #24 as it stands right now, the procedure to distribute n votes will become something like this:
The attention weights and the pin weights are independent: a pinned publisher can have votes from step (2), arising from pinning, and from step (3), arising from attention.
(An n-way multinomial sample with k prescribed weights is an array of k counts adding up to n, equivalent to counting up a sequence of n independent categorical samples with the k prescribed weights -- i.e., an n-way multinomial sample is an array of counts from rolling a k-sided die n times.)
From what I have gathered, there are a few criteria constraining the procedure:
All this should be written down in a living document that we can use to assess (a) whether Brave is intended to do something sensible and (b) whether Brave actually implements what we intend.
Requests to identity which return the same publisher should also return the same properties.
https://ledger.mercury.basicattentiontoken.org/v3/publisher/identity?publisher=washingtonpost.com
returns publisher: "washingtonpost.com"
and the property verified: true
.
https://ledger.mercury.basicattentiontoken.org/v3/publisher/identity?publisher=www.washingtonpost.com
returns also publisher: "washingtonpost.com"
but the property verified
is missing.
random-lib doesn't generate a perfectly uniform float distribution, see brave/browser-laptop#6944 for details.
this has been discussed before; opening here so that it doesn't get lost.
https://github.com/brave-intl/bat-publisher/blob/master/index.js#L309
it should be used to tailor the behavior of Synopsis.winners
... it should be a number from 0 to 100 (if outside that range, it is ignored). it specifies where the long tail starts when switching from proportional to statistical voting. the default value is 0
, indicating statistical voting throughout.
See brave/browser-laptop#6944 for context; random-lib<3.0.0 has bias in its random integer generation.
Line 376 in 13686d8
All of the weights presumably have the same magnitude. The current logic sums them in descending order, adding highest weights first, which maximizes the approximation error of floating-point arithmetic. With #24 as it stands now, they will be summed in randomized order. To minimize the approximation error, the smallest terms should be added first.
the scraper finds the channel URL, which is what the creator has authenticated with.
with https://www.youtube.com/watch?v=7CFlMfkEYsg we get youtube#channel:alexwykoff
when we should get youtube#channel:UCOHbXC47OvFe-BCU2J0HerA
which is the actual YouTube identifier.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.