Open Kerl13 opened 5 years ago
Commit: 693df81
Branch pushed to git repo; I updated commit sha1. New commits:
693df81 | Boltzmann sampling: module-wide documentation |
Branch pushed to git repo; I updated commit sha1. New commits:
75ec37c | Use sage's randstate API for random number generation |
Branch pushed to git repo; I updated commit sha1. New commits:
8b40cc1 | Boltzmann: document the generator module |
Branch pushed to git repo; I updated commit sha1. New commits:
1da6bd2 | Boltzmann(Oracle): pep8 + fix doctests |
Branch pushed to git repo; I updated commit sha1. New commits:
5303f2a | Boltzmann: fix import statements in doctests |
Description changed:
---
+++
@@ -1 +1,13 @@
+The Boltzmann method is a framework whose describe how to build a uniform random generator for a family of discrete structures from a grammar describing that family.
+Our goal is to design a high-level and user-friendly API with :
+* handling of grammars for monovariate/multivariate and unlabeled/labeled/increasingly labeled structures.
+* use of the state of the art oracles (newton iteration, multiparametric tuning, etc)
+* fast sampling of large structures (size 1e6 and more)
+
+In this ticket we provide a implementation of the Boltzmann method introduced by Duchon, Flajolet, Louchard and Schaeffer (see [DuFlLoSc04](http://algo.inria.fr/flajolet/Publications/DuFlLoSc04.pdf)) with the following features :
+* labeled and unlabeled classes defined with +, *, Seq and recursive definition
+* an oracle dealing with explicit generating function
+* an oracle based on the work of Darasse (see [his thesis](http://www.ortsa.com/lip6_these/docs/these.pdf)) : less accurate but more generic
+* a fast Cython implementation of a generic generator
+
Changed author from Martin Pépin to Martin Pépin, Matthieu Dien
New commits:
5303f2a | Boltzmann: fix import statements in doctests |
Description changed:
---
+++
@@ -1,4 +1,4 @@
-The Boltzmann method is a framework whose describe how to build a uniform random generator for a family of discrete structures from a grammar describing that family.
+The Boltzmann method is a framework that describes how to build a uniform random generator for a family of discrete structures from a grammar describing that family.
Our goal is to design a high-level and user-friendly API with :
* handling of grammars for monovariate/multivariate and unlabeled/labeled/increasingly labeled structures.
Branch pushed to git repo; I updated commit sha1. New commits:
a92c66b | Boltzmann: more docs + doc fixes |
Branch pushed to git repo; I updated commit sha1. New commits:
f42a856 | Boltzmann: TODO list |
Please have a look at the patchbot warnings (click on the color round icon on top of the page) and in particular the plugins results.
New commits:
b55d493 | moving the todo list in "our" directory |
Hi Martin!
the species implementation is currently undergoing the long awaited overhaul. Travis and I have just finished a lazy series implementation, which is much more robust than what we had previously. Ticket #32367 replaces the old (and somewhat unreliable) LazyPowerSeries with our new one.
Do you think we should try to see whether a uniform user interface for defining a grammar is possible?
Replying to Martin Rubey:
Hi Martin!
the species implementation is currently undergoing the long awaited overhaul. Travis and I have just finished a lazy series implementation, which is much more robust than what we had previously. Ticket #32367 replaces the old (and somewhat unreliable) LazyPowerSeries with our new one.
Do you think we should try to see whether a uniform user interface for defining a grammar is possible?
Hi all ! To be transparent, we had an informal discussion this afternoon with Martin Pépin about that same issue !
If you remember, a long time ago (before covid), i proposed to have a general meeting of all people interested in making a plan for the whole analytic combinatorics stuff in Sage (species, ore algebras, (multi-variate, lazy, etc) power series, Bolzmann samplers, singularity analysis, asymptotic expansions, etc). Most people answered positively but wanted to postpone the date, unfortunately the delays were too short as the grant was ending. Maybe, we could revive the idea. What do you think ?
I am all for it! I have no teaching in February. Until then, zoom and email is fine for me!
Hi!
First an important note: Matthieu and I (temporarily) moved away from this ticket about 3 years ago as we decided to implement a standalone python library available here (usainboltz). This means that the branch tied to this ticket is obsolete and should not be used.
That being said:
It doesn't prevent us from adding usainboltz to sage! Adding it as an optional package seems right to me (is it?)
I agree with you that having a uniform user interface for defining grammars would be great. And the species, if they work, seem to be a very good candidate to me. I'd love to see some nice integration with usainboltz (and other existing tools) so that sampling objects described by a species becomes as simple as:
>>> sampler = my_specy.get_boltzmann_sampler()
>>> sampler(size_in=[1000, 2000])
<some big object>
I'm all in to work on this as well!
Changed branch from u/MatthieuDien/boltzmann_samplers_for_combinatorial_grammars to u/MartinPepin/usainboltz
Branch pushed to git repo; I updated commit sha1. New commits:
e72b3a7 | Add usainboltz as an optional package |
I added usainboltz as a pip package following https://doc.sagemath.org/html/en/developer/packaging.html#python-based-packages.
But something must be wrong with what I did, I can't install usainboltz using sage -i
:
$ ./sage -i usainboltz
[ a log of log about sage checking if it needs to rebuild stuff ]
Error: package 'usainboltz' not found
Note: if it is an old-style package, installing these is no longer supported
Note that ./sage --optional
and ./sage --info usainboltz
both see usainboltz. I might need a bit of help to understand what is happening.
It worked well for me, i could successfully execute binarytrees.ipynb
.
Usain Boltz is a !Python/Cython/C++ library that automates the random generation of tree-like structures. It allows to describe a combinatorial structure using a specification in the style of “Analytic Combinatorics” and, using the Boltzmann sampling framework, it produces a fast, uniform, and approximate size sampler of objects described by this specification.
https://gitlab.com/ParComb/usain-boltz
Depends on #34251
CC: @sagetrac-tmonteil @MatthieuDien @Kerl13 @mantepse
Component: packages: optional
Author: Martin Pépin, Matthieu Dien
Branch/Commit: u/MartinPepin/usainboltz @
d8e42b9
Reviewer: Thierry Monteil
Issue created by migration from https://trac.sagemath.org/ticket/27526