# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?page=556

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 557

---

## [Calculating Entropy from data](https://discourse.julialang.org/t/calculating-entropy-from-data/5480)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 2\
**Last updated:** [August 22, 2017, 2:38am UTC](https://discourse.julialang.org/t/calculating-entropy-from-data/5480 "2017-08-22T02:38:45Z")

</div>

I have a vector of data sampled from a random process and want to calculate the entropy of the random variable. I wrote this code using Distributions using StatsBase function calc\_entropy1( x::Vector{Float64} ) N …

---

## [New to julia: Convolution and juliadiff](https://discourse.julialang.org/t/new-to-julia-convolution-and-juliadiff/5259)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 19\
**Last updated:** [August 21, 2017, 8:37pm UTC](https://discourse.julialang.org/t/new-to-julia-convolution-and-juliadiff/5259 "2017-08-21T20:37:37Z")

</div>

Hi, I am sorry if this is the wrong place to ask this. But I am considering learning Julia for a stochastic analysis project I am working on. I have a numerical scheme to approximately simulate the stochastic integral Y…

---

## [Does there exists 1D FFT/IFFT implementation in pure Julia (i.e. no FFTW)](https://discourse.julialang.org/t/does-there-exists-1d-fft-ifft-implementation-in-pure-julia-i-e-no-fftw/5407)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 10\
**Last updated:** [August 21, 2017, 8:02pm UTC](https://discourse.julialang.org/t/does-there-exists-1d-fft-ifft-implementation-in-pure-julia-i-e-no-fftw/5407 "2017-08-21T20:02:32Z")

</div>

Hi, I need a pure julia FFT implementation as I am planning to use it in correspondence with the ForwardDiff package. Does this exist?

---

## [@fastmath for matrices?](https://discourse.julialang.org/t/fastmath-for-matrices/5484)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 6\
**Last updated:** [August 21, 2017, 4:30pm UTC](https://discourse.julialang.org/t/fastmath-for-matrices/5484 "2017-08-21T16:30:50Z")

</div>

I wonder if there is a package that can figure out the fastest way to multiply out a few matrices by each other using dynamic programming or any other approach. For example, if I am doing A\*B\*c where A is 100x100, B is 1…

---

## [Is there any way to choose a referent other than the lowest value in a regression?](https://discourse.julialang.org/t/is-there-any-way-to-choose-a-referent-other-than-the-lowest-value-in-a-regression/5464)

<div class="topic-metadata">

**Author:** [@mwsohn](https://discourse.julialang.org/u/mwsohn)\
**Replies:** 0\
**Last updated:** [August 19, 2017, 4:53pm UTC](https://discourse.julialang.org/t/is-there-any-way-to-choose-a-referent-other-than-the-lowest-value-in-a-regression/5464 "2017-08-19T16:53:08Z")

</div>

I have a dependent variable with three levels with values 1, 2, and 3. Is there a simple way to use 2 as the omitted (reference) category instead of 1 in a GLM model, perhaps in a @formula macro?

---

## [Should view(array, 1:length(array)) return a SubArray?](https://discourse.julialang.org/t/should-view-array-1-length-array-return-a-subarray/5449)

<div class="topic-metadata">

**Author:** [@sambitdash](https://discourse.julialang.org/u/sambitdash)\
**Replies:** 11\
**Last updated:** [August 19, 2017, 3:33am UTC](https://discourse.julialang.org/t/should-view-array-1-length-array-return-a-subarray/5449 "2017-08-19T03:33:35Z")

</div>

Hi All, julia\> arr = zeros(Int, 3) 3-element Array{Int64,1}: 0 0 0 julia\> b = view(arr, 1:length(arr)) 3-element SubArray{Int64,1,Array{Int64,1},Tuple{UnitRange{Int64}},true}: 0 0 0 Now that b will be treated li…

---

## [Using the DiffResult API](https://discourse.julialang.org/t/using-the-diffresult-api/5456)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [August 18, 2017, 8:04pm UTC](https://discourse.julialang.org/t/using-the-diffresult-api/5456 "2017-08-18T20:04:05Z")

</div>

We are wrapping up the API for a GSOC project and I need some help about how to best integrate this into the existing Julia ecosystem. From a theoretical point of view, the API needs a simple function ℓ:ℝⁿ→ℝ (log poster…

---

## [Is it possible to short-circuit a parallel for loop?](https://discourse.julialang.org/t/is-it-possible-to-short-circuit-a-parallel-for-loop/5427)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 3\
**Last updated:** [August 17, 2017, 9:56pm UTC](https://discourse.julialang.org/t/is-it-possible-to-short-circuit-a-parallel-for-loop/5427 "2017-08-17T21:56:28Z")

</div>

Consider the following code that mimics short-circuiting any(): function bad\_any(n::Integer) a = rand(Bool, n) for i in a i && return true end return false end Is it possible to parallelize the for loop in…

---

## [JuMP: Please recommend solver](https://discourse.julialang.org/t/jump-please-recommend-solver/4418)

<div class="topic-metadata">

**Author:** [@michaellindon](https://discourse.julialang.org/u/michaellindon)\
**Replies:** 8\
**Last updated:** [August 17, 2017, 8:54pm UTC](https://discourse.julialang.org/t/jump-please-recommend-solver/4418 "2017-08-17T20:54:23Z")

</div>

My objective function is a variant of ordinary linear least squares, by which I mean estimating regression coefficients B\[1\],…,B\[p\] by minimizing sum((Y\[i\]-sum( X\[i,j\]\*B\[j\] for j=1:p))^2 for i=1:n) where Y\[1\],…,Y\[n\] ar…

---

## [@everywhere and pmap inside of a function?](https://discourse.julialang.org/t/everywhere-and-pmap-inside-of-a-function/5405)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 14\
**Last updated:** [August 17, 2017, 5:39pm UTC](https://discourse.julialang.org/t/everywhere-and-pmap-inside-of-a-function/5405 "2017-08-17T17:39:05Z")

</div>

Could you please explain the reason why this code is failing and how I could fix it? This is an example of an embarrassingly parallel loop with no data movement, the easiest thing possible in parallel programming: funct…

---

## [New Package: UEM (Beta Testing New Package for Panel Data)](https://discourse.julialang.org/t/new-package-uem-beta-testing-new-package-for-panel-data/5314)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 0\
**Last updated:** [August 9, 2017, 11:21pm UTC](https://discourse.julialang.org/t/new-package-uem-beta-testing-new-package-for-panel-data/5314 "2017-08-09T23:21:53Z")

</div>

Greetings! I would like to let y’all know about a package I developed and am currently beta testing for longitudinal analysis (mostly static short-panels). Any feedback, requests, bug reporting, etc would be appreciated…

---

## [Iteratively adding violated inequalities](https://discourse.julialang.org/t/iteratively-adding-violated-inequalities/5413)

<div class="topic-metadata">

**Author:** [@varun7rs](https://discourse.julialang.org/u/varun7rs)\
**Replies:** 8\
**Last updated:** [August 17, 2017, 7:21am UTC](https://discourse.julialang.org/t/iteratively-adding-violated-inequalities/5413 "2017-08-17T07:21:07Z")

</div>

I’m working on a robust optimisation problem wherein I first solve the nominal problem. I then check if the solution obtained from the nominal problem violates the robust constraints for a particular uncertain scenario (…

---

## [MixedModels and Random Interactions](https://discourse.julialang.org/t/mixedmodels-and-random-interactions/5315)

<div class="topic-metadata">

**Author:** [@kei](https://discourse.julialang.org/u/kei)\
**Replies:** 6\
**Last updated:** [August 17, 2017, 5:31am UTC](https://discourse.julialang.org/t/mixedmodels-and-random-interactions/5315 "2017-08-17T05:31:11Z")

</div>

Hello, everyone. I am attempting to use MixedModels to produce a model that would (in R using lme4) otherwise look like this: (Edited formula): model = lmer( y ~ x \* cond1 \* cond2 + (1+x \* cond1 \* cond2 | region ) …

---

## [Logistic Regression Problem](https://discourse.julialang.org/t/logistic-regression-problem/5417)

<div class="topic-metadata">

**Author:** [@Antonio\_Loureiro](https://discourse.julialang.org/u/Antonio_Loureiro)\
**Replies:** 3\
**Last updated:** [August 16, 2017, 9:59pm UTC](https://discourse.julialang.org/t/logistic-regression-problem/5417 "2017-08-16T21:59:27Z")

</div>

I’m trying to use a Logistic Regression algorithm to find a classification model, but i get stuck with an error “failure to converge after 30 iterations” i have changed the maxIter arg to an higher value, but the error o…

---

## [Error when enabeling automatic differentiation in Optim](https://discourse.julialang.org/t/error-when-enabeling-automatic-differentiation-in-optim/5410)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 4\
**Last updated:** [August 16, 2017, 7:29pm UTC](https://discourse.julialang.org/t/error-when-enabeling-automatic-differentiation-in-optim/5410 "2017-08-16T19:29:31Z")

</div>

I try to enable forward automatic differentiation to the Rosenbrock example in the documentation (link). When setting the OnceDifferentiable object I get an error: od = OnceDifferentiable(f, initial\_x; autodiff = :forwa…

---

## [How do you save data in Monte Carlo simulations?](https://discourse.julialang.org/t/how-do-you-save-data-in-monte-carlo-simulations/5403)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 8\
**Last updated:** [August 16, 2017, 6:03am UTC](https://discourse.julialang.org/t/how-do-you-save-data-in-monte-carlo-simulations/5403 "2017-08-16T06:03:08Z")

</div>

Let’s say I have a prior made of continuous and discrete variables: using Distributions a = Uniform() b = Normal() c = Binomial() ... I generate random numbers from the prior, input them into an expensive model and th…

---

## [Matrix Element-wise operations slow down in a certain size interval](https://discourse.julialang.org/t/matrix-element-wise-operations-slow-down-in-a-certain-size-interval/5401)

<div class="topic-metadata">

**Author:** [@usefulhyun](https://discourse.julialang.org/u/usefulhyun)\
**Replies:** 1\
**Last updated:** [August 16, 2017, 4:01am UTC](https://discourse.julialang.org/t/matrix-element-wise-operations-slow-down-in-a-certain-size-interval/5401 "2017-08-16T04:01:55Z")

</div>

Hi, there. Let’s see my code below. BLAS.set\_num\_threads(1) G = 10^9 M = 10^6 @printf(“sz\\tbin add(Mflops) bin mul(Mflops) sca add(Mflops) sca mul(Mflops)\\n”) for sz=\[100, 200, 500, 1000, 1500, 2000, 2500, 3000, …

---

## [Performance problem with Partitioned Matrix Multiplication by Matrix{Matrix} type](https://discourse.julialang.org/t/performance-problem-with-partitioned-matrix-multiplication-by-matrix-matrix-type/5391)

<div class="topic-metadata">

**Author:** [@usefulhyun](https://discourse.julialang.org/u/usefulhyun)\
**Replies:** 0\
**Last updated:** [August 15, 2017, 5:09pm UTC](https://discourse.julialang.org/t/performance-problem-with-partitioned-matrix-multiplication-by-matrix-matrix-type/5391 "2017-08-15T17:09:14Z")

</div>

Hi, there! First, I show you my example. BLAS.set\_num\_threads(1) block\_mat1 = Matrix(1,1) block\_mat2 = Matrix(2,2) block\_mat3 = Matrix(3,3) block\_mat4 = Matrix(4,4) block\_mat1\[1,1\] = ones(3000,3000) for i=1:2 …

---

## [StructJuMP with Monte Carlo sampling and benders decomposition](https://discourse.julialang.org/t/structjump-with-monte-carlo-sampling-and-benders-decomposition/5377)

<div class="topic-metadata">

**Author:** [@UserMorocco](https://discourse.julialang.org/u/UserMorocco)\
**Replies:** 1\
**Last updated:** [August 15, 2017, 11:39am UTC](https://discourse.julialang.org/t/structjump-with-monte-carlo-sampling-and-benders-decomposition/5377 "2017-08-15T11:39:34Z")

</div>

Hello Julia community, Can we implement Monte Carlo sampling within a benders decomposition algorithm for stochastic linear programs in Julia package StructJuMP ? Thank you !

---

## [How to set axes ranges based on one series but not another in Plots Recipe?](https://discourse.julialang.org/t/how-to-set-axes-ranges-based-on-one-series-but-not-another-in-plots-recipe/5253)

<div class="topic-metadata">

**Author:** [@ValdarT](https://discourse.julialang.org/u/ValdarT)\
**Replies:** 4\
**Last updated:** [August 13, 2017, 1:51pm UTC](https://discourse.julialang.org/t/how-to-set-axes-ranges-based-on-one-series-but-not-another-in-plots-recipe/5253 "2017-08-13T13:51:57Z")

</div>

With the following code, the y-axis is based on the distribution and adding the vertical line does not change that. using Distributions, StatPlots gr() dist = Normal(1,1) p = plot(dist, fill=(0,0.5)) plot!(p, \[mean(dis…

---

## [Parallelization of estimation loop](https://discourse.julialang.org/t/parallelization-of-estimation-loop/5343)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 18\
**Last updated:** [August 12, 2017, 11:43pm UTC](https://discourse.julialang.org/t/parallelization-of-estimation-loop/5343 "2017-08-12T23:43:07Z")

</div>

I have a loop that is embarrassingly parallel and in which there is no data movement. What is the best way nowadays to parallelize it in Julia v0.6? Assume I have an iterator type: struct MyIterator length::Int end B…

---

## [How to query the current maximum number of threads?](https://discourse.julialang.org/t/how-to-query-the-current-maximum-number-of-threads/5342)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 8\
**Last updated:** [August 12, 2017, 2:31am UTC](https://discourse.julialang.org/t/how-to-query-the-current-maximum-number-of-threads/5342 "2017-08-12T02:31:48Z")

</div>

I have just found JULIA\_NUM\_THREADS in the documentation, and I wonder if Julia is already doing a good job on picking up the number of CPU cores on my laptop. Is there a command to find the number of threads available?

---

## [Error plot not defined in RecipesBase](https://discourse.julialang.org/t/error-plot-not-defined-in-recipesbase/5338)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 8\
**Last updated:** [August 11, 2017, 11:06pm UTC](https://discourse.julialang.org/t/error-plot-not-defined-in-recipesbase/5338 "2017-08-11T23:06:24Z")

</div>

Could you please help debugging this simple issue I am having trying to define a user plot recipe? module FooPlots using RecipesBase @userplot FooPlot @recipe function f(dr::FooPlot) # code goes here end end usin…

---

## [Error using ForwardDiff](https://discourse.julialang.org/t/error-using-forwarddiff/5339)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 10:32pm UTC](https://discourse.julialang.org/t/error-using-forwarddiff/5339 "2017-08-11T22:32:20Z")

</div>

Hi, I am new to ForwardDiff. However, I get an error which i cant understand why occurs. function get\_rho(a) return sqrt(2.0\*a+1.0)/(a+1.0) end @time ForwardDiff.gradient(a -\>get\_rho(a), -0.43) From the code above I …

---

## [Print dataframe in HTML](https://discourse.julialang.org/t/print-dataframe-in-html/5319)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 2\
**Last updated:** [August 10, 2017, 5:24pm UTC](https://discourse.julialang.org/t/print-dataframe-in-html/5319 "2017-08-10T17:24:50Z")

</div>

I have a type that has as one of its fields a AbstractDataFrame: struct GeoDataFrame{DF\<:AbstractDataFrame} data::DF coordnames::Vector{Symbol} end This is how I print the object in plain text: # compact show Base…

---

## [Implementing a basic Genetic Algorithm using GPUArrays](https://discourse.julialang.org/t/implementing-a-basic-genetic-algorithm-using-gpuarrays/5290)

<div class="topic-metadata">

**Author:** [@Mikewl](https://discourse.julialang.org/u/Mikewl)\
**Replies:** 18\
**Last updated:** [August 10, 2017, 8:17am UTC](https://discourse.julialang.org/t/implementing-a-basic-genetic-algorithm-using-gpuarrays/5290 "2017-08-10T08:17:55Z")

</div>

So I like playing with Genetic Algorithms and other Evolutionary Algorithms and have gotten nice speedups via using threads before. So I saw GPUArrays and felt it was a good enough reason to setup a linux box again! My…

---

## [Generating \`Array\` of random values from \`Array\` of Distributions](https://discourse.julialang.org/t/generating-array-of-random-values-from-array-of-distributions/5310)

<div class="topic-metadata">

**Author:** [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Replies:** 1\
**Last updated:** [August 9, 2017, 11:45pm UTC](https://discourse.julialang.org/t/generating-array-of-random-values-from-array-of-distributions/5310 "2017-08-09T23:45:30Z")

</div>

I have an Array (of arbitary size) containing the parameters corresponding to the parameters of a distribution. In this example, the Array has size (4, 3, 2) but could e.g. be size (3, 2) or (5, 2, 3, 2), etc. For examp…

---

## [Using an integer-valued variable as the number of summands in JuMP?](https://discourse.julialang.org/t/using-an-integer-valued-variable-as-the-number-of-summands-in-jump/5303)

<div class="topic-metadata">

**Author:** [@xiaoweiz](https://discourse.julialang.org/u/xiaoweiz)\
**Replies:** 5\
**Last updated:** [August 9, 2017, 11:45pm UTC](https://discourse.julialang.org/t/using-an-integer-valued-variable-as-the-number-of-summands-in-jump/5303 "2017-08-09T23:45:18Z")

</div>

I’m trying to reformulate a stochastic program (approximately) as a mixed-integer linear program. A particular constraint involves the summation of N i.i.d. random variables, where N is a decision variable itself, someth…

---

## [Chance constraint modeling](https://discourse.julialang.org/t/chance-constraint-modeling/5301)

<div class="topic-metadata">

**Author:** [@UserMorocco](https://discourse.julialang.org/u/UserMorocco)\
**Replies:** 0\
**Last updated:** [August 9, 2017, 12:49pm UTC](https://discourse.julialang.org/t/chance-constraint-modeling/5301 "2017-08-09T12:49:57Z")

</div>

I have an optimization model with uncertainty in objective function, ie @objective(m, Min, My\_QUANTITY\[t\] \* PRICE\[t\] ) I suppose that the PRICE is uncertain. How this model can be adapted to be used in JuMPChance p…

---

## [Memory leak and JLD, does anyone maintain the package?](https://discourse.julialang.org/t/memory-leak-and-jld-does-anyone-maintain-the-package/5298)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 2\
**Last updated:** [August 9, 2017, 11:35am UTC](https://discourse.julialang.org/t/memory-leak-and-jld-does-anyone-maintain-the-package/5298 "2017-08-09T11:35:55Z")

</div>

Hi, I would like to ask, of someone is maintaining JLD package. There is an open issue https://github.com/JuliaIO/JLD.jl/issues/100 Memory leak when loading multiple arrays in Julia 0.5 more than half a year, which I…

[Previous page](https://discourse.julialang.org/c/domain/10.md?page=555)

[Next page](https://discourse.julialang.org/c/domain/10.md?page=557)
