dkahle / algstat Goto Github PK
View Code? Open in Web Editor NEWAn R package for algebraic statistics.
An R package for algebraic statistics.
The following will crash
A=matrix(c(1,1,1),1,3);
b=c(100000);
countFiber(A,b);
with the message
sh: line 1: 25994 Aborted (core dumped) '/opt/latte-integrale-1.7.1/bin/count' /tmp/RtmpJWaWTF/2015_06_19_08_45_05/countCode.latte > 'countOut' 2> 'countErr'
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file 'numOfLatticePoints': No such file or directory
Since
A=matrix(c(1,1,1),1,3);
b=c("100000");
countFiber(A,b)
works just fine, I think the bug is due to the internal handling of 100000
in R which is 1e+05
.
rvnorm()
along with endgames provides points on the variety (or semi-algebraic set).
Hi,
would it be possible to extend the functionality of count
so that it takes matrices A
and right-hand sides b
as arguments? That is, that something like
A=matrix(c(1,1,1,1),1,4);
b=c(10);
count(A,b);
is possible, where count(A,b)
is the number of integer points in the b
-fiber of A
, i.e., all non-negative integer solutions u
of Au=b
?
Alternatively, it would also be fine if there would be a method which transforms the set of equations Ax=b, x>=0
into the form demanded by the specifications of count (for the example above: "x1+x2+x3=10","x1>=0","x2>=0","x3>=0"
).
Thanks!
Tobias
library("algstat")
#> Loading required package: mpoly
#> Loading required package: latte
#> Please cite latte! See citation("latte") for details.
#> LattE found in /Applications/latte/bin
#> 4ti2 found in /Applications/latte/bin
#> Loading required package: bertini
#> Please cite bertini! See citation("bertini") for details.
#> Bertini found in /usr/local/bin
#> Loading required package: m2r
#> Please cite m2r! See citation("m2r") for details.
#> M2 found in /Applications/Macaulay2-1.10/bin
#> Please cite algstat! See citation("algstat") for details.
data(handy); handy
#> Handedness
#> Gender Right Left
#> Male 8 3
#> Female 8 1
(A <- genmodel(c(2,2), list(1, 2)))
#> [,1] [,2] [,3] [,4]
#> [1,] 1 0 1 0
#> [2,] 0 1 0 1
#> [3,] 1 1 0 0
#> [4,] 0 0 1 1
count_tables(handy, A = A)
#> Error in `+.mpoly`(t, NA): is.numeric(e2) && length(e2) == 1 is not TRUE
rvnorm()
should allow the w
argument to be a named list of (min, max) pairs. In particular, this will allow us to force one variable to be non-negative.
Hi, I want to use ggmap without signing up for a google key. Is it possible to do that? If so, which maps are available without a key?
Thanks
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.