Code Monkey home page Code Monkey logo

prob-stats's People

Contributors

alessandro-gentilini avatar bob-carpenter avatar brochhagen avatar daniel-wells avatar jsta avatar mitzimorris avatar wardbrian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prob-stats's Issues

Entropy code

I think the code for computing the entropy of a Gaussian has a small bug:

estimate_normal_entropy <- function(M, sigma) {
  y <- rnorm(M, 0, sigma)
  log_p_y <- dnorm(y, 0, sigma, log = TRUE)
  -sum(log_p_y)
}

The last line should be -mean(log_p_y) or -sum(log_p_y)/M.

Also, the simulated values could be contrasted with the closed formula solution:

 gauss_entropy <- function(sigma) 0.5*log(2*pi*exp(1)*sigma^2)

Best,

LS

PDFs do not build

Tried on both Ubuntu and Mac. Same (unclear) error in _main.log

! Extra alignment tab has been changed to \cr.
\endtemplate

l.1800 &
= &
Here is how much of TeX's memory you used:
13684 strings out of 492649
194607 string characters out of 6129622
303592 words of memory out of 5000000
17170 multiletter control sequences out of 15000+600000
87392 words of font info for 153 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
45i,13n,45p,601b,461s stack positions out of 5000i,500n,10000p,200000b,80000s

! ==> Fatal error occurred, no output PDF file produced!

German Umlaut in Einstein Reference

Hi,

this is really a minor cosmetic aspect but since I am German speaker I thought I let you know, before I forget it:

The RMarkdown for the section "7 Statistical Inference and Inverse Problems" contains the following reference:

116 Einstein, Albert. 1907. On the relativity principle and the conclusions drawn from it. Jahrbuch der Radioaktivitfit and Elektronik 4:411–462.

The journal ist actually called

Jahrbuch der Radioaktivität und Elektronik

and the original title of his work was

Über das Relativitätsprinzip und die aus demselben gezogenen Folgerungen

 

can't compile from command line

I'm running the command:

Rscript -e "bookdown::render_book('index.Rmd')"

but this fails with the message:

Quitting from lines 5012-5027 (_main.Rmd)
Error in vars(chain) : could not find function "vars"
Calls: ... withVisible -> eval -> eval -> facet_wrap -> ggproto -> as.quoted

Any suggestions as to what's going wrong? Thanks!

`quarto preview quarto-book/` does not work

I tried to run the command quarto preview quarto-book/, but it's throwing an error. What do I do?

Preparing to preview
[ 1/10] index.qmd
[ 2/10] intro.qmd
[ 3/10] random-variables.qmd

Starting python3 kernel...Done

Executing 'random-variables.ipynb'
  Cell 1/11: ''...Done
  Cell 2/11: ''...

An error occurred while executing the following cell:
------------------
model = CmdStanModel(stan_file = "stan/flip.stan")
------------------


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[2], line 1
----> 1 model = CmdStanModel(stan_file = "stan/flip.stan")

File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\cmdstanpy\model.py:215, in CmdStanModel.__init__(self, model_name, stan_file, exe_file, force_compile, stanc_options, cpp_options, user_header, compile)
    211 if not cmdstan_version_before(
    212     2, 27
    213 ):  # unknown end of version range
    214     try:
--> 215         model_info = self.src_info()
    216         if 'parameters' in model_info:
    217             self._fixed_param |= len(model_info['parameters']) == 0

File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\cmdstanpy\model.py:321, in CmdStanModel.src_info(self)
    319 if self.stan_file is None or cmdstan_version_before(2, 27):
    320     return {}
--> 321 return compilation.src_info(str(self.stan_file), self._compiler_options)

File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\cmdstanpy\compilation.py:348, in src_info(stan_file, compiler_options)
    338 def src_info(
    339     stan_file: str, compiler_options: CompilerOptions
    340 ) -> Dict[str, Any]:
    341     """
    342     Get source info for Stan program file.
    343
    344     This function is used in the implementation of
    345     :meth:`CmdStanModel.src_info`, and should not be called directly.
    346     """
    347     cmd = (
--> 348         [os.path.join(cmdstan_path(), 'bin', 'stanc' + EXTENSION)]
    349         # handle include-paths, allow-undefined etc
    350         + compiler_options.compose_stanc(None)
    351         + ['--info', str(stan_file)]
    352     )
    353     proc = subprocess.run(cmd, capture_output=

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.