rlaboiss / debian-gr-systemd-2019 Goto Github PK
View Code? Open in Web Editor NEWStatistical analysis of the Debian General Resolution “Init systems and systemd” 2019
Statistical analysis of the Debian General Resolution “Init systems and systemd” 2019
IMHO, ties in ballots need to be taken care of more carefully. I suggest to add these lines to your preprocessing:
choices = scipy.stats.rankdata(choices)
# Add a small random, to avoid numerical collapse of "factanal" in R
choices += numpy.random.rand(*choices.shape) * 1e-3
choices = list(choices)
The first line will take care of normalizing different, yet equivalent, votes. For example, someone voting 12344444 likely has the same intention as someone voting 12388888; likely some will even be aware that it does not matter for the voting method. So these should be treated equally. With the standard tie-averaging approach, they will be transformed to 12366666.
Now because this removes one factor (value range) from the data, it introduces a correlation into the data that kills R factanal. To make the analysis still work, I add random noise of a magnitude substantially less than the rank differences, just enough to ensure the matrix is invertible.
I don't know which approach is better (I'd argue that your approach is more sensitive to measuring whether there are people with extreme opinions that vote, e.g., 18888888); but in lieu of a formal argument for one over the other, I'd argue that observations not supported by both more likely are artifacts than true observations. Some observations still persist (AG and DH are pairs); others look quite a bit different (no F+B+fd factor; E+G decompose into two factors). I'd argue that in this analysis, the factors mostly decompose into whether people liked (1) DH best, (2) E best, (3) G best, (4) A best. This is a very plausible outcome; given that F+B were overall popular it is plausible that they are also often ranked 2nd and 3rd.
===== Exploratory factorial analysis
Call:
factanal(x = ~F + B + A + D + H + E + G + fd, factors = 4, data = dat,
scores = "regression", rotation = "promax")
Uniquenesses:
F B A D H E G fd
0.140 0.300 0.005 0.290 0.158 0.005 0.005 0.629
Loadings:
Factor1 Factor2 Factor3 Factor4
F -0.501 -0.305 -0.207 -0.214
B -0.247 -0.568 -0.197
A -0.194 1.041
D 0.980 -0.193 -0.108
H 1.016 -0.154
E -0.154 1.133 -0.157
G -0.166 -0.124 1.143
fd -0.432 0.154 -0.115 -0.321
Factor1 Factor2 Factor3 Factor4
SS loadings 2.580 1.752 1.478 1.285
Proportion Var 0.323 0.219 0.185 0.161
Cumulative Var 0.323 0.542 0.726 0.887
Factor Correlations:
Factor1 Factor2 Factor3 Factor4
Factor1 1.000 0.186 0.548 -0.480
Factor2 0.186 1.000 0.203 -0.285
Factor3 0.548 0.203 1.000 -0.523
Factor4 -0.480 -0.285 -0.523 1.000
Test of the hypothesis that 4 factors are sufficient.
The chi square statistic is 6331.72 on 2 degrees of freedom.
The p-value is 0
===== Correlation between factors #1 and #2
Pearson's product-moment correlation
data: sc[, 1] and sc[, 2]
t = -5.3537, df = 423, p-value = 1.417e-07
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.3389097 -0.1606376
sample estimates:
cor
-0.2519095
But again - I'd not put too much trust on any observation not supported by both variants. Changing just a little bit to the preprocessing does produce quite different results.
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.