# Specific Domains

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

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

**Page:** 193

---

## [Periodic Callback and Sensitivity](https://discourse.julialang.org/t/periodic-callback-and-sensitivity/99057)

<div class="topic-metadata">

**Author:** [@Guido\_Ballabio](https://discourse.julialang.org/u/Guido_Ballabio)\
**Replies:** 5\
**Last updated:** [May 19, 2023, 8:40pm UTC](https://discourse.julialang.org/t/periodic-callback-and-sensitivity/99057 "2023-05-19T20:40:30Z")

</div>

I am trying to use DiffEq and SciML sensitivity to build NN controllers for physical systems. Usually everything works, however this time I need to design a fixed-frequency controller so I’ve reached to PeriodCallback w…

---

## [Error During Test in wmma.jl](https://discourse.julialang.org/t/error-during-test-in-wmma-jl/99035)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 2\
**Last updated:** [May 19, 2023, 8:11pm UTC](https://discourse.julialang.org/t/error-during-test-in-wmma-jl/99035 "2023-05-19T20:11:10Z")

</div>

Hi! I run test CUDA to ensure that everything works as expected. But some errors occurred as below. Are these errors related to the test file or the configuration of the system? How can I resolve them? Thanks! I have…

---

## [MethodError in Turing.jl](https://discourse.julialang.org/t/methoderror-in-turing-jl/99075)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 2\
**Last updated:** [May 19, 2023, 6:41pm UTC](https://discourse.julialang.org/t/methoderror-in-turing-jl/99075 "2023-05-19T18:41:28Z")

</div>

I’m trying to do a Bayesian inference to the following ODE system: function ice(du, u, p, t) εₘ, εₖ, σ, F, d, ε = u Aₘ, Qₘ, n, pₘ, R, T, Eₖ, Eₘ, η, dₛₛ, Fₛₛ, ε₁, ε₂, S = p du\[1\] = Aₘ \* (σ/F)^n \* d^(-pₘ) \* ℯ^(-Qₘ/(…

---

## [How to make a South-up map using GeoMakie](https://discourse.julialang.org/t/how-to-make-a-south-up-map-using-geomakie/96438)

<div class="topic-metadata">

**Author:** [@dpabon](https://discourse.julialang.org/u/dpabon)\
**Replies:** 2\
**Last updated:** [March 23, 2023, 1:15pm UTC](https://discourse.julialang.org/t/how-to-make-a-south-up-map-using-geomakie/96438 "2023-03-23T13:15:17Z")

</div>

I would like to produce a coast-lines plot using GeoMakie like this one: or this one: I tried with the dest projection, but doesn’t work well: using CairoMakie, GeoMakie fig = Figure() ga = GeoAxis( fig\[1,…

---

## [Minimising DifferentialEquations GPU memory allocation](https://discourse.julialang.org/t/minimising-differentialequations-gpu-memory-allocation/99050)

<div class="topic-metadata">

**Author:** [@Tommy\_Fischer](https://discourse.julialang.org/u/Tommy_Fischer)\
**Replies:** 8\
**Last updated:** [May 19, 2023, 10:08am UTC](https://discourse.julialang.org/t/minimising-differentialequations-gpu-memory-allocation/99050 "2023-05-19T10:08:46Z")

</div>

I’m simulating the Gross-Pitaevskii Equation for a three-dimensional array with M^3 values, and am running into some issues with GPU memory for large M values. In short, I’m wondering if there is anything more I can do t…

---

## [How to create an user-defined function with multiple vector as inputs](https://discourse.julialang.org/t/how-to-create-an-user-defined-function-with-multiple-vector-as-inputs/99068)

<div class="topic-metadata">

**Author:** [@PatrickeTownsend](https://discourse.julialang.org/u/PatrickeTownsend)\
**Replies:** 1\
**Last updated:** [May 18, 2023, 8:40pm UTC](https://discourse.julialang.org/t/how-to-create-an-user-defined-function-with-multiple-vector-as-inputs/99068 "2023-05-18T20:40:21Z")

</div>

Hello, I’m new to JuMP module and also Julia. I’m trying to perform a trajectory optimization with Hermite-Simpson direct collocation method. I’ve trying to create a function for the dynamic equations, but I’m still get…

---

## [How to stick a colorbar to a scaled axis in Makie](https://discourse.julialang.org/t/how-to-stick-a-colorbar-to-a-scaled-axis-in-makie/70358)

<div class="topic-metadata">

**Author:** [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Replies:** 12\
**Last updated:** [May 18, 2023, 4:43pm UTC](https://discourse.julialang.org/t/how-to-stick-a-colorbar-to-a-scaled-axis-in-makie/70358 "2023-05-18T16:43:30Z")

</div>

Here is a MWE of a Makie plot with a wide figure with one square axis and a colorbar “attached” to it: f = Figure(resolution=(900,300)) Axis(f\[1, 1\], aspect = AxisAspect(1)) Box(f\[1, 1\], color = (:blue, 0.2), strokecolo…

---

## [Help converting Jags.jl example to Turing](https://discourse.julialang.org/t/help-converting-jags-jl-example-to-turing/98718)

<div class="topic-metadata">

**Author:** [@mkaut](https://discourse.julialang.org/u/mkaut)\
**Replies:** 1\
**Last updated:** [May 18, 2023, 12:57pm UTC](https://discourse.julialang.org/t/help-converting-jags-jl-example-to-turing/98718 "2023-05-18T12:57:28Z")

</div>

I want to start using Turing and decided to learn it by converting an example from Jags.jl (which I have used before). I have selected the ‘rats’ example from Jags.jl for the test. I have a working code, but 2 issues th…

---

## [How to include the iteration number of a loop in variable names?](https://discourse.julialang.org/t/how-to-include-the-iteration-number-of-a-loop-in-variable-names/90840)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 4\
**Last updated:** [May 18, 2023, 7:19am UTC](https://discourse.julialang.org/t/how-to-include-the-iteration-number-of-a-loop-in-variable-names/90840 "2023-05-18T07:19:29Z")

</div>

I have a loop iterating on r and want to define the variable x^r in every iteration. I know one possibility is defining an anonymous variable, but it is not what I need. m=Model() for r in 1:4 x = @variable(m, \[r…

---

## [Different outputs after adding x-axis coordinates of data in Makie.jl](https://discourse.julialang.org/t/different-outputs-after-adding-x-axis-coordinates-of-data-in-makie-jl/99037)

<div class="topic-metadata">

**Author:** [@nebula](https://discourse.julialang.org/u/nebula)\
**Replies:** 4\
**Last updated:** [May 18, 2023, 6:11am UTC](https://discourse.julialang.org/t/different-outputs-after-adding-x-axis-coordinates-of-data-in-makie-jl/99037 "2023-05-18T06:11:43Z")

</div>

The outputs are different for the codes below: f = Figure() ax1 = Axis(f\[1, 1\], xgridvisible=false, ygridvisible=false) scatter!(ax1, 0:1e-3:1, ones(1001), markersize=1) f f = Figure() ax1 = Axis(f\[1, 1\], xgridvisib…

---

## [Error Running Simple Gaussian Demo - Turing.jl](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553)

<div class="topic-metadata">

**Author:** [@joshuaderekwhite](https://discourse.julialang.org/u/joshuaderekwhite)\
**Replies:** 4\
**Last updated:** [May 18, 2023, 3:21am UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553 "2023-05-18T03:21:08Z")

</div>

Hello, I am trying to run the Simple Gaussian Demo found here: https://turing.ml/v0.22/docs/using-turing/guide. I have copied the gdemo model as written as well as c1-c6. c1 and c2 run without any errors, however for c3…

---

## [Workflow for MCMC parameter estimation](https://discourse.julialang.org/t/workflow-for-mcmc-parameter-estimation/98960)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 3\
**Last updated:** [May 18, 2023, 3:04am UTC](https://discourse.julialang.org/t/workflow-for-mcmc-parameter-estimation/98960 "2023-05-18T03:04:20Z")

</div>

Hi, I would like to use Julia for the parameter estimation of an ODE system using MCMC. I have empirical data sets and ODE model that I can successfully solve using DifferentialEquations.jl. What packages/ workflow I …

---

## [Calculating Hessians of loss w.r.t parameters of a system of ODEs](https://discourse.julialang.org/t/calculating-hessians-of-loss-w-r-t-parameters-of-a-system-of-odes/99025)

<div class="topic-metadata">

**Author:** [@KK\_JuliaNoob](https://discourse.julialang.org/u/KK_JuliaNoob)\
**Replies:** 1\
**Last updated:** [May 18, 2023, 12:30am UTC](https://discourse.julialang.org/t/calculating-hessians-of-loss-w-r-t-parameters-of-a-system-of-odes/99025 "2023-05-18T00:30:09Z")

</div>

I have a system of ~10 ODEs with ~20 parameters and a loss function (e.g. MSE) that is evaluated on the trace of the ODE solution. What’s an efficient way to calculate the Hessian matrix of the loss w.r.t the parameters?…

---

## [How to vectorize a JuMP solver](https://discourse.julialang.org/t/how-to-vectorize-a-jump-solver/99010)

<div class="topic-metadata">

**Author:** [@Longblackcoffee](https://discourse.julialang.org/u/Longblackcoffee)\
**Replies:** 2\
**Last updated:** [May 18, 2023, 12:16am UTC](https://discourse.julialang.org/t/how-to-vectorize-a-jump-solver/99010 "2023-05-18T00:16:07Z")

</div>

Hi everyone, Is it possible to vectorize a JuMP solver? I want to solve a maximization problem for different draws of a random variable (X in the example below, drawn from a log-normal distribution). So for a vector of …

---

## [Using DifffEqBayes.jl for fitting y(x) instead of time series](https://discourse.julialang.org/t/using-difffeqbayes-jl-for-fitting-y-x-instead-of-time-series/99026)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 11:32pm UTC](https://discourse.julialang.org/t/using-difffeqbayes-jl-for-fitting-y-x-instead-of-time-series/99026 "2023-05-17T23:32:09Z")

</div>

I was wondering if there is an option in DiffEqBayes.jl or another package to make MCMC parameter estimation that fits one of the variables as a function of the other, rather than the time series of each. Let’s say I ha…

---

## [How to apply a symbolic equation on a vector?](https://discourse.julialang.org/t/how-to-apply-a-symbolic-equation-on-a-vector/98988)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [May 17, 2023, 8:51pm UTC](https://discourse.julialang.org/t/how-to-apply-a-symbolic-equation-on-a-vector/98988 "2023-05-17T20:51:35Z")

</div>

I have the following code: using ModelingToolkit, OrdinaryDiffEq, DataInterpolations, Plots Cp=\[0.024384377390186646,0.03811829845979822,0.05731175742000688,0.0803120051369546,0.10526323380995135,0.1312349486430945, …

---

## [Plotting countries with GeoMakie: reduce size and more](https://discourse.julialang.org/t/plotting-countries-with-geomakie-reduce-size-and-more/97966)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 10\
**Last updated:** [May 17, 2023, 8:14pm UTC](https://discourse.julialang.org/t/plotting-countries-with-geomakie-reduce-size-and-more/97966 "2023-05-17T20:14:56Z")

</div>

I am trying visualize some specific countries with GeoMakie.jl. I 've seen Examples · GeoMakie.jl and I tried to do something similar: begin # Acquire data ger\_states = Downloads.download("https://raw.githubuserconte…

---

## [How do I specify a precomputed kernel in SVM using LIBSVM or MLJ?](https://discourse.julialang.org/t/how-do-i-specify-a-precomputed-kernel-in-svm-using-libsvm-or-mlj/61962)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 4\
**Last updated:** [May 17, 2023, 8:01pm UTC](https://discourse.julialang.org/t/how-do-i-specify-a-precomputed-kernel-in-svm-using-libsvm-or-mlj/61962 "2023-05-17T20:01:25Z")

</div>

Question arising in an MLJ slack post: maybe this is a naive question, but how do you actually train an SVM using a precomputed kernel using LIBSVM or MLJ? I can’t seem to find a way to “give” the kernel matrix to any s…

---

## [INLA.jl implementation help](https://discourse.julialang.org/t/inla-jl-implementation-help/98958)

<div class="topic-metadata">

**Author:** [@bparbhu](https://discourse.julialang.org/u/bparbhu)\
**Replies:** 4\
**Last updated:** [May 17, 2023, 7:23pm UTC](https://discourse.julialang.org/t/inla-jl-implementation-help/98958 "2023-05-17T19:23:53Z")

</div>

So I started trying to reverse engineer this comparison done in R that performs a very close implementation of INLA from scratch. Though, I’m having difficulty reproducing the results of the “from-scratch” implementation…

---

## [Do we need to use weights in imbalanced survival models?](https://discourse.julialang.org/t/do-we-need-to-use-weights-in-imbalanced-survival-models/99008)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 5:08pm UTC](https://discourse.julialang.org/t/do-we-need-to-use-weights-in-imbalanced-survival-models/99008 "2023-05-17T17:08:40Z")

</div>

Hello. Say I am using a Cox model to predict cancer, but my dataset has 10000 healthy patients and just 10 with cancer during the studied interval. Do we need to use weights to compensate imbalance with these kind of m…

---

## [Which solvers have dual solutions available for MINLPs?](https://discourse.julialang.org/t/which-solvers-have-dual-solutions-available-for-minlps/98859)

<div class="topic-metadata">

**Author:** [@vineetjnair9](https://discourse.julialang.org/u/vineetjnair9)\
**Replies:** 2\
**Last updated:** [May 17, 2023, 7:04pm UTC](https://discourse.julialang.org/t/which-solvers-have-dual-solutions-available-for-minlps/98859 "2023-05-17T19:04:13Z")

</div>

Which solvers (out of the ones here - Installation Guide · JuMP) can I extract dual values for, specifically for MINLPs? I was able to extract them while running Ipopt for NLPs but now I’m working on an MINLP (nonconvex)…

---

## [Calling Julia from a Python Dash app](https://discourse.julialang.org/t/calling-julia-from-a-python-dash-app/99011)

<div class="topic-metadata">

**Author:** [@lxvm](https://discourse.julialang.org/u/lxvm)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 6:26pm UTC](https://discourse.julialang.org/t/calling-julia-from-a-python-dash-app/99011 "2023-05-17T18:26:39Z")

</div>

I was wondering if calling Julia through a multi-threaded Python Dash app can in theory work in v1.9.0, since the new version allows the number of threads to change in the Julia runtime. The following simple Dash app usi…

---

## [Using Catalyst with DynamicalSystems](https://discourse.julialang.org/t/using-catalyst-with-dynamicalsystems/98965)

<div class="topic-metadata">

**Author:** [@Dragolonth](https://discourse.julialang.org/u/Dragolonth)\
**Replies:** 4\
**Last updated:** [May 17, 2023, 3:49pm UTC](https://discourse.julialang.org/t/using-catalyst-with-dynamicalsystems/98965 "2023-05-17T15:49:25Z")

</div>

Hi all. I currently have a large ODE system that I’ve defined as a reaction network using Catalyst. I was wondering if it would be possible to essentially put this reaction network into DynamicalSystems to find the attra…

---

## [Change Latex font color in Makie](https://discourse.julialang.org/t/change-latex-font-color-in-makie/98998)

<div class="topic-metadata">

**Author:** [@phymann](https://discourse.julialang.org/u/phymann)\
**Replies:** 1\
**Last updated:** [May 17, 2023, 2:16pm UTC](https://discourse.julialang.org/t/change-latex-font-color-in-makie/98998 "2023-05-17T14:16:15Z")

</div>

Dear all, I’ve searched a lot but still cannot find the solution. How to change axis xlabel and ylabel latex font color, in CairoMakie?

---

## [Help with AutoDiff in Metal.jl](https://discourse.julialang.org/t/help-with-autodiff-in-metal-jl/98937)

<div class="topic-metadata">

**Author:** [@raktim](https://discourse.julialang.org/u/raktim)\
**Replies:** 7\
**Last updated:** [May 17, 2023, 5:54am UTC](https://discourse.julialang.org/t/help-with-autodiff-in-metal-jl/98937 "2023-05-17T05:54:58Z")

</div>

I am trying to use Metal.jl for a scientific computation and having difficulty with AutoDiff (ForwardDiff). I am using julia 1.9. This is the code dF = x-\>ForwardDiff.gradient(x-\>dot(x,x),x) N = 7; x = rand(Float32,N);…

---

## [Why is GPU kernel rand() not as "random" as CPU rand()?](https://discourse.julialang.org/t/why-is-gpu-kernel-rand-not-as-random-as-cpu-rand/98892)

<div class="topic-metadata">

**Author:** [@ReWoP](https://discourse.julialang.org/u/ReWoP)\
**Replies:** 10\
**Last updated:** [May 17, 2023, 2:41am UTC](https://discourse.julialang.org/t/why-is-gpu-kernel-rand-not-as-random-as-cpu-rand/98892 "2023-05-17T02:41:53Z")

</div>

Hi all, I’m implementing some optimization algorithms in the GPU (CUDA) that rely on, among other things, random numbers to set the exploration of the search space. I’m also comparing the results with the CPU implementa…

---

## [Adding cuts iteratively](https://discourse.julialang.org/t/adding-cuts-iteratively/98902)

<div class="topic-metadata">

**Author:** [@Saba\_ghasemi](https://discourse.julialang.org/u/Saba_ghasemi)\
**Replies:** 8\
**Last updated:** [May 17, 2023, 2:40am UTC](https://discourse.julialang.org/t/adding-cuts-iteratively/98902 "2023-05-17T02:40:50Z")

</div>

I am attempting to incorporate perspective cuts into a non-linear model for linearization using the JuMP package. My aim is to utilize the SCIP solver and introduce a cut every 5 seconds, utilizing a feasible point to ad…

---

## [Avoiding for Loop in JuMP](https://discourse.julialang.org/t/avoiding-for-loop-in-jump/98920)

<div class="topic-metadata">

**Author:** [@Gagan\_Meena](https://discourse.julialang.org/u/Gagan_Meena)\
**Replies:** 3\
**Last updated:** [May 16, 2023, 9:35pm UTC](https://discourse.julialang.org/t/avoiding-for-loop-in-jump/98920 "2023-05-16T21:35:04Z")

</div>

Is it possible to avoid for loop for the code given below. @expression(JSTEP, Inj\[i=1:n, j=1:s\], Pg\[i,j\] - Pdmax\[i,j\] + PD\[i,j\] - PC\[i,j\]) for i = 1:r f = from\[i\] t = to\[i\] for k =1:s Inj\[f,k\] = Inj\[f,k\] …

---

## [Nelder-Mead or other optimization](https://discourse.julialang.org/t/nelder-mead-or-other-optimization/98853)

<div class="topic-metadata">

**Author:** [@papar](https://discourse.julialang.org/u/papar)\
**Replies:** 5\
**Last updated:** [May 16, 2023, 9:28pm UTC](https://discourse.julialang.org/t/nelder-mead-or-other-optimization/98853 "2023-05-16T21:28:42Z")

</div>

I am trying to use Optim to find parameters of a vector valued function using the Nelder-Mead algorithm, but open to considering other algorithms or packages. The problem is to find parameters of a function by minimizing…

---

## [Error using ModelingToolkit](https://discourse.julialang.org/t/error-using-modelingtoolkit/98947)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [May 16, 2023, 8:55pm UTC](https://discourse.julialang.org/t/error-using-modelingtoolkit/98947 "2023-05-16T20:55:28Z")

</div>

If I run the following code: using ModelingToolkit, OrdinaryDiffEq, DataInterpolations Cp=\[0.024384377390186646,0.03811829845979822,0.05731175742000688,0.0803120051369546,0.10526323380995135,0.1312349486430945, 0.1…

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

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