Re: [julia-users] Package structure
Petr, Would you like me to prepare a simple pull request tomorrow? Regards, Rob Sent from my iPhone On Jan 10, 2015, at 6:22 PM, Petr Krysl krysl.p...@gmail.com wrote: Hello everybody, I wonder if I could get some advice on how to structure a package? I could see how the SRC and TEST folders had a place in the package structure, but so far I could not discern a systematic way for access to examples that use the package. In particular, when I create a package (clone()),, and the package has an EXAMPLES folder, none of the stuff in that folder is actually visible at the REPL... How should this be handled? Thanks, P
Re: [julia-users] Environment variables on Windows
Thanks Isaiah! Sent from my iPhone On Nov 22, 2014, at 9:44 PM, Isaiah Norton isaiah.nor...@gmail.com wrote: It acts like a dictionary, so you need square brackets: ENV[STAN_HOME] (this works cross-platform, modulo platform conventions) On Sun, Nov 23, 2014 at 12:11 AM, Rob J. Goedman goed...@icloud.com wrote: Hi, In Stan.jl and Jags.jl I look for environment variables. On unix ``` ccall( (:getenv, libc), Ptr{Uint8}, (Ptr{Uint8},), bytestring(var)) ``` works fine. But not on Windows. I've seen ENV(STAN_HOME) mentioned (on http://rosettacode.org/wiki/Environment_variables#Julia , can't try that myself). Is that indeed how to get hold of environment variables? Thanks, Rob J. Goedman goed...@mac.com
[julia-users] Conversion of output file diagnostic_file values (theta in below bernoulli example)
Hi, I'm trying to figure out how to convert, in the basic_estimators bernoulli example, theta (and the gradient) in the bernoulli_samples.csv and bernoulli_diagnostics.csv files as produced by: run(`./bernoulli sample random seed=1 data file=bernoulli.data.R output file=bernoulli_samples.csv diagnostic_file=bernoulli_diagnostics.csv`). Thanks a lot, Rob J. Goedman goed...@icloud.com Warmup took (0.011) seconds, 0.011 seconds total Sampling took (0.034) seconds, 0.034 seconds total Mean MCSE StdDev5% 50% 95% N_Eff N_Eff/s R_hat lp__-8.8 3.5e-02 7.4e-01 -10 -8.5 -8.344113124 1.0e+00 accept_stat__ 0.90 4.7e-03 1.5e-01 0.58 0.96 1.0 100029734 1.0e+00 stepsize__ 1.1 6.3e-15 4.4e-15 1.1 1.1 1.1 0.50 15 1.0e+00 treedepth__ 1.7 1.6e-02 4.7e-01 1.0 2.0 2.092027347 1.0e+00 n_leapfrog__ 2.3 3.1e-02 9.5e-01 1.0 3.0 3.092027347 1.0e+00 n_divergent__ 0.00 0.0e+00 0.0e+00 0.00 0.00 0.00 100029734 nan theta 0.50 6.6e-03 1.4e-01 0.26 0.51 0.7244013068 1.0e+00 Samples were drawn using hmc with nuts. For each parameter, N_Eff is a crude measure of effective sample size, and R_hat is the potential scale reduction factor on split chains (at convergence, R_hat=1). Inference for Stan model: bernoulli_model 1 chains: each with iter=(1000); warmup=(0); thin=(1); 1000 iterations saved. Warmup took (0.011) seconds, 0.011 seconds total Sampling took (0.034) seconds, 0.034 seconds total Mean MCSE StdDev5% 50% 95% N_Eff N_Eff/sR_hat lp__-8.8e+00 3.5e-02 7.4e-01 -10 -8.5e+00 -8.3441 13124 1.0e+00 accept_stat__9.0e-01 4.7e-03 1.5e-01 0.58 9.6e-01 1.0 1000 29734 1.0e+00 stepsize__ 1.1e+00 6.3e-15 4.4e-15 1.1 1.1e+00 1.1 0.50 15 1.0e+00 treedepth__ 1.7e+00 1.6e-02 4.7e-01 1.0 2.0e+00 2.0920 27347 1.0e+00 n_leapfrog__ 2.3e+00 3.1e-02 9.5e-01 1.0 3.0e+00 3.0920 27347 1.0e+00 n_divergent__0.0e+00 0.0e+00 0.0e+00 0.00 0.0e+00 0.00 1000 29734 nan theta -4.0e-03 2.9e-02 6.0e-01 -1.1 2.3e-02 0.96441 13127 1.0e+00 p_theta -1.7e-02 5.0e-02 1.6e+00 -2.6 -8.4e-02 2.6 1000 29734 1.0e+00 g_theta -4.5e-04 7.9e-02 1.7e+00 -2.9 6.9e-02 2.7440 13068 1.0e+00 Samples were drawn using hmc with nuts. For each parameter, N_Eff is a crude measure of effective sample size, and R_hat is the potential scale reduction factor on split chains (at convergence, R_hat=1). method = optimize optimize ... initial log joint probability = -8.16567 Iter log prob||dx|| ||grad|| alpha # evals Notes 5 -6.93147 2.54998e-05 2.50688e-12 18 Optimization terminated normally: Convergence detected: change in objective function was below tolerance elapsed time: 0.003743127 seconds (2416 bytes allocated) julia log(0.5) -0.6931471805599453 julia 10*log(0.5) -6.931471805599453
[julia-users] run(`...`) return code
Is there a way to express: run(`ls`) == Nothing run(`ls`) i.e., the first command could be make, the second executing the program if make succeeds? I looked through http://blog.leahhanson.us/running-shell-commands-from-julia.html which is really nice, but does not address this. Thanks, Rob J. Goedman goed...@icloud.com
Re: [julia-users] Stuck in trying to update METADATA
) Cloned goedman/METADATA.jl to my machine 3) Manually copied over my updated package info ( from .julia/v0.3/METADATA/HyperDualNumbers to directory with the cloned goedman/METADATA.jl ) 4) Committed goedman/METADATA.jl to github 5) Created a pull request on base JuliaLang/METADATA.jl (from head goedman/METADATA. Rob J. Goedman goe...@icloud.com On Apr 21, 2014, at 10:12 AM, Robert J Goedman goe...@icloud.com wrote: Hi, In trying to update the registered package HyperDualNumbers (from v0.1.1 to v0.1.2, a few very minor changes to the README.md), I think I got myself in a pickle. I tried to follow the relevant doc section. I don't think I have write access to METADATA. Details on what I did are attached below. Maybe I should not have worked in the .julia/v0.3 directory? But if I were to clone HyperDualNumbers and/or METADATA.jl, how would Pkg.tag() find that? Once I get METADATA updated, to generate a pull request (initially Jiahao was so kind to add the initial version of the package for me), should I use the GitHub tool? Any help would be appreciated! Regards, Rob J. Goedman goe...@icloud.com --- I updated the HyperDualNumbers package in the ~/.julia/v0.3 directory and committed the changes to the git repository and ran Pkg.tag(HyperDualNumbers): julia Pkg.tag(HyperDualNumbers) INFO: Tagging HyperDualNumbers v0.1.2 INFO: Committing METADATA for HyperDualNumbers robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git tag v0.1.0 v0.1.2 robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git show --stat commit d405891a0188a0a3e4cd59156775405b71e63aed Author: Rob J. Goedman goe...@mac.com Date: Mon Apr 21 09:07:30 2014 -0700 Update to tag v0.1.2 README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I was surprised v0.1.1 was not listed. And METADATA does not seem to have been updated for HyperDualNumbers: robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/METADATA git show commit 9ece76e2246e1166aa2d0a0c59ab13e9f9dd747b Merge: 0daf52c cc00e5e Author: Robert J. Ennis r...@sdf.org Date: Mon Apr 21 17:01:45 2014 +0200 Merge pull request #779 from rennis250/metadata-v2 Tag SDL v0.1.2 julia Pkg.available(HyperDualNumbers) 2-element Array{VersionNumber,1}: v0.1.0 v0.1.1 I tried Pkg.publish() anyway and expected to get a rejection because I don't have write permissions, but I think it did not even get to that point: julia Pkg.update() INFO: Updating METADATA... INFO: INFO: INFO: INFO: INFO: INFO: Updating ApproxFun...INFO: Updating HyperDualNumbers...Updating NumericalMath...Updating RevMode...Updating Calculus2...Updating RmathDist...Updating PGM... INFO: Computing changes... INFO: No packages to install, update or remove julia Pkg.publish() ERROR: METADATA is behind origin/metadata-v2 – run `Pkg.update()` before publishing in publish at pkg/entry.jl:308 in anonymous at pkg/dir.jl:28 in cd at file.jl:20 in cd at pkg/dir.jl:28 in publish at pkg.jl:57
[julia-users] Stuck in trying to update METADATA
Hi, In trying to update the registered package HyperDualNumbers (from v0.1.1 to v0.1.2, a few very minor changes to the README.md), I think I got myself in a pickle. I tried to follow the relevant doc section. I don't think I have write access to METADATA. Details on what I did are attached below. Maybe I should not have worked in the .julia/v0.3 directory? But if I were to clone HyperDualNumbers and/or METADATA.jl, how would Pkg.tag() find that? Once I get METADATA updated, to generate a pull request (initially Jiahao was so kind to add the initial version of the package for me), should I use the GitHub tool? Any help would be appreciated! Regards, Rob J. Goedman goed...@icloud.com --- I updated the HyperDualNumbers package in the ~/.julia/v0.3 directory and committed the changes to the git repository and ran Pkg.tag(HyperDualNumbers): julia Pkg.tag(HyperDualNumbers) INFO: Tagging HyperDualNumbers v0.1.2 INFO: Committing METADATA for HyperDualNumbers robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git tag v0.1.0 v0.1.2 robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git show --stat commit d405891a0188a0a3e4cd59156775405b71e63aed Author: Rob J. Goedman goed...@mac.com Date: Mon Apr 21 09:07:30 2014 -0700 Update to tag v0.1.2 README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I was surprised v0.1.1 was not listed. And METADATA does not seem to have been updated for HyperDualNumbers: robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/METADATA git show commit 9ece76e2246e1166aa2d0a0c59ab13e9f9dd747b Merge: 0daf52c cc00e5e Author: Robert J. Ennis r...@sdf.org Date: Mon Apr 21 17:01:45 2014 +0200 Merge pull request #779 from rennis250/metadata-v2 Tag SDL v0.1.2 julia Pkg.available(HyperDualNumbers) 2-element Array{VersionNumber,1}: v0.1.0 v0.1.1 I tried Pkg.publish() anyway and expected to get a rejection because I don't have write permissions, but I think it did not even get to that point: julia Pkg.update() INFO: Updating METADATA... INFO: INFO: INFO: INFO: INFO: INFO: Updating ApproxFun...INFO: Updating HyperDualNumbers...Updating NumericalMath...Updating RevMode...Updating Calculus2...Updating RmathDist...Updating PGM... INFO: Computing changes... INFO: No packages to install, update or remove julia Pkg.publish() ERROR: METADATA is behind origin/metadata-v2 – run `Pkg.update()` before publishing in publish at pkg/entry.jl:308 in anonymous at pkg/dir.jl:28 in cd at file.jl:20 in cd at pkg/dir.jl:28 in publish at pkg.jl:57
Re: [julia-users] All packages for numerical math
Hi Hans, Two additional packages are TaylorSeries (not in METADATA right now) and HyperDualNumbers, which I 'derived' from the C code by the authors (see below links). The entry in your list could look like: ### HyperDualNumbers 0.1.1 --- -- Hyper, eps1,eps1eps2 Automated 1st 2nd order Differentiation [if the function accepts dual numbers] The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf . The Julia package can be found at: https://github.com/goedman/HyperDualNumbers.jl.git . Regards, Rob J. Goedman goed...@icloud.com On Apr 21, 2014, at 1:20 AM, Hans W Borchers hwborch...@gmail.com wrote: I would like to use Julia mostly on applied numerical math problems. I think what I need is an overview of what is available in Base and contributed packages. Therefore I decided to write a short vignette listing all relevant functions and packages, possibly with a short description, usage, and one or two examples. I have identified the items in the following list. I would welcome any suggestions of functions I have overlooked in this area. (Optimization at the moment is not covered by intention.) ### Julia Base 0.2.0 --- -- sin, cos, ... Trigonometric, hyperbolic functions, square root, exponential and logarith functions, etc. factor, gcd, primes Number-theoretic and combinatorial functions factorial, binomial ... gamma, airy, bessel Special functions beta, eta, zeta ... quadgkGauss-Kronrod adaptive integration ### Calculus 0.1.3 --- -- derivative, ... finite-differences numerical derivatives gradient, hessian second-order, gradients and hessians [unfortunately:] finite_difference and complex_step not exported! integrate adaptive Simpson, Monte-Carlo integration differentiate symbolic differentiation ### DualNumbers 0.0.0 (??) --- -- Dual, epsilon Automated Differentiation [if the function accepts dual numbers] ### Cubature 1.0.1 --- -- h/pquadrature one- and multidimensional adaptive integration h/pcubature (Gauss-Kronrod, Genz-Malik, Clenshaw-Curtis) ### Grid 0.2.8 --- -- InterpGridfunction interpolation on (regular) grids [a simpler interp1d() function for irregular grids might still be helpful] ### BSplines 0.0.0 (??) --- -- linear/quadratic/ cubicSplineBFE ### ApproxFun 0.0.0 (??) --- -- Fun generates an approximating function diff, cumsum differentiate or integrate the approximation ### Polynomial 0.0.0 (??) --- -- Poly, polyconstruct polynomial from coefficients resp. roots polyval evaluate the polynomial (Horner scheme) polyint, polyder derivative, anti-derivative of a polynomial roots determine the roots/zeros of the polynomial (as eigenvalues of the companion matrix) [missing is a polyfit() function] ### PowerSeries --- -- series, restrict generates or truncates a (finite) power series (used to determine the Taylor series) ### Roots 0.1.0 --- -- find_zero, fzero bracketing/derivative-free root finding methods [Ridders' method is not implemented !] newton, halleyderivative-based root finding methods multroot multiple roots of (inexact) polynomials ### NLsolve 0.1.1 --- -- nlsolve solves systems of nonlinear equations, based on Newton and trust-region approaches ### ODE 0.0.0 (??) --- -- ode23 Runge-Kutta (2, 3)-method
Re: [julia-users] Stuck in trying to update METADATA
Figured it out, I believe I now have a proper pull request in place. My guess is that until Pkg.publish() works for folks without write access to METADATA (automatically creating a pull request), this is a bit cumbersome. What I did (more maybe for my own benefit :-( in a few weeks): 1) Forked JuliaLang/METADATA.jl to goedman/METADATA.jl 2) Cloned goedman/METADATA.jl to my machine 3) Manually copied over my updated package info ( from .julia/v0.3/METADATA/HyperDualNumbers to directory with the cloned goedman/METADATA.jl ) 4) Committed goedman/METADATA.jl to github 5) Created a pull request on base JuliaLang/METADATA.jl (from head goedman/METADATA. Rob J. Goedman goed...@icloud.com On Apr 21, 2014, at 10:12 AM, Robert J Goedman goed...@icloud.com wrote: Hi, In trying to update the registered package HyperDualNumbers (from v0.1.1 to v0.1.2, a few very minor changes to the README.md), I think I got myself in a pickle. I tried to follow the relevant doc section. I don't think I have write access to METADATA. Details on what I did are attached below. Maybe I should not have worked in the .julia/v0.3 directory? But if I were to clone HyperDualNumbers and/or METADATA.jl, how would Pkg.tag() find that? Once I get METADATA updated, to generate a pull request (initially Jiahao was so kind to add the initial version of the package for me), should I use the GitHub tool? Any help would be appreciated! Regards, Rob J. Goedman goed...@icloud.com --- I updated the HyperDualNumbers package in the ~/.julia/v0.3 directory and committed the changes to the git repository and ran Pkg.tag(HyperDualNumbers): julia Pkg.tag(HyperDualNumbers) INFO: Tagging HyperDualNumbers v0.1.2 INFO: Committing METADATA for HyperDualNumbers robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git tag v0.1.0 v0.1.2 robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git show --stat commit d405891a0188a0a3e4cd59156775405b71e63aed Author: Rob J. Goedman goed...@mac.com Date: Mon Apr 21 09:07:30 2014 -0700 Update to tag v0.1.2 README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I was surprised v0.1.1 was not listed. And METADATA does not seem to have been updated for HyperDualNumbers: robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/METADATA git show commit 9ece76e2246e1166aa2d0a0c59ab13e9f9dd747b Merge: 0daf52c cc00e5e Author: Robert J. Ennis r...@sdf.org Date: Mon Apr 21 17:01:45 2014 +0200 Merge pull request #779 from rennis250/metadata-v2 Tag SDL v0.1.2 julia Pkg.available(HyperDualNumbers) 2-element Array{VersionNumber,1}: v0.1.0 v0.1.1 I tried Pkg.publish() anyway and expected to get a rejection because I don't have write permissions, but I think it did not even get to that point: julia Pkg.update() INFO: Updating METADATA... INFO: INFO: INFO: INFO: INFO: INFO: Updating ApproxFun...INFO: Updating HyperDualNumbers...Updating NumericalMath...Updating RevMode...Updating Calculus2...Updating RmathDist...Updating PGM... INFO: Computing changes... INFO: No packages to install, update or remove julia Pkg.publish() ERROR: METADATA is behind origin/metadata-v2 – run `Pkg.update()` before publishing in publish at pkg/entry.jl:308 in anonymous at pkg/dir.jl:28 in cd at file.jl:20 in cd at pkg/dir.jl:28 in publish at pkg.jl:57
Re: [julia-users] Stuck in trying to update METADATA
Thanks Tomas, I'll keep your suggestions handy and see how often I need this. Pkg.update() I use very frequently, so it is definitely a trade-off. Regards, Rob J. Goedman goed...@icloud.com On Apr 21, 2014, at 2:25 PM, Tomas Lycken tomas.lyc...@gmail.com wrote: ...but I should add that if you are a package maintainer, you should of course file an isse with METADATA and ask for write access =) On Monday, April 21, 2014 11:24:48 PM UTC+2, Tomas Lycken wrote: It's possible that you could simplify that workflow, at least if you do it often, by doing the following: 1) Go into your ~/.julia/v0.3/METADATA repo 2) Remove the original remote pointing to JuliaLang/METADATA 3) Add your own fork on Github, and call it origin 4) Re-add a reference to JuliaLang/METADATA, but call it something else (julialang, or whatever) Now when you do Pkg.publish(), you'll end up publishing to your own fork, rather than to METADATA, but that should let you submit a PR easy enough. However, you'll break Pkg.update() instead - if I'm not mistaken, it will just pull updates from your own fork instead, which of course won't automatically update when someone else pushes to JuliaLang/METADATA. However, it should be simple enough to update your fork to the latest master manually, and then run Pkg.update(). Depending on what you do most often, one or the other might be a lesser hassle for your most common workflow. // Tomas On Monday, April 21, 2014 10:49:19 PM UTC+2, Rob J Goedman wrote: Figured it out, I believe I now have a proper pull request in place. My guess is that until Pkg.publish() works for folks without write access to METADATA (automatically creating a pull request), this is a bit cumbersome. What I did (more maybe for my own benefit :-( in a few weeks): 1) Forked JuliaLang/METADATA.jl to goedman/METADATA.jl 2) Cloned goedman/METADATA.jl to my machine 3) Manually copied over my updated package info ( from .julia/v0.3/METADATA/HyperDualNumbers to directory with the cloned goedman/METADATA.jl ) 4) Committed goedman/METADATA.jl to github 5) Created a pull request on base JuliaLang/METADATA.jl (from head goedman/METADATA. Rob J. Goedman goe...@icloud.com On Apr 21, 2014, at 10:12 AM, Robert J Goedman goe...@icloud.com wrote: Hi, In trying to update the registered package HyperDualNumbers (from v0.1.1 to v0.1.2, a few very minor changes to the README.md), I think I got myself in a pickle. I tried to follow the relevant doc section. I don't think I have write access to METADATA. Details on what I did are attached below. Maybe I should not have worked in the .julia/v0.3 directory? But if I were to clone HyperDualNumbers and/or METADATA.jl, how would Pkg.tag() find that? Once I get METADATA updated, to generate a pull request (initially Jiahao was so kind to add the initial version of the package for me), should I use the GitHub tool? Any help would be appreciated! Regards, Rob J. Goedman goe...@icloud.com --- I updated the HyperDualNumbers package in the ~/.julia/v0.3 directory and committed the changes to the git repository and ran Pkg.tag(HyperDualNumbers): julia Pkg.tag(HyperDualNumbers) INFO: Tagging HyperDualNumbers v0.1.2 INFO: Committing METADATA for HyperDualNumbers robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git tag v0.1.0 v0.1.2 robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/HyperDualNumbers git show --stat commit d405891a0188a0a3e4cd59156775405b71e63aed Author: Rob J. Goedman goe...@mac.com Date: Mon Apr 21 09:07:30 2014 -0700 Update to tag v0.1.2 README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I was surprised v0.1.1 was not listed. And METADATA does not seem to have been updated for HyperDualNumbers: robs-15inch-2:HyperDualNumbers rob$ cd ~/.julia/v0.3/METADATA git show commit 9ece76e2246e1166aa2d0a0c59ab13e9f9dd747b Merge: 0daf52c cc00e5e Author: Robert J. Ennis r...@sdf.org Date: Mon Apr 21 17:01:45 2014 +0200 Merge pull request #779 from rennis250/metadata-v2 Tag SDL v0.1.2 julia Pkg.available(HyperDualNumbers) 2-element Array{VersionNumber,1}: v0.1.0 v0.1.1 I tried Pkg.publish() anyway and expected to get a rejection because I don't have write permissions, but I think it did not even get to that point: julia Pkg.update() INFO: Updating METADATA... INFO: INFO: INFO: INFO: INFO: INFO: Updating ApproxFun...INFO: Updating HyperDualNumbers...Updating NumericalMath...Updating RevMode...Updating Calculus2...Updating RmathDist...Updating PGM... INFO: Computing changes... INFO: No packages to install, update or remove julia Pkg.publish() ERROR: METADATA is behind origin/metadata-v2 – run `Pkg.update()` before publishing in publish at pkg/entry.jl:308
Re: [julia-users] Hyper-Dual numbers
HI John, Done, should be available, thanks to Jiahao! Rob J. Goedman goed...@icloud.com On Apr 8, 2014, at 8:03 AM, John Myles White johnmyleswh...@gmail.com wrote: Hi Rob, Please do submit your package to METADATA now that it has a well-defined license. It seems like a really useful tool to have available. -- John On Apr 6, 2014, at 4:21 PM, Robert J Goedman goed...@icloud.com wrote: Hi John, Jeff has updated his source files with the MIT license and I've pasted those into the LICENSE file of the Julia package. Jason Merrill has also given good feedback that I'm still looking into. My interpretation of his feedback (a single package covering different hyper number types and orders) is substantial more work and will definitely take longer. So maybe we should publish the current version? Regards, Rob J. Goedman goed...@icloud.com On Apr 6, 2014, at 12:14 PM, Jeffrey Fike jf...@alumni.stanford.edu wrote: Rob, Thanks for your interest. I have been meaning to look into an actual open source license. I went with the MIT license. I have updated the code on the website to reflect this. Please let me know if you need any additional information. Jeff Fike On Mar 29, 2014, at 5:55 PM, John Myles White johnmyleswh...@gmail.com wrote: Thanks for looking into it, Rob. In the absence of a license, the code is technically not free to use. But I imagine the authors would like to share their code, so it should be easy to convince them to use something formal like the MIT or BSD licenses. — John On Mar 29, 2014, at 5:52 PM, Robert J Goedman goed...@icloud.com wrote: John, No license is mentioned on the c++ code nor on the matlab versions as far as I can see. I'll send the authors an email. Regards, Rob J. Goedman goed...@icloud.com On Mar 29, 2014, at 5:47 PM, John Myles White johnmyleswh...@gmail.com wrote: This looks really cool. Any idea what the license was on the original file? — John On Mar 29, 2014, at 5:43 PM, Robert J Goedman goed...@icloud.com wrote: Hi, As a first 'jump into the fray' exercise I've attempted to translate Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less following the DualNumbers package. The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf . The Julia package can be found at: https://github.com/goedman/HyperDualNumbers.jl.git . Of course, I'm pretty new at this so I'm sure there will be errors and poor practices. So any feedback is appreciated. Also, I'm wondering if the type should be called Hyper or a better name would be HyperDual. This work was triggered by the interesting threads around openPP, TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope MCMC.jl). Rob J. Goedman goed...@icloud.com
Re: [julia-users] Hyper-Dual numbers
Thanks Jason, that helps a lot. Also for the pointer to the reverse mode AD. And you are quite right, number types in Julia is fun and a good learning step in my case. As were your suggestions and looking at the different approach taken by PowerSeries and TaylorSeries as far as type definitions go! I'll certainly continue to follow the PowerSeries TaylorSeries discussion. My interest in HyperDual numbers was triggered by the accuracy argument in the HyperNumber paper (in fact I only need the gradient). Time to go back to focus on MCMC and a full Julia version of a Stan like tool. Regards, Rob J. Goedman goed...@icloud.com On Apr 7, 2014, at 10:34 AM, Jason Merrill jwmerr...@gmail.com wrote: Also check out the work that Miles Lubin and others are doing on reverse mode automatic differentiation. Some really cool stuff in the pipeline. On Monday, April 7, 2014 8:35:10 AM UTC-7, Jason Merrill wrote: I partly meant to suggest that PowerSeries.jl https://github.com/jwmerrill/PowerSeries.jl might also meet your needs for 2nd order forward automatic differentiation, and it also already works to higher orders. PowerSeries.jl works by computing truncated power series of functions. You can read derivatives off the series coefficients because f(x + e) = f(x) + f'(x) e + f''(x)/2 e^2 + f'''(x)/3! e^3 + ... You can choose what order to compute to for any given application. To borrow your README example: julia using PowerSeries julia t0 = series(1.5, 1.0, 0.0) Series2{Float64}(1.5,1.0,0.0) julia f(x) = e^x / (sqrt(sin(x)^3 + cos(x)^3)) f (generic function with 1 method) # f(1.5 + e) = 4.50 + 4.05e + 4.73e^2 + ... julia f(t0) Series2{Float64}(4.497780053946162,4.05342789389862,4.731536840798301) # First derivative julia polyder(f(t0)) Series1{Float64}(4.05342789389862,9.463073681596603) # Second derivative julia polyder(polyder(f(t0))) 9.463073681596603 # If you start from the beginning with a higher order series, # then you'll be able to take higher order derivatives at the end julia polyder(polyder(polyder(f(series(1.5, 1.0, 0.0, 0.0) 32.16790451368894 As far as I can tell (and I could well be wrong!), if you're interested in differentiating programs to higher orders, truncated power series are a more fit-to-purpose extension of Dual numbers than HyperDual numbers are. This whole space is pretty lively right now. I think everyone is realizing how easy it is to write new Number types in Julia, and there are *a lot* of useful notions of number. If PowerSeries.jl does end up fitting your purpose, there's plenty of room for contribution/improvement. There's a good discussion going on in an issue right now on figuring out how to combine the best aspects of PowerSeries.jl and a new package called TaylorSeriesl.jl https://github.com/jwmerrill/PowerSeries.jl/issues/7 Or if I've missed something and HyperDual numbers have some important advantage, that would be good to know! On Sunday, April 6, 2014 4:21:33 PM UTC-7, Rob J Goedman wrote: Hi John, Jeff has updated his source files with the MIT license and I've pasted those into the LICENSE file of the Julia package. Jason Merrill has also given good feedback that I'm still looking into. My interpretation of his feedback (a single package covering different hyper number types and orders) is substantial more work and will definitely take longer. So maybe we should publish the current version? Regards, Rob J. Goedman goe...@icloud.com On Apr 6, 2014, at 12:14 PM, Jeffrey Fike jf...@alumni.stanford.edu wrote: Rob, Thanks for your interest. I have been meaning to look into an actual open source license. I went with the MIT license. I have updated the code on the website to reflect this. Please let me know if you need any additional information. Jeff Fike On Mar 29, 2014, at 5:55 PM, John Myles White johnmyl...@gmail.com wrote: Thanks for looking into it, Rob. In the absence of a license, the code is technically not free to use. But I imagine the authors would like to share their code, so it should be easy to convince them to use something formal like the MIT or BSD licenses. — John On Mar 29, 2014, at 5:52 PM, Robert J Goedman goe...@icloud.com wrote: John, No license is mentioned on the c++ code nor on the matlab versions as far as I can see. I'll send the authors an email. Regards, Rob J. Goedman goe...@icloud.com On Mar 29, 2014, at 5:47 PM, John Myles White johnmyl...@gmail.com wrote: This looks really cool. Any idea what the license was on the original file? — John On Mar 29, 2014, at 5:43 PM, Robert J Goedman goe...@icloud.com wrote: Hi, As a first 'jump into the fray' exercise I've attempted to translate Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less following the DualNumbers package. The c++ code can be found at http
Re: [julia-users] Hyper-Dual numbers
Hi John, Jeff has updated his source files with the MIT license and I've pasted those into the LICENSE file of the Julia package. Jason Merrill has also given good feedback that I'm still looking into. My interpretation of his feedback (a single package covering different hyper number types and orders) is substantial more work and will definitely take longer. So maybe we should publish the current version? Regards, Rob J. Goedman goed...@icloud.com On Apr 6, 2014, at 12:14 PM, Jeffrey Fike jf...@alumni.stanford.edu wrote: Rob, Thanks for your interest. I have been meaning to look into an actual open source license. I went with the MIT license. I have updated the code on the website to reflect this. Please let me know if you need any additional information. Jeff Fike On Mar 29, 2014, at 5:55 PM, John Myles White johnmyleswh...@gmail.com wrote: Thanks for looking into it, Rob. In the absence of a license, the code is technically not free to use. But I imagine the authors would like to share their code, so it should be easy to convince them to use something formal like the MIT or BSD licenses. — John On Mar 29, 2014, at 5:52 PM, Robert J Goedman goed...@icloud.com wrote: John, No license is mentioned on the c++ code nor on the matlab versions as far as I can see. I'll send the authors an email. Regards, Rob J. Goedman goed...@icloud.com On Mar 29, 2014, at 5:47 PM, John Myles White johnmyleswh...@gmail.com wrote: This looks really cool. Any idea what the license was on the original file? — John On Mar 29, 2014, at 5:43 PM, Robert J Goedman goed...@icloud.com wrote: Hi, As a first 'jump into the fray' exercise I've attempted to translate Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less following the DualNumbers package. The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf . The Julia package can be found at: https://github.com/goedman/HyperDualNumbers.jl.git . Of course, I'm pretty new at this so I'm sure there will be errors and poor practices. So any feedback is appreciated. Also, I'm wondering if the type should be called Hyper or a better name would be HyperDual. This work was triggered by the interesting threads around openPP, TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope MCMC.jl). Rob J. Goedman goed...@icloud.com
Re: [julia-users] Re: Hyper-Dual numbers
Thank you very much Jason, great feedback. I will work through your suggestions and make the changes. In particular the extensibility argument/pattern is something I've been thinking about as well. Regards, Rob J. Goedman goed...@icloud.com On Mar 30, 2014, at 10:09 AM, Jason Merrill jwmerr...@gmail.com wrote: Cool. I took a quick look over the code, and it looks pretty good to me. You have an inline comment about wanting understand convert/promote better--one good place to look is promotions.jl in base: https://github.com/JuliaLang/julia/blob/master/base/promotion.jl#L158 This defines some fairly generic methods for +, -, *, /, etc. that mean if there isn't a more specific method for this combination of argument types, try promoting the arguments to a common type before doing the operation. By defining convert and promote_rule, you are participating in this system. I didn't look carefully at all the promotions/conversions you define, but if you have the right ones, this will allow e.g. something like Hyper(0.0, 1.0, 1.0, 2.0) + Hyper(3//5, 1//2, 1//2, 2//7) to work without you ever having had to write code specific to the Rational type. As for the theory, it seems a little funny to me that this technique redundantly encodes the first derivative, and I can't see an advantage of using two variables that both square to 0 over using a single variable that cubes to 0. Since E1 and E2 are used symmetrically, suppose we make the change of variables e = E1 + E2. Now we have a single variable with e^2 = 2E1E2, and e^3 = 0, and you could go through everywhere making the replacements and end up saving yourself one field in your type, and a bit of redundant arithmetic. After the replacement, it's easier to see how to extend to higher derivatives too. If e^3 = 0 is a variable that helps us compute second derivatives, then f^4=0 is a variable that helps us compute third derivatives, g^5 = 0 helps us compute 4th derivatives, and so on. This is the theory behind the truncated power series in PowerSeries.jl Instead of talking about a lot of different variables with special properties, it's also possible to say that you're working modulo some polynomial. Dual numbers are equivalent to computing mod x^2, 2nd order truncated series are equivalent to computing mod x^3, 3rd order series to mod x^4 and so on. In this way of thinking, complex numbers are polynomials mod (x^2 + 1), and the split-complex numbers, which come up in the hyperbolic geometry of the plane, are polynomials mod (x^2 - 1). On Saturday, March 29, 2014 5:43:05 PM UTC-7, Rob J Goedman wrote: Hi, As a first 'jump into the fray' exercise I've attempted to translate Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less following the DualNumbers package. The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf . The Julia package can be found at: https://github.com/goedman/HyperDualNumbers.jl.git . Of course, I'm pretty new at this so I'm sure there will be errors and poor practices. So any feedback is appreciated. Also, I'm wondering if the type should be called Hyper or a better name would be HyperDual. This work was triggered by the interesting threads around openPP, TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope MCMC.jl). Rob J. Goedman goe...@icloud.com
[julia-users] Hyper-Dual numbers
Hi, As a first 'jump into the fray' exercise I've attempted to translate Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less following the DualNumbers package. The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf . The Julia package can be found at: https://github.com/goedman/HyperDualNumbers.jl.git . Of course, I'm pretty new at this so I'm sure there will be errors and poor practices. So any feedback is appreciated. Also, I'm wondering if the type should be called Hyper or a better name would be HyperDual. This work was triggered by the interesting threads around openPP, TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope MCMC.jl). Rob J. Goedman goed...@icloud.com
Re: [julia-users] Hyper-Dual numbers
John, No license is mentioned on the c++ code nor on the matlab versions as far as I can see. I'll send the authors an email. Regards, Rob J. Goedman goed...@icloud.com On Mar 29, 2014, at 5:47 PM, John Myles White johnmyleswh...@gmail.com wrote: This looks really cool. Any idea what the license was on the original file? — John On Mar 29, 2014, at 5:43 PM, Robert J Goedman goed...@icloud.com wrote: Hi, As a first 'jump into the fray' exercise I've attempted to translate Jeffrey Fike's hyper-dual numbers code from c++ to Julia, more or less following the DualNumbers package. The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf . The Julia package can be found at: https://github.com/goedman/HyperDualNumbers.jl.git . Of course, I'm pretty new at this so I'm sure there will be errors and poor practices. So any feedback is appreciated. Also, I'm wondering if the type should be called Hyper or a better name would be HyperDual. This work was triggered by the interesting threads around openPP, TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope MCMC.jl). Rob J. Goedman goed...@icloud.com
[julia-users] MCMC.jl on prerelease+1837
Hi, Several examples using MCMC.jl work fine, but I now started to look at the autodiff examples and with linear_regression.jl I am running in below problem. I added a few println statements to pinpoint the problem and indeed there is no ExprH{:macrocall}(...) defined. Is this due to changes in 0.3.0 (clearly I'm a newbie). Regards, Rob J. Goedman goed...@icloud.com _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type help() to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.3.0-prerelease+1837 (2014-03-04 16:30 UTC) _/ |\__'_|_|_|\__'_| | Commit 35fa0a5* (0 days old master) |__/ | x86_64-apple-darwin13.1.0 julia include(/Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl) WARNING: Set(a,b...) is deprecated, use Set({a,b...}) instead. in Set at deprecated.jl:19 in reload_path at loading.jl:144 in _require at loading.jl:59 in require at loading.jl:43 Loading MCMCLikModel model Loading IMH(logCandidate, randCandidate!) sampler Loading RWM(scale, tuner) sampler Loading RAM(scale, rate) sampler Loading MALA(driftStep, tuner) sampler Loading HMC(nLeaps, leapStep, tuner) sampler Loading HMCDA(rate, len, shrinkage, t0, step) sampler Loading NUTS(maxdoublings, tuner) sampler Loading SMMALA(driftStep, tuner) sampler Loading PMALA(driftStep, tuner) sampler Loading RMHMC(nLeaps, leapStep, nNewton, tuner) sampler Loading ERMLMC(nLeaps, leapStep, tuner) sampler Loading RMLMC(nLeaps, leapStep, nNewton, tuner) sampler Loading SerialMC(steps, burnin, thinning) runner Loading SerialTempMC(steps, burnin, swapPeriod) runner Loading SeqMC(steps, burnin, trigger) runner parsing.jl (99): # /Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl, line 15: parsing.jl (101): ExprH{:line}(:line,{15,:/Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl},Any) parsing.jl (103): nothing parsing.jl (99): @~ vars Normal(0,1.0) parsing.jl (101): ExprH{:macrocall}(:macrocall,{:@~,:vars,:(Normal(0,1.0))},Any) ERROR: [parseModel] unmanaged expr type macrocall in error at error.jl:21 in explore at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:86 in explore at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:85 in explore at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:102 in explore at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:85 in parseModel! at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:123 in generateModelFunction at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:432 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:86 in model at /Users/rob/.julia/MCMC/src/modellers/mcmcmodels.jl:39 while loading /Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl, in expression starting on line 20 julia ex :(begin # /Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl, line 15: @~ vars Normal(0,1.0) # line 16: resid = Y - X * vars # line 17: @~ resid Normal(0,1.0) end) julia
Re: [julia-users] MCMC.jl on prerelease+1837
Thanks Ivar, the #4882 exchange you pointed me to gets me quite a bit further! Even though it shows a deprecated Set() warning, I also had to update Set(...) constructors to Set{Symbol}({...}) in a number of places. I am now studying below issue, a good way to better learn/understand Julia ... Regards, Rob J. Goedman goed...@icloud.com robs-15inch:Regression rob$ clear;julia _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type help() to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.3.0-prerelease+1837 (2014-03-04 16:30 UTC) _/ |\__'_|_|_|\__'_| | Commit 35fa0a5* (0 days old master) |__/ | x86_64-apple-darwin13.1.0 julia include(/Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl) WARNING: Set(a,b...) is deprecated, use Set({a,b...}) instead. in Set at deprecated.jl:19 in reload_path at loading.jl:144 in _require at loading.jl:59 in require at loading.jl:43 Loading MCMCLikModel model Loading IMH(logCandidate, randCandidate!) sampler Loading RWM(scale, tuner) sampler Loading RAM(scale, rate) sampler Loading MALA(driftStep, tuner) sampler Loading HMC(nLeaps, leapStep, tuner) sampler Loading HMCDA(rate, len, shrinkage, t0, step) sampler Loading NUTS(maxdoublings, tuner) sampler Loading SMMALA(driftStep, tuner) sampler Loading PMALA(driftStep, tuner) sampler Loading RMHMC(nLeaps, leapStep, nNewton, tuner) sampler Loading ERMLMC(nLeaps, leapStep, tuner) sampler Loading RMLMC(nLeaps, leapStep, nNewton, tuner) sampler Loading SerialMC(steps, burnin, thinning) runner Loading SerialTempMC(steps, burnin, swapPeriod) runner Loading SeqMC(steps, burnin, trigger) runner ERROR: no method *(Array{Float64,2}, Expr) in ##ll#729 at no file:523 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:54 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:139 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:96 in model at /Users/rob/.julia/MCMC/src/modellers/mcmcmodels.jl:39 while loading /Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl, in expression starting on line 28 On Mar 4, 2014, at 11:05 AM, Ivar Nesje iva...@gmail.com wrote: This is probably due to #4882 where we changed the behaviour of the ~ operator to translate to a macrocall instead of a function. The code you reference will need to be updated. Ivar kl. 19:48:07 UTC+1 tirsdag 4. mars 2014 skrev Rob J Goedman følgende: Hi, Several examples using MCMC.jl work fine, but I now started to look at the autodiff examples and with linear_regression.jl I am running in below problem. I added a few println statements to pinpoint the problem and indeed there is no ExprH{:macrocall}(...) defined. Is this due to changes in 0.3.0 (clearly I'm a newbie). Regards, Rob J. Goedman goe...@icloud.com _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type help() to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.3.0-prerelease+1837 (2014-03-04 16:30 UTC) _/ |\__'_|_|_|\__'_| | Commit 35fa0a5* (0 days old master) |__/ | x86_64-apple-darwin13.1.0 julia include(/Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl) WARNING: Set(a,b...) is deprecated, use Set({a,b...}) instead. in Set at deprecated.jl:19 in reload_path at loading.jl:144 in _require at loading.jl:59 in require at loading.jl:43 Loading MCMCLikModel model Loading IMH(logCandidate, randCandidate!) sampler Loading RWM(scale, tuner) sampler Loading RAM(scale, rate) sampler Loading MALA(driftStep, tuner) sampler Loading HMC(nLeaps, leapStep, tuner) sampler Loading HMCDA(rate, len, shrinkage, t0, step) sampler Loading NUTS(maxdoublings, tuner) sampler Loading SMMALA(driftStep, tuner) sampler Loading PMALA(driftStep, tuner) sampler Loading RMHMC(nLeaps, leapStep, nNewton, tuner) sampler Loading ERMLMC(nLeaps, leapStep, tuner) sampler Loading RMLMC(nLeaps, leapStep, nNewton, tuner) sampler Loading SerialMC(steps, burnin, thinning) runner Loading SerialTempMC(steps, burnin, swapPeriod) runner Loading SeqMC(steps, burnin, trigger) runner parsing.jl (99): # /Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl, line 15: parsing.jl (101): ExprH{:line}(:line,{15,:/Users/rob/Projects/Julia/Rob/Regression/linear_regression.jl},Any) parsing.jl (103): nothing parsing.jl (99): @~ vars Normal(0,1.0) parsing.jl (101): ExprH{:macrocall}(:macrocall,{:@~,:vars,:(Normal(0,1.0))},Any) ERROR: [parseModel] unmanaged expr type macrocall in error at error.jl:21 in explore at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:86 in explore at /Users/rob/.julia/MCMC/src/autodiff/parsing.jl:85
Re: [julia-users] Re: Initial try with MCMC
Hi Avik, Thank you for helping out. I believe DataArrays is installed, at least interactively it seems to work. I'm assuming in that case it is visible in SerialMC as well? Is it normal there are 2 versions reported in Pkg.available(DataArrays)? Rob J. Goedman goed...@icloud.com On Jan 17, 2014, at 10:40 AM, Avik Sengupta avik.sengu...@gmail.com wrote: This has come up a few times recently, but I am not sure why the DataArrays package doesn't get installed (it should due to the dependency resolution). The workaround is to force install of the that package Pkg.add(DataArrays) robs-15inch-2:~ rob$ exec '/Applications/Julia-0.2.0.app/Contents/Resources/julia/bin/julia' _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type help() to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.2.0 (2013-11-16 23:44 UTC) _/ |\__'_|_|_|\__'_| | Official http://julialang.org release |__/ | x86_64-apple-darwin12.5.0 julia Pkg.update() INFO: Updating METADATA... INFO: Updating DataArrays... INFO: Updating Stats... INFO: Computing changes... INFO: No packages to install, update or remove. julia Pkg.add(DataArrays) INFO: Nothing to be done. julia Pkg.add(DataFrames) INFO: Nothing to be done. julia Pkg.add(Stats) INFO: Nothing to be done. julia Pkg.add(MCMC) INFO: Nothing to be done. julia using Rmath,DataArrays,DataFrames,Stats,Distributions,MCMC Warning: could not import Base.foldl into NumericExtensions Warning: could not import Base.foldr into NumericExtensions Warning: could not import Base.sum! into NumericExtensions Warning: could not import Base.maximum! into NumericExtensions Warning: could not import Base.minimum! into NumericExtensions Warning: could not import Base.PAIRWISE_SUM_BLOCKSIZE into NumericExtensions Loading MCMCLikModel model Loading RWM(scale, tuner) sampler Loading RAM(scale, rate) sampler Loading MALA(driftStep, tuner) sampler Loading HMC(nLeaps, leapStep, tuner) sampler Loading HMCDA(rate, len, shrinkage, t0, step) sampler Loading NUTS(maxdoublings, tuner) sampler Loading SMMALA(driftStep, tuner) sampler Loading PMALA(driftStep, tuner) sampler Loading RMHMC(nLeaps, leapStep, nNewton, tuner) sampler Loading ERMLMC(nLeaps, leapStep, tuner) sampler Loading SerialMC(steps, burnin, thinning) runner Loading SerialTempMC(steps, burnin, swapPeriod) runner Loading SeqMC(steps, burnin, trigger) runner julia Pkg.available(DataArrays) 2-element Array{VersionNumber,1}: v0.0.0 v0.0.1 julia n = 8 8 julia float64(DataArray(zeros(Float64 ,n))) 8-element DataArray{Float64,1}: 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 julia mymodel1 = model(v--dot(v,v), init=ones(3)) WARNING: assert(x,y) is deprecated, use @assert x y instead. in depwarn at deprecated.jl:29 in assert at deprecated.jl:19 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:43 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:129 in model at /Users/rob/.julia/MCMC/src/modellers/mcmcmodels.jl:39 WARNING: assert(x,y) is deprecated, use @assert x y instead. in depwarn at deprecated.jl:29 in assert at deprecated.jl:19 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:44 in MCMCLikelihoodModel at /Users/rob/.julia/MCMC/src/modellers/likmodel.jl:129 in model at /Users/rob/.julia/MCMC/src/modellers/mcmcmodels.jl:39 MCMCLikelihoodModel((anonymous function),nothing,nothing,nothing,nothing,nothing,nothing,[:pars=PDims(1,(3,))],3,[1.0,1.0,1.0],[1.0,1.0,1.0]) julia mychain=run(mymodel1,RWM(0.1), SerialMC(steps=1000,burnin=100)) WARNING: assert(x,y) is deprecated, use @assert x y instead. in depwarn at deprecated.jl:29 in assert at deprecated.jl:19 in RWM at /Users/rob/.julia/MCMC/src/samplers/RWM.jl:29 in RWM at /Users/rob/.julia/MCMC/src/samplers/RWM.jl:34 ERROR: DataArray not defined in run_serialmc at /Users/rob/.julia/MCMC/src/runners/SerialMC.jl:61 in run at /Users/rob/.julia/MCMC/src/runners/runners.jl:9 in run at /Users/rob/.julia/MCMC/src/runners/runners.jl:45 julia On Friday, 17 January 2014 17:18:17 UTC, Rob J Goedman wrote: Hi, I'm wondering if I have mixed versions installed, e.g. the initial MCMC example below shows a couple of warnings and an error on DataArray. Any hints? Thanks, Rob Mac OSX 10.9.2, Xcode 5.1Beta3 + command line tools robs-15inch-2:~ rob$ exec '/Applications/Julia-0.2.0.app/Contents/Resources/julia/bin/julia' _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type help() to list help topics | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.2.0 (2013-11-16 23:44 UTC) _/ |\__'_|_|_|\__'_| | Official http://julialang.org release |__/ |