# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=555

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

**Page:** 556

---

## [How to dynamically call a column in a @where macro?](https://discourse.julialang.org/t/how-to-dynamically-call-a-column-in-a-where-macro/5503)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [August 23, 2017, 12:27pm UTC](https://discourse.julialang.org/t/how-to-dynamically-call-a-column-in-a-where-macro/5503 "2017-08-23T12:27:20Z")

</div>

How can I dynamically refer to a column name (i.e., a Symbol) within a @where macro ? using DataFrames, DataFramesMeta df = DataFrame(x=Int64\[1,2,3,4,5\]) name = "x" nameS = Symbol(name) df2 = @where(df, :x .\>= 2) …

---

## [Controlling GPIO on a cluster machine](https://discourse.julialang.org/t/controlling-gpio-on-a-cluster-machine/5516)

<div class="topic-metadata">

**Author:** [@Frank\_Applin](https://discourse.julialang.org/u/Frank_Applin)\
**Replies:** 2\
**Last updated:** [August 22, 2017, 11:23pm UTC](https://discourse.julialang.org/t/controlling-gpio-on-a-cluster-machine/5516 "2017-08-22T23:23:32Z")

</div>

Hi, I have several development boards set up in a Beowulf cluster \[with passwordless ssh\] along with my desktop machine (a Dell Optiplex 755). I have 4 nodes: NODE-DELL755 \[which is the master\], NODE-RPI2 \[a Raspberry P…

---

## [Optim: What optimiser is best if your gradient computation is slow?](https://discourse.julialang.org/t/optim-what-optimiser-is-best-if-your-gradient-computation-is-slow/5487)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 13\
**Last updated:** [August 22, 2017, 7:24pm UTC](https://discourse.julialang.org/t/optim-what-optimiser-is-best-if-your-gradient-computation-is-slow/5487 "2017-08-22T19:24:40Z")

</div>

I have a objective function that is a result of N stochastic simulations, i.e. some function f with the sample mean of my simulations as input. I am using the ForwarDiff package to produce the gradient of my objective fu…

---

## [ANN: XDiff.jl - an expression differentiation package](https://discourse.julialang.org/t/ann-xdiff-jl-an-expression-differentiation-package/1642)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 25\
**Last updated:** [August 22, 2017, 11:02am UTC](https://discourse.julialang.org/t/ann-xdiff-jl-an-expression-differentiation-package/1642 "2017-08-22T11:02:16Z")

</div>

Although it’s not quite stable yet, people seem to be interested in the topic, so I think it’s time to announce a package I’ve been working on lately. XDiff.jl is an expression differentiation package, supporting fully …

---

## [ODBC query is slow because of casting to a GUID type](https://discourse.julialang.org/t/odbc-query-is-slow-because-of-casting-to-a-guid-type/5383)

<div class="topic-metadata">

**Author:** [@swt30](https://discourse.julialang.org/u/swt30)\
**Replies:** 2\
**Last updated:** [August 22, 2017, 10:18am UTC](https://discourse.julialang.org/t/odbc-query-is-slow-because-of-casting-to-a-guid-type/5383 "2017-08-22T10:18:58Z")

</div>

I’m reading in some moderately-sized tables (10^3–10^6 rows) from a PostgreSQL database. Because PostgreSQL.jl seems to be dead on v0.6, I’ve had to resort to installing the Postgres ODBC driver and using ODBC.jl. I’m pr…

---

## [Entropy calculation from data - comparison with matlab](https://discourse.julialang.org/t/entropy-calculation-from-data-comparison-with-matlab/5495)

<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, 9:47am UTC](https://discourse.julialang.org/t/entropy-calculation-from-data-comparison-with-matlab/5495 "2017-08-22T09:47:04Z")

</div>

I want to calculate the entropy of a continuous random variable from a set of observations. First I wrote the following code in Julia: using Distributions using StatsBase using PyPlot function calc\_entropy( x::Vector{…

---

## [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 …

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=554)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=556)
