# Specific Domains

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

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

**Page:** 456

---

## [Potential bug on relative gap calculation](https://discourse.julialang.org/t/potential-bug-on-relative-gap-calculation/36323)

<div class="topic-metadata">

**Author:** [@Diego](https://discourse.julialang.org/u/Diego)\
**Replies:** 3\
**Last updated:** [March 27, 2020, 2:54am UTC](https://discourse.julialang.org/t/potential-bug-on-relative-gap-calculation/36323 "2020-03-27T02:54:09Z")

</div>

Whatever the MIP tolerance I get the relative mip gap is always zero. I am using: MOI.get(model, MOI.RelativeGap()) JuMP v"0.20.1" Xpress v"0.10.0" Seems to be an issue either in JuMP or in Xpress

---

## [How to do Cross Tabs?](https://discourse.julialang.org/t/how-to-do-cross-tabs/36533)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 10:11pm UTC](https://discourse.julialang.org/t/how-to-do-cross-tabs/36533 "2020-03-26T22:11:19Z")

</div>

Is there a package to do Cross Tabulation? I have HypothesisTests and StatsBase, but can’t find anything about Cross Tabulation in the documentation for each.

---

## [Multivariate Correlation Tables-- Partial Correlation Tables](https://discourse.julialang.org/t/multivariate-correlation-tables-partial-correlation-tables/36566)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [March 26, 2020, 8:03pm UTC](https://discourse.julialang.org/t/multivariate-correlation-tables-partial-correlation-tables/36566 "2020-03-26T20:03:23Z")

</div>

In there a way to automatically generarate partial correlation tables?

---

## [How do I add arguments to a frequency table?](https://discourse.julialang.org/t/how-do-i-add-arguments-to-a-frequency-table/36517)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 14\
**Last updated:** [March 26, 2020, 5:04pm UTC](https://discourse.julialang.org/t/how-do-i-add-arguments-to-a-frequency-table/36517 "2020-03-26T17:04:34Z")

</div>

I’m trying to do a frequency table with a data frame ‘df’ frequencytable(df) I get an error, argument not provided. What arguments do I need?

---

## [Scalar product in objective](https://discourse.julialang.org/t/scalar-product-in-objective/36550)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 1\
**Last updated:** [March 26, 2020, 1:43pm UTC](https://discourse.julialang.org/t/scalar-product-in-objective/36550 "2020-03-26T13:43:51Z")

</div>

I’ll illustrate the problem with the following simple example: import JuMP l = ones(4) model= JuMP.Model() JuMP.@variable(model, x) JuMP.@variable(model, y1) JuMP.@variable(model, y2) epxr = \[ JuMP.@expression(model…

---

## [Saving 2D arrays as indexed color images](https://discourse.julialang.org/t/saving-2d-arrays-as-indexed-color-images/36399)

<div class="topic-metadata">

**Author:** [@rio](https://discourse.julialang.org/u/rio)\
**Replies:** 11\
**Last updated:** [March 26, 2020, 1:15pm UTC](https://discourse.julialang.org/t/saving-2d-arrays-as-indexed-color-images/36399 "2020-03-26T13:15:10Z")

</div>

Hi, please, is there a way to save a 2D array of integers as a .png image, where for each integer value in the array I associate a certain color in the output image? I am looking for a solution for Indexed color - Wiki…

---

## [Problem Solving an "Inverse" ODE w DifferentialEquations.jl](https://discourse.julialang.org/t/problem-solving-an-inverse-ode-w-differentialequations-jl/36521)

<div class="topic-metadata">

**Author:** [@shoshievass](https://discourse.julialang.org/u/shoshievass)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 12:40pm UTC](https://discourse.julialang.org/t/problem-solving-an-inverse-ode-w-differentialequations-jl/36521 "2020-03-26T12:40:34Z")

</div>

I have an ODE that I can solve, but I need to also be able to solve its “inverse”. That is, my normal ode is defined as du\_dx = f(x, u, p) , and I can solve that, but I also need to be able to solve dx\_du = g(x, u, p) (b…

---

## [Dispatching on the type of a constraint or variable](https://discourse.julialang.org/t/dispatching-on-the-type-of-a-constraint-or-variable/36524)

<div class="topic-metadata">

**Author:** [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Replies:** 2\
**Last updated:** [March 26, 2020, 6:51am UTC](https://discourse.julialang.org/t/dispatching-on-the-type-of-a-constraint-or-variable/36524 "2020-03-26T06:51:54Z")

</div>

Hi, How do I write a function signature such that I can dispatch on whether an argument is a variable or a constraint? I’d like to do this: function f(x::TypeOfVariable) ... end function f(x::TypeOfConstraint) ... end…

---

## [Correlation Matrix vs Contingency Table](https://discourse.julialang.org/t/correlation-matrix-vs-contingency-table/36522)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 1:06am UTC](https://discourse.julialang.org/t/correlation-matrix-vs-contingency-table/36522 "2020-03-26T01:06:55Z")

</div>

Is there a difference between a correlation table and a contingency matrix?

---

## [pow(Complex, Int) supported on CUDA?](https://discourse.julialang.org/t/pow-complex-int-supported-on-cuda/36280)

<div class="topic-metadata">

**Author:** [@a5vzener](https://discourse.julialang.org/u/a5vzener)\
**Replies:** 2\
**Last updated:** [March 26, 2020, 12:57am UTC](https://discourse.julialang.org/t/pow-complex-int-supported-on-cuda/36280 "2020-03-26T00:57:14Z")

</div>

I’m trying to run some Julia code on my new nVidia Jetson Nano and I ran into this error: \> \*\*\[ Info:\*\* Building the CUDAnative run-time library for your sm\_53 device, this might take a while... \> \*\*ERROR:\*\* LoadError: …

---

## [Pointer error](https://discourse.julialang.org/t/pointer-error/36341)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 1\
**Last updated:** [March 25, 2020, 11:57pm UTC](https://discourse.julialang.org/t/pointer-error/36341 "2020-03-25T23:57:24Z")

</div>

it’s my first time using Threads for parallel computing as i’m new to it, and i wanted to work with the parallel for loop using @threads, there are 4 threads and i put the macro before the for loop then i called the code…

---

## [\[ANN\] Turing.jl 0.10.0](https://discourse.julialang.org/t/ann-turing-jl-0-10-0/36507)

<div class="topic-metadata">

**Author:** [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)\
**Replies:** 0\
**Last updated:** [March 25, 2020, 6:29pm UTC](https://discourse.julialang.org/t/ann-turing-jl-0-10-0/36507 "2020-03-25T18:29:02Z")

</div>

Hey folks. We’re happy to announce Turing version 0.10.0! We’re now maintaining a HISTORY.md file with an in-depth summary of changes, but I wanted to give an overview of the biggest features that you can use in 0.10.0. …

---

## ["ERROR: LoadError: TaskFailedException: IOError: stream is closed or unusable" with @distributed on multinode cluster](https://discourse.julialang.org/t/error-loaderror-taskfailedexception-ioerror-stream-is-closed-or-unusable-with-distributed-on-multinode-cluster/34768)

<div class="topic-metadata">

**Author:** [@teored90](https://discourse.julialang.org/u/teored90)\
**Replies:** 3\
**Last updated:** [March 19, 2020, 4:22pm UTC](https://discourse.julialang.org/t/error-loaderror-taskfailedexception-ioerror-stream-is-closed-or-unusable-with-distributed-on-multinode-cluster/34768 "2020-03-19T16:22:57Z")

</div>

I have some code that evaluates trajectories of a stochastic master equation in parallel, using a @distributed for with reduction for evaluating average quantities. The code is available here. Some jobs fail with the fo…

---

## [Two-point boundary value problem in Julia DiffEq: "control hamiltonian"](https://discourse.julialang.org/t/two-point-boundary-value-problem-in-julia-diffeq-control-hamiltonian/36477)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 10\
**Last updated:** [March 25, 2020, 4:53pm UTC](https://discourse.julialang.org/t/two-point-boundary-value-problem-in-julia-diffeq-control-hamiltonian/36477 "2020-03-25T16:53:30Z")

</div>

I’m interested in solving Hamilton’s equations of motion in DiffEq with two boundary conditions, an initial condition on the state variables and a terminal condition on the momentum variables. First I tried setting up a …

---

## [Setting min and max values in a heatmap (Plots.jl)](https://discourse.julialang.org/t/setting-min-and-max-values-in-a-heatmap-plots-jl/36496)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 2\
**Last updated:** [March 25, 2020, 3:39pm UTC](https://discourse.julialang.org/t/setting-min-and-max-values-in-a-heatmap-plots-jl/36496 "2020-03-25T15:39:38Z")

</div>

I am making heatmaps of a discrete function taking values 0…5 . Plots (GR) makes automatic scaling for me: min is green, max is red (with seriescolor=RdYlGn\_r ). I want the heatmaps to have the same “color scale” - 0 is…

---

## [Performance MIPstart](https://discourse.julialang.org/t/performance-mipstart/36464)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 2\
**Last updated:** [March 25, 2020, 12:59pm UTC](https://discourse.julialang.org/t/performance-mipstart/36464 "2020-03-25T12:59:21Z")

</div>

I’ll share an experience. I have a mixed linear optimization problem. When I use a feasibre solution (MIPstart), sometimes CPLEX performs worse than if I let it determine an incumbent solution automatically. Sometimes…

---

## [Using CuArrays returns incompatibility between CUDA and LLVM](https://discourse.julialang.org/t/using-cuarrays-returns-incompatibility-between-cuda-and-llvm/36465)

<div class="topic-metadata">

**Author:** [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Replies:** 1\
**Last updated:** [March 25, 2020, 10:21am UTC](https://discourse.julialang.org/t/using-cuarrays-returns-incompatibility-between-cuda-and-llvm/36465 "2020-03-25T10:21:10Z")

</div>

I am trying to follow this example on Windows 10 and Julia 1.4 and I am getting the following warning: using CuArrays x\_d = CuArrays.fill(1.0f0, N) # a vector stored on the GPU filled with 1.0 (Float32) y\_d = CuArrays.…

---

## [ChaosTools lyapunovs with stiff solvers](https://discourse.julialang.org/t/chaostools-lyapunovs-with-stiff-solvers/35961)

<div class="topic-metadata">

**Author:** [@rusandris](https://discourse.julialang.org/u/rusandris)\
**Replies:** 3\
**Last updated:** [March 24, 2020, 9:25pm UTC](https://discourse.julialang.org/t/chaostools-lyapunovs-with-stiff-solvers/35961 "2020-03-24T21:25:54Z")

</div>

I’ve come across a problem regarding using lyapunovs() with stiff diffeq solvers. It is very similar to this one: Problem with tangent\_integrator: Chaostools tangent\_integrator stiff solvers tangent\_integrator not comp…

---

## [Julia HTTP server behind a reverse proxy](https://discourse.julialang.org/t/julia-http-server-behind-a-reverse-proxy/36456)

<div class="topic-metadata">

**Author:** [@tencnivel](https://discourse.julialang.org/u/tencnivel)\
**Replies:** 0\
**Last updated:** [March 24, 2020, 6:00pm UTC](https://discourse.julialang.org/t/julia-http-server-behind-a-reverse-proxy/36456 "2020-03-24T18:00:07Z")

</div>

I am sharing a workaround solution to this error when calling a Julia HTTP server behind HAProxy: Error: (Base.IOError("read: connection reset by peer (ECONNRESET)", -104) If you google it you’ll find other application…

---

## [How to get reproducible results of classification models?: example using DecisionTree](https://discourse.julialang.org/t/how-to-get-reproducible-results-of-classification-models-example-using-decisiontree/36452)

<div class="topic-metadata">

**Author:** [@rio](https://discourse.julialang.org/u/rio)\
**Replies:** 0\
**Last updated:** [March 24, 2020, 3:12pm UTC](https://discourse.julialang.org/t/how-to-get-reproducible-results-of-classification-models-example-using-decisiontree/36452 "2020-03-24T15:12:55Z")

</div>

Hi! I would like to train a classifier (eg. Random Forests) and I would like to get the same results if I train/run the model again. My first attempt was to try to set the seed of the random number generator, like this: …

---

## [StackOverflowError in Bayesian Neural Networks Tutorial](https://discourse.julialang.org/t/stackoverflowerror-in-bayesian-neural-networks-tutorial/36372)

<div class="topic-metadata">

**Author:** [@Farlein](https://discourse.julialang.org/u/Farlein)\
**Replies:** 5\
**Last updated:** [March 24, 2020, 12:35pm UTC](https://discourse.julialang.org/t/stackoverflowerror-in-bayesian-neural-networks-tutorial/36372 "2020-03-24T12:35:41Z")

</div>

Hi there, I am learning Bayesian Neural Networks (BNN) using Turing. I have copied the codes from the tutorial, https://turing.ml/dev/tutorials/3-bayesnn/. The original code trains a BNN model with a synthetic dataset …

---

## [Incompatibility detected between CUDA and LLVM 8.0+;](https://discourse.julialang.org/t/incompatibility-detected-between-cuda-and-llvm-8-0/36434)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 2\
**Last updated:** [March 24, 2020, 12:28pm UTC](https://discourse.julialang.org/t/incompatibility-detected-between-cuda-and-llvm-8-0/36434 "2020-03-24T12:28:30Z")

</div>

Hi, this is julia 1.4.0 updated as of today. When I ran using CuArrays using CuArrays.CURAND using CUDAnative using CUDAdrv I got the above warning Warning: Incompatibility detected between CUDA and LLVM 8.0+; disabl…

---

## [Add a column to XLSX](https://discourse.julialang.org/t/add-a-column-to-xlsx/36414)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [March 24, 2020, 3:29am UTC](https://discourse.julialang.org/t/add-a-column-to-xlsx/36414 "2020-03-24T03:29:44Z")

</div>

I was trying to add a dataframe of 7 float64 numbers to an XLSX using XLSX.writetable!(sheet, columns, labels, anchor\_cell=XLSX.CellRef("B2")) Do I have the formating right? I think I might need to change the numbers t…

---

## [Simulation of super high-dimensional distribution](https://discourse.julialang.org/t/simulation-of-super-high-dimensional-distribution/35144)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 3\
**Last updated:** [March 24, 2020, 2:26am UTC](https://discourse.julialang.org/t/simulation-of-super-high-dimensional-distribution/35144 "2020-03-24T02:26:16Z")

</div>

I am working on simulated method of moments which requires to draw random variables from a multivariate normal distribution for numerical integration. However, the dimension of this multivariate normal distribution is su…

---

## [Understanding Linear Regression and finding R-Squared](https://discourse.julialang.org/t/understanding-linear-regression-and-finding-r-squared/36079)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 11\
**Last updated:** [March 24, 2020, 12:15am UTC](https://discourse.julialang.org/t/understanding-linear-regression-and-finding-r-squared/36079 "2020-03-24T00:15:05Z")

</div>

I entered this dataframe and the GLM function below: DEmployment = \[0.036327933,0.034107058,0.030691709,0.029333333,-0.008635579,0.010452962,0.017672414,0.024565862,0.030177759,0.01565008,0.02094034,0.011609907,0.008416…

---

## [Save optimum variables](https://discourse.julialang.org/t/save-optimum-variables/36405)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 3\
**Last updated:** [March 23, 2020, 11:46pm UTC](https://discourse.julialang.org/t/save-optimum-variables/36405 "2020-03-23T23:46:50Z")

</div>

Dear all, I have the following optimization problem implemented: using JuMP, CPLEX, Printf n=50 function Problem(c) modelo = Model(with\_optimizer(CPLEX.Optimizer)) (n, n) = size(c) @variable(modelo, x\[1:n…

---

## [BioJulia dependencies and JuliaRegistrator](https://discourse.julialang.org/t/biojulia-dependencies-and-juliaregistrator/36400)

<div class="topic-metadata">

**Author:** [@phaverty](https://discourse.julialang.org/u/phaverty)\
**Replies:** 4\
**Last updated:** [March 23, 2020, 9:52pm UTC](https://discourse.julialang.org/t/biojulia-dependencies-and-juliaregistrator/36400 "2020-03-23T21:52:08Z")

</div>

GenomicVectors.jl is registered with the main julia registry. I’ve added XAM.jl as a dependency. When I try to register a new version of GenomicVectors.jl, the JuliaRegistrator complains that it can’t find XAM.jl. Is the…

---

## [Can the julia compiler optimize code for the processor cache?](https://discourse.julialang.org/t/can-the-julia-compiler-optimize-code-for-the-processor-cache/36392)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [March 23, 2020, 5:38pm UTC](https://discourse.julialang.org/t/can-the-julia-compiler-optimize-code-for-the-processor-cache/36392 "2020-03-23T17:38:38Z")

</div>

can the julia compiler optimize code for the processor cache?

---

## [Modelling COVID-19 in Julia and plotting AgentBasedModels on arbitrary networks](https://discourse.julialang.org/t/modelling-covid-19-in-julia-and-plotting-agentbasedmodels-on-arbitrary-networks/36005)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 8\
**Last updated:** [March 23, 2020, 2:48pm UTC](https://discourse.julialang.org/t/modelling-covid-19-in-julia-and-plotting-agentbasedmodels-on-arbitrary-networks/36005 "2020-03-23T14:48:05Z")

</div>

Hi all! Recently there was a paper introducing Pathogen.jl, which I found interesting. It is a Julia package for modelling disease spreading : \[2002.05850\] Pathogen.jl: Infectious Disease Transmission Network Modelling …

---

## [Optimality gap of Global solver in NLopt](https://discourse.julialang.org/t/optimality-gap-of-global-solver-in-nlopt/36144)

<div class="topic-metadata">

**Author:** [@ahmadreza-marandi](https://discourse.julialang.org/u/ahmadreza-marandi)\
**Replies:** 11\
**Last updated:** [March 23, 2020, 12:07pm UTC](https://discourse.julialang.org/t/optimality-gap-of-global-solver-in-nlopt/36144 "2020-03-23T12:07:37Z")

</div>

Hi all, I have an extremely hard NLP that I want to solve via @NLopt. I can get the code running but there is no output unless the algorithm gets terminated. Now I have two questions: Is it possible to extract the opt…

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

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