Polis: Handling Zeros

Created on 1 Oct 2020  路  7Comments  路  Source: compdemocracy/polis

  • Method proposal:

    • Instead of using KNN with a Euclidean/Minkowski metric, use a metric defined as follow:



      • For any given participants a and b, define the distance d(a,b) as $$d(a,b)=\frac{\sum_{i \in C(a,b)} A_i(a, b)} {|C(a,b)| + 1}$$





        • Where C(a,b) is the set of comment on which A & B have both voted



        • $$A_i(a,b)$$ is 0 if votes agree, and 1 if votes disagree on comment $$i$$







          • There are variations to explore here wrt how we treat passes







        • $$|X|$$ is the number of elements in set X



        • The $$+1$$ in the denominator is a "psuedo-count", a sort of dumn prior







          • We can tune this if we want to bias towards needing more evidence before we decide two individuals are close, but $$+1$$ is considered a relatively uninformative prior and probably makes sense as a starting point




          • This prior could be tuned so that in cases where $$C^ $$ is empty for some given pair of participants p and q, that $$d(p, q)$$ comes out to the pairwise average of $$d$$ across the set of participants in the conversation that _have_ voted










  • Narrative: [[Christopher Small]] notes on Feb 29 2020 (to clean up/integrate):

    • The basic idea is this: You need to definte the igraph such that you're only counting overlapping voting structure when you compare for NN.

    • If you can give leiden a pairwise distance matrix, you could compute that by thinking out how to define distance thoughtfully

    • But you have to be thoughtful about how you construct that distance matrix

    • PCA & jetpack



      • And this is where doing PCA first, and then using our jetpack may be helpful.


      • Jetpack effectively acts as a "dumb prior" using the average of all votes


      • I'm still really interested in using an actual Bayesian for a prior, but unfortunately the new Bayesian algorithm is not open source yet.



    • Alternative



      • But even something really naive, just focusing on distance as overlap, and using some kind of dumn psuedocount prior (average guess of what the answer would be for 2 random people) when you don't have data would be a huge step up.


      • It's possible that there's a more direct way to encode the Aggrees with / disagrees with graphs up using igraph


      • Hmm... thinking aobut this more


      • We're using knn graph for for leiden right?


      • That maybe solves the "tail end" problem of no overlapping votes, because we lop that part of the tail off with knn. We only have people in the same neightborhood if we know something about them.


      • in relation to eachother, that is


      • And it's ok if there's missing data, because the network is actually what fills that out



math

Most helpful comment

@ThenWho You should have a community team invite now.

All 7 comments

Migrated from the knowledge base

We're not using KNN in the core repo. Unless this is secretly a proposal to move to UMAP for the core tool :thinking:

We could be doing Principal Coordinates Analysis (PCoA), which uses distances instead of position vectors, and that should in theory be amenable to this sort of treatment, and is (IIRC), closer to what DWNominate does. But then complexity grows with number of participants, so may not be ideal for the core math module.

Btw, can you add the p:math tag here @patcon ? 馃檹

Done and done! 馃檹

@pol-is/core could we add @ThenWho to @pol-is/community team so that he has triage permission too?

@ThenWho You should have a community team invite now.

Thanks so much! 馃檹馃徏

This isn't really relevant to anything currently in the core Polis, so closing.

Was this page helpful?
0 / 5 - 0 ratings