wmay / oc Goto Github PK
View Code? Open in Web Editor NEWoc — Optimal Classification Roll Call Analysis Software
Home Page: https://cran.r-project.org/package=oc
oc — Optimal Classification Roll Call Analysis Software
Home Page: https://cran.r-project.org/package=oc
The oc object does not store its estimate of the polarity of each bill, i.e., whether OC predicts a Yay or a Nay for being on the left of that bill's cutpoint. (see reprex in #2). Would be great to have from a user perspective.
In R >=4.2, plot.OCobject
raises an error:
Error in axis(2, at = yt, ...) :
formal argument "at" matched by multiple actual arguments
It would be reassuring to have the rownames of the $rollcall output be named by the rollcall vote IDs as identified in the rollcall
object. I presume it is ordered the same way as the columns of the input matrix (?), but better if it's tracked.
This is done in the legislator output:
library(oc)
data(sen90)
# input data has vote IDs
head(colnames(sen90$votes))
#> [1] "Vote 1" "Vote 2" "Vote 3" "Vote 4" "Vote 5" "Vote 6"
# Run OC
sen90.1d <- oc(sen90, dims = 1, polarity = c(7))
# But output data has no rollcall IDs
head(sen90.1d$rollcall)
#> correctYea wrongYea wrongNay correctNay PRE normVector1D midpoints
#> [1,] 38 13 1 48 0.64102564 0 55.50
#> [2,] 47 1 13 38 0.64102564 0 55.50
#> [3,] 52 6 2 40 0.82608696 0 59.50
#> [4,] 50 22 4 6 0.07142857 0 14.75
#> [5,] 68 5 2 9 0.50000000 0 14.75
#> [6,] 2 0 15 75 0.11764706 0 3.50
Created on 2024-01-10 with reprex v2.0.2
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.