Git Product home page Git Product logo

debian-gr-systemd-2019's People

Contributors

ana avatar gregoa avatar rlaboiss avatar svillemot avatar tbm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

svillemot gregoa tbm

debian-gr-systemd-2019's Issues

Handling of ties

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.