# Specific Domains

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

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

**Page:** 163

---

## [How to optimize a neural network with a "traditional" optimizer?](https://discourse.julialang.org/t/how-to-optimize-a-neural-network-with-a-traditional-optimizer/104580)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 1\
**Last updated:** [October 4, 2023, 6:50pm UTC](https://discourse.julialang.org/t/how-to-optimize-a-neural-network-with-a-traditional-optimizer/104580 "2023-10-04T18:50:44Z")

</div>

Nowadays neural networks are represented as trees with parameters as leaves. This is how PyTorch, JAX and Julia’s Flux do it. It doesn’t let one update all parameters at once like x = x - lr \* grad(objective)(x), so libr…

---

## [Output automatic time steps taken by solvers while specifying \`saveat\`](https://discourse.julialang.org/t/output-automatic-time-steps-taken-by-solvers-while-specifying-saveat/104578)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 1\
**Last updated:** [October 4, 2023, 6:26pm UTC](https://discourse.julialang.org/t/output-automatic-time-steps-taken-by-solvers-while-specifying-saveat/104578 "2023-10-04T18:26:06Z")

</div>

Many solvers in OrdinaryDiffEq.jl for solving stiff ODEs use automatic time-stepping. From what I understand, if I specify saveat, then sol.t is the time steps I specify in saveat, and if I leave saveat untouched, then s…

---

## [Plots and click events](https://discourse.julialang.org/t/plots-and-click-events/104253)

<div class="topic-metadata">

**Author:** [@vvbond](https://discourse.julialang.org/u/vvbond)\
**Replies:** 9\
**Last updated:** [October 4, 2023, 5:13pm UTC](https://discourse.julialang.org/t/plots-and-click-events/104253 "2023-10-04T17:13:20Z")

</div>

Hi All, I wonder, if any of the Plots’ backends provides an infrastructure to handle click events. According to this page Click events in Julia, PlotlyJS should support it. However, I’d be keen to use the plotlyjs() bac…

---

## [Solver-specific callback for custom termination rule for LP Barrier using Gurobi and JuMP](https://discourse.julialang.org/t/solver-specific-callback-for-custom-termination-rule-for-lp-barrier-using-gurobi-and-jump/104391)

<div class="topic-metadata">

**Author:** [@FelixSchmidt](https://discourse.julialang.org/u/FelixSchmidt)\
**Replies:** 13\
**Last updated:** [October 4, 2023, 9:10am UTC](https://discourse.julialang.org/t/solver-specific-callback-for-custom-termination-rule-for-lp-barrier-using-gurobi-and-jump/104391 "2023-10-04T09:10:49Z")

</div>

Hi all, I am implementing a Benders-like bundle method algorithm to solve a large-scale stochastic linear program. I want to use on-demand inexact cuts, i.e. I would like to solve the subproblems accurately only if they…

---

## [How to use the package ParallelStencil.jl to solve linear equation A\*x=b in GPU?](https://discourse.julialang.org/t/how-to-use-the-package-parallelstencil-jl-to-solve-linear-equation-a-x-b-in-gpu/69562)

<div class="topic-metadata">

**Author:** [@liaoweiyang2017](https://discourse.julialang.org/u/liaoweiyang2017)\
**Replies:** 9\
**Last updated:** [October 4, 2023, 8:23am UTC](https://discourse.julialang.org/t/how-to-use-the-package-parallelstencil-jl-to-solve-linear-equation-a-x-b-in-gpu/69562 "2023-10-04T08:23:23Z")

</div>

For example, I can use the following code to solve linear equation in GPU, but this package Krylov.jl cannot support the complex matrix input, so when solving the complex linear equation, it has a poor efficiency. I foun…

---

## [Using WriteVTK to write DiffEq sol to disk during timestepping](https://discourse.julialang.org/t/using-writevtk-to-write-diffeq-sol-to-disk-during-timestepping/104517)

<div class="topic-metadata">

**Author:** [@jarias9](https://discourse.julialang.org/u/jarias9)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 9:57pm UTC](https://discourse.julialang.org/t/using-writevtk-to-write-diffeq-sol-to-disk-during-timestepping/104517 "2023-10-03T21:57:24Z")

</div>

Just had a quick question regarding alternative saving behavior for DiffEq. I was wondering if there was a way to write all solution data directly to disk with WriteVTK as timestepping advances instead of having all of m…

---

## [Makie/CairoMakie custom colorbar ticks (\> and \<)](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460)

<div class="topic-metadata">

**Author:** [@ewillcox](https://discourse.julialang.org/u/ewillcox)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 7:08pm UTC](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460 "2023-10-03T19:08:37Z")

</div>

Hello, I’d like to customize my Colorbar() ticks in Makie/CairoMakie I have reduced the colorrange on a graph since I have outliers that I do wish to display but don’t wish to have impact my colormap. Currently the tic…

---

## [Compute (Bayesian) R2 for Turing models](https://discourse.julialang.org/t/compute-bayesian-r2-for-turing-models/104537)

<div class="topic-metadata">

**Author:** [@DominiqueMakowski](https://discourse.julialang.org/u/DominiqueMakowski)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 5:17pm UTC](https://discourse.julialang.org/t/compute-bayesian-r2-for-turing-models/104537 "2023-10-03T17:17:47Z")

</div>

Somehow my google search didn’t yield many results for how to compute R2 for Turing models. StatsBase.jl defines a few generic methods, but I was in particular interested in the so-called Bayesian R2 (Gelman et al., 201…

---

## [Trying to solve a SDP problem with quadratic constraints](https://discourse.julialang.org/t/trying-to-solve-a-sdp-problem-with-quadratic-constraints/104461)

<div class="topic-metadata">

**Author:** [@golanor](https://discourse.julialang.org/u/golanor)\
**Replies:** 3\
**Last updated:** [October 3, 2023, 5:06pm UTC](https://discourse.julialang.org/t/trying-to-solve-a-sdp-problem-with-quadratic-constraints/104461 "2023-10-03T17:06:43Z")

</div>

Hi, I’m trying to solve a SDP with quadratic constraints and I get the following error Unable to transform a quadratic constraint into a second-order cone constraint because the quadratic constraint is not strongly conv…

---

## [Plotting a vector field in a grid structure](https://discourse.julialang.org/t/plotting-a-vector-field-in-a-grid-structure/104492)

<div class="topic-metadata">

**Author:** [@Undercover](https://discourse.julialang.org/u/Undercover)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 2:38pm UTC](https://discourse.julialang.org/t/plotting-a-vector-field-in-a-grid-structure/104492 "2023-10-03T14:38:25Z")

</div>

Hello there, I’m solving the Maxwell’s equation numerically in R^3, and I’m trying to create a plot which draws a vector in the point in 3D space. Essentially, I’m trying to make a plot that looks like the following, min…

---

## [Markov Switching Regression](https://discourse.julialang.org/t/markov-switching-regression/23223)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 4\
**Last updated:** [October 3, 2023, 3:16pm UTC](https://discourse.julialang.org/t/markov-switching-regression/23223 "2023-10-03T15:16:10Z")

</div>

Is there anything like GitHub - msperlin/MS\_Regress-Matlab: Repository for MS\_Regress, a matlab package for estimation and simulation of markov regime switching models for Markov “regime switching” written in Julia? I kn…

---

## [MethodOfLines PDESystem with Internal Systems](https://discourse.julialang.org/t/methodoflines-pdesystem-with-internal-systems/104409)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 1:13pm UTC](https://discourse.julialang.org/t/methodoflines-pdesystem-with-internal-systems/104409 "2023-10-03T13:13:52Z")

</div>

The definition for a PDESystem seems to show that internal systems are compatible, (PDESystem · ModelingToolkit.jl) but it looks like discretization of the PDESystem does not look at these systems, causing errors when di…

---

## [Incorporating Auxiliary Calculations as Functions in ModelingToolkit PDE Definitions, Method of Lines](https://discourse.julialang.org/t/incorporating-auxiliary-calculations-as-functions-in-modelingtoolkit-pde-definitions-method-of-lines/104428)

<div class="topic-metadata">

**Author:** [@Can\_Bozdogan](https://discourse.julialang.org/u/Can_Bozdogan)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 1:09pm UTC](https://discourse.julialang.org/t/incorporating-auxiliary-calculations-as-functions-in-modelingtoolkit-pde-definitions-method-of-lines/104428 "2023-10-03T13:09:21Z")

</div>

Hello everyone, I’ve been working on a PDE model using the ModelingToolkit, MethodOfLines, and DifferentialEquations packages, and I’ve run into some challenges that I’m hoping to get guidance on. For confidentiality re…

---

## [Method of Lines Interface index error](https://discourse.julialang.org/t/method-of-lines-interface-index-error/104402)

<div class="topic-metadata">

**Author:** [@Can\_Bozdogan](https://discourse.julialang.org/u/Can_Bozdogan)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 1:01pm UTC](https://discourse.julialang.org/t/method-of-lines-interface-index-error/104402 "2023-10-03T13:01:36Z")

</div>

Hi everyone, I’m new to Julia language, this is my first time asking a question, so please forgive me if there is any mistake in my question format. I have been working on discretizing a PDE system by using MethodOfLin…

---

## [RobustAndOptimalControl.jl Named State Space With Time Delay](https://discourse.julialang.org/t/robustandoptimalcontrol-jl-named-state-space-with-time-delay/104515)

<div class="topic-metadata">

**Author:** [@matthew3245](https://discourse.julialang.org/u/matthew3245)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 11:50am UTC](https://discourse.julialang.org/t/robustandoptimalcontrol-jl-named-state-space-with-time-delay/104515 "2023-10-03T11:50:42Z")

</div>

Is there a way to make a named state space model with a time delay? The following code produces an error: julia\> named\_ss(ss(-1, 1, I, 0)) \* delay(0.1) ERROR: promotion of types NamedStateSpace{Continuous, StateSpace{Co…

---

## [RobustAndOptimalControl.jl Uncertain Time Delays For State Space Models](https://discourse.julialang.org/t/robustandoptimalcontrol-jl-uncertain-time-delays-for-state-space-models/104514)

<div class="topic-metadata">

**Author:** [@matthew3245](https://discourse.julialang.org/u/matthew3245)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 11:50am UTC](https://discourse.julialang.org/t/robustandoptimalcontrol-jl-uncertain-time-delays-for-state-space-models/104514 "2023-10-03T11:50:06Z")

</div>

I can’t get uncertain time delays for state space models to work. For example, the following code: julia\> using LinearAlgebra, ControlSystems, RobustAndOptimalControl, MonteCarloMeasurements julia\> P = ss(-1, 1, I, 0) j…

---

## [Standardize all columns of DataFrame](https://discourse.julialang.org/t/standardize-all-columns-of-dataframe/77772)

<div class="topic-metadata">

**Author:** [@markmbaum](https://discourse.julialang.org/u/markmbaum)\
**Replies:** 9\
**Last updated:** [October 2, 2023, 8:07pm UTC](https://discourse.julialang.org/t/standardize-all-columns-of-dataframe/77772 "2023-10-02T20:07:03Z")

</div>

Surely this is answered somewhere, but what is the easiest way to standardize all columns of a DataFrame? There are a bunch of methods in pandas to do it, or you can just df = (df - df.mean())/df.std() how to do the sa…

---

## [How to tell ModelingToolkit.jl which variables are parameters](https://discourse.julialang.org/t/how-to-tell-modelingtoolkit-jl-which-variables-are-parameters/104501)

<div class="topic-metadata">

**Author:** [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Replies:** 4\
**Last updated:** [October 2, 2023, 4:11pm UTC](https://discourse.julialang.org/t/how-to-tell-modelingtoolkit-jl-which-variables-are-parameters/104501 "2023-10-02T16:11:07Z")

</div>

I have a Symbolics.Equation that I got from an external source. Now I want to use that equation in ModelingToolkit.jl, but I don’t know how to tell ModelingToolkit.jl which variables are parameters. For example, here I …

---

## [Is it posible to make a 2D slider in Makie?](https://discourse.julialang.org/t/is-it-posible-to-make-a-2d-slider-in-makie/104349)

<div class="topic-metadata">

**Author:** [@Knud\_Sorensen](https://discourse.julialang.org/u/Knud_Sorensen)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 2:50pm UTC](https://discourse.julialang.org/t/is-it-posible-to-make-a-2d-slider-in-makie/104349 "2023-10-02T14:50:02Z")

</div>

Is it possible to make a 2D slider ?? In the following code I would like to have a circle in a rectangle that I can drag around instead of 2 different sliders. How would you do that ? using GLMakie fig = Figure() sl\_…

---

## [Nonlinear expressions may contain only scalar expressions](https://discourse.julialang.org/t/nonlinear-expressions-may-contain-only-scalar-expressions/45147)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 3\
**Last updated:** [October 2, 2023, 2:27pm UTC](https://discourse.julialang.org/t/nonlinear-expressions-may-contain-only-scalar-expressions/45147 "2023-10-02T14:27:51Z")

</div>

using JuMP,Gurobi n=4 PL=\[0.3;0.55;0;0\] model=Model(Gurobi.Optimizer) G=\[1.04209 -0.588235 -0.0 -0.453858;-0.588235 1.069 0 -0.480769;-0 0 0 0;-0.453858 -0.480769 0 0.934627\] Q=\[-8.24288 2.35294 3.66667 1.89107; …

---

## [CairoMakie invert\_normals = true not working](https://discourse.julialang.org/t/cairomakie-invert-normals-true-not-working/104496)

<div class="topic-metadata">

**Author:** [@p\_f](https://discourse.julialang.org/u/p_f)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 12:50pm UTC](https://discourse.julialang.org/t/cairomakie-invert-normals-true-not-working/104496 "2023-10-02T12:50:46Z")

</div>

When plotting surfaces using CairoMakie they appear dull because invert\_normals = true doesn’t seem to work. MWE: code that plots an open sphere using GLMakie and CairoMakie, with invert\_normals=true/false, and saves a …

---

## [\`Plots\` or otherwise?](https://discourse.julialang.org/t/plots-or-otherwise/104162)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 29\
**Last updated:** [October 2, 2023, 6:41am UTC](https://discourse.julialang.org/t/plots-or-otherwise/104162 "2023-10-02T06:41:17Z")

</div>

After 1.5 years of Julia experience, I now write almost everything in Julia. I used to use Bourne shell, Ruby, Fortran, and a bit of Haskell, but I don’t need these any longer. Except I don’t know which plotting package …

---

## [Matlab bwpropfilt alternative in Images.jl](https://discourse.julialang.org/t/matlab-bwpropfilt-alternative-in-images-jl/104487)

<div class="topic-metadata">

**Author:** [@Rakesh](https://discourse.julialang.org/u/Rakesh)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 4:27am UTC](https://discourse.julialang.org/t/matlab-bwpropfilt-alternative-in-images-jl/104487 "2023-10-02T04:27:00Z")

</div>

Is there any alternative to Matlab bwpropfilt in Images.jl ecosystem. Thanks.

---

## [ControlSystems.jl Uncertain Model Parameters and Time Delays](https://discourse.julialang.org/t/controlsystems-jl-uncertain-model-parameters-and-time-delays/104373)

<div class="topic-metadata">

**Author:** [@matthew3245](https://discourse.julialang.org/u/matthew3245)\
**Replies:** 9\
**Last updated:** [October 2, 2023, 12:29am UTC](https://discourse.julialang.org/t/controlsystems-jl-uncertain-model-parameters-and-time-delays/104373 "2023-10-02T00:29:27Z")

</div>

I am using ControlSystems.jl with MonteCarloMeasurements.jl to analyse the step response of models with uncertain parameters and time delays. However, plotting the step response of a model with uncertain parameters vs. a…

---

## [Solving PDEs over distributions](https://discourse.julialang.org/t/solving-pdes-over-distributions/104480)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 1\
**Last updated:** [October 1, 2023, 11:49pm UTC](https://discourse.julialang.org/t/solving-pdes-over-distributions/104480 "2023-10-01T23:49:18Z")

</div>

Suppose I have an arbitrary PDE solver I’ve built. This solver solves simple linear problems that look like Ax=b. Now suppose I specify a distribution of source terms (the b vector). This could be a straightforward prob…

---

## [How do I make my custom (potentially stupid) model in Julia?](https://discourse.julialang.org/t/how-do-i-make-my-custom-potentially-stupid-model-in-julia/104464)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 1\
**Last updated:** [October 1, 2023, 2:29pm UTC](https://discourse.julialang.org/t/how-do-i-make-my-custom-potentially-stupid-model-in-julia/104464 "2023-10-01T14:29:43Z")

</div>

Julia is said to be an expressive ML language where you do the obvious thing, putting in math expression and it works. But… how does it work exactly? To try it out, I want to implement my own (potentially stupid) idea fo…

---

## [Tool for composable circuit simulation?](https://discourse.julialang.org/t/tool-for-composable-circuit-simulation/103449)

<div class="topic-metadata">

**Author:** [@hacklint](https://discourse.julialang.org/u/hacklint)\
**Replies:** 28\
**Last updated:** [September 30, 2023, 4:10pm UTC](https://discourse.julialang.org/t/tool-for-composable-circuit-simulation/103449 "2023-09-30T16:10:14Z")

</div>

I’m looking for a (free) tool to do some rather basic electrical circuit simulations describing a unit with a couple of current sources, a couple of resistors, switches and some external connections. Having that I would …

---

## [DtLessThanMin while err estimate = 1.65e-10](https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120)

<div class="topic-metadata">

**Author:** [@cuihantao](https://discourse.julialang.org/u/cuihantao)\
**Replies:** 2\
**Last updated:** [September 30, 2023, 1:35am UTC](https://discourse.julialang.org/t/dtlessthanmin-while-err-estimate-1-65e-10/104120 "2023-09-30T01:35:15Z")

</div>

I was troubleshooting a mass-matrix ODE model for nonconvergence due to DtLessThanMin. It turns out that, with a set of properly initialized nonlinear algebraic equations (i.e., the mass matrix is all zero), OrdinaryDif…

---

## [Problems with implementing a basic DeepAR algorithm in Julia](https://discourse.julialang.org/t/problems-with-implementing-a-basic-deepar-algorithm-in-julia/104405)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 2\
**Last updated:** [September 29, 2023, 9:34pm UTC](https://discourse.julialang.org/t/problems-with-implementing-a-basic-deepar-algorithm-in-julia/104405 "2023-09-29T21:34:59Z")

</div>

I am trying to implement a basic DeepAR that serves as a baseline to compare with other time series forecasting algorithms. However, when testing the following code, it seems that the code does not learn well an example …

---

## [How to set std value as objective?](https://discourse.julialang.org/t/how-to-set-std-value-as-objective/104304)

<div class="topic-metadata">

**Author:** [@jack\_lee](https://discourse.julialang.org/u/jack_lee)\
**Replies:** 7\
**Last updated:** [September 29, 2023, 7:56pm UTC](https://discourse.julialang.org/t/how-to-set-std-value-as-objective/104304 "2023-09-29T19:56:21Z")

</div>

function solution() model = Model(Gurobi.Optimizer);set\_silent(model) @variable(model,x\[1:3000,1:125\],Bin) @constraint(model,\[i=1:3000\],sum(x\[i,:\]) == 5) @constraint(model,\[i=1:125\],sum(x\[:,i\]) == 120) …

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

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