# Specific Domains

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

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

**Page:** 392

---

## [Turing model not optimising; unstable ODE solutions](https://discourse.julialang.org/t/turing-model-not-optimising-unstable-ode-solutions/54526)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 1:16pm UTC](https://discourse.julialang.org/t/turing-model-not-optimising-unstable-ode-solutions/54526 "2021-02-03T13:16:47Z")

</div>

Hi, I am getting an integration error with my Turing model. I have searched around but haven’t seen anything similar on discourse. The ODE model is set up as follows: using DifferentialEquations, LightGraphs, Random, …

---

## [Inconsistance between @NLobjective and @objective](https://discourse.julialang.org/t/inconsistance-between-nlobjective-and-objective/54520)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 9:39am UTC](https://discourse.julialang.org/t/inconsistance-between-nlobjective-and-objective/54520 "2021-02-03T09:39:21Z")

</div>

Let’s consider the following model: model = Model(with\_optimizer(Ipopt.Optimizer)) @variable(model, x \>= 0) @variable(model, y \>= 1) Then the macro @objective can be used both as: @objective(model, Min, x+2\*y) or @o…

---

## [Plotting a decision tree and extracting the split criteria](https://discourse.julialang.org/t/plotting-a-decision-tree-and-extracting-the-split-criteria/54503)

<div class="topic-metadata">

**Author:** [@dataopt](https://discourse.julialang.org/u/dataopt)\
**Replies:** 0\
**Last updated:** [February 3, 2021, 12:46am UTC](https://discourse.julialang.org/t/plotting-a-decision-tree-and-extracting-the-split-criteria/54503 "2021-02-03T00:46:35Z")

</div>

I am new to MLJ coming from R for statistical learning. I have two newbie questions: Is there a way to plot a decision tree? Is there a way to extract the structure of the tree with the split criteria?

---

## [Precompile errors Makie (AbstractPlotting)](https://discourse.julialang.org/t/precompile-errors-makie-abstractplotting/53810)

<div class="topic-metadata">

**Author:** [@fyzycyst](https://discourse.julialang.org/u/fyzycyst)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 5:48pm UTC](https://discourse.julialang.org/t/precompile-errors-makie-abstractplotting/53810 "2021-02-02T17:48:42Z")

</div>

Attempted to try out Makie, but the precompile fails. I’m including a sample for the AbstractPlotting precompile, but it’s the same for CairoMakie, etc. I know similar problems are reported from time to time, but none of…

---

## [How to print human readable byte counts](https://discourse.julialang.org/t/how-to-print-human-readable-byte-counts/31877)

<div class="topic-metadata">

**Author:** [@mleisher](https://discourse.julialang.org/u/mleisher)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 5:19pm UTC](https://discourse.julialang.org/t/how-to-print-human-readable-byte-counts/31877 "2021-02-02T17:19:37Z")

</div>

I came across Java: Formatting byte size to human readable format | Programming.Guide this morning, and having a few minutes, adapted the Java code to Julia: https://www.cs.nmsu.edu/~mleisher/julia/hrbc.jl Being relati…

---

## [Julia SVD results differing from MATLAB](https://discourse.julialang.org/t/julia-svd-results-differing-from-matlab/54151)

<div class="topic-metadata">

**Author:** [@djov5](https://discourse.julialang.org/u/djov5)\
**Replies:** 5\
**Last updated:** [February 2, 2021, 4:34pm UTC](https://discourse.julialang.org/t/julia-svd-results-differing-from-matlab/54151 "2021-02-02T16:34:11Z")

</div>

I’ve been scratching my head about this for some time now and thought of asking to see if anyone has a fix for this. I am converting a code from MATLAB into Julia and it requires the use of svd and eig multiple times. I …

---

## [Repeatedly calculating a hessian using both ForwardDiff and ReverseDiff](https://discourse.julialang.org/t/repeatedly-calculating-a-hessian-using-both-forwarddiff-and-reversediff/54051)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 1:28pm UTC](https://discourse.julialang.org/t/repeatedly-calculating-a-hessian-using-both-forwarddiff-and-reversediff/54051 "2021-02-02T13:28:52Z")

</div>

I would like to calculate a Hessian matrix of a function f:\\mathbb{R}^n \\rightarrow \\mathbb{R} where n\\gg1. In my usecase the Jacobian of f is always needed, and the Hessian may or may not be needed (but this is known be…

---

## [Best JuMP modelling technique!](https://discourse.julialang.org/t/best-jump-modelling-technique/54183)

<div class="topic-metadata">

**Author:** [@musman](https://discourse.julialang.org/u/musman)\
**Replies:** 9\
**Last updated:** [February 2, 2021, 12:32pm UTC](https://discourse.julialang.org/t/best-jump-modelling-technique/54183 "2021-02-02T12:32:04Z")

</div>

Hi all, I came across two ways of defining a same constraint in JuMP. I want to know if both ways, from the point of view of the time taken by the JuMP to model the constraint, are equivalent OR does one method leads to…

---

## [DDE parameter estimation with unknown constant delay using DiffEqFlux](https://discourse.julialang.org/t/dde-parameter-estimation-with-unknown-constant-delay-using-diffeqflux/54381)

<div class="topic-metadata">

**Author:** [@zamk](https://discourse.julialang.org/u/zamk)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 12:29pm UTC](https://discourse.julialang.org/t/dde-parameter-estimation-with-unknown-constant-delay-using-diffeqflux/54381 "2021-02-02T12:29:14Z")

</div>

I am trying to estimate the parameters for a delay differential equation. One of the parameters that I try to estimate is the (constant) delay itself. Following the tutorial documentation, I wrote the following code: pr…

---

## [Condition constraint symbol on problem data](https://discourse.julialang.org/t/condition-constraint-symbol-on-problem-data/54431)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 1\
**Last updated:** [February 2, 2021, 8:12am UTC](https://discourse.julialang.org/t/condition-constraint-symbol-on-problem-data/54431 "2021-02-02T08:12:13Z")

</div>

Here is a linear program I am trying to solve: using JuMP import GLPK function LP\_example(A::Array{Int64, 2}, B::Array{Int64, 2}, c::Array{Int64, 1}) n, m = size(B) model = Model(GLPK.Optimi…

---

## [Julia code for 1-D discrete system](https://discourse.julialang.org/t/julia-code-for-1-d-discrete-system/54403)

<div class="topic-metadata">

**Author:** [@mukherji](https://discourse.julialang.org/u/mukherji)\
**Replies:** 4\
**Last updated:** [February 2, 2021, 3:36am UTC](https://discourse.julialang.org/t/julia-code-for-1-d-discrete-system/54403 "2021-02-02T03:36:24Z")

</div>

I have a relatively straightforward one-dimensional discrete system that is a variation of the logistic equation. I cannot figure out how to create my own function in Julia. For example, how do I model x(t+1) = p\[1\]+p\[2…

---

## [Format LightGraph / GraphPlot](https://discourse.julialang.org/t/format-lightgraph-graphplot/54373)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 0\
**Last updated:** [February 1, 2021, 1:35pm UTC](https://discourse.julialang.org/t/format-lightgraph-graphplot/54373 "2021-02-01T13:35:45Z")

</div>

Hi! I am experimenting with LightGraph and GraphPlot packages. Below code is a MWE which is working. So my issue is not that my below code has a bug. However, two things I cannot manage: How can I ensure that the n…

---

## [Help with exporting data to .CSV](https://discourse.julialang.org/t/help-with-exporting-data-to-csv/54410)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 1\
**Last updated:** [February 1, 2021, 7:36pm UTC](https://discourse.julialang.org/t/help-with-exporting-data-to-csv/54410 "2021-02-01T19:36:44Z")

</div>

Hello everybody! I am trying to export only the numeric data of the result of the variable r to a .CSV. The model does not give an error, but I cannot export the data as I need it. I would like the data to be written …

---

## [VFI algorithm (Econ) on the GPU tutorial](https://discourse.julialang.org/t/vfi-algorithm-econ-on-the-gpu-tutorial/21680)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 5\
**Last updated:** [February 1, 2021, 4:18pm UTC](https://discourse.julialang.org/t/vfi-algorithm-econ-on-the-gpu-tutorial/21680 "2021-02-01T16:18:58Z")

</div>

I wrote a simple extension of the CuArrays.jl tutorial section on how to iterate a value function on the gpu. https://floswald.github.io/html/vfi.html

---

## [Likelihood Ratio Test?](https://discourse.julialang.org/t/likelihood-ratio-test/38217)

<div class="topic-metadata">

**Author:** [@bjoerges](https://discourse.julialang.org/u/bjoerges)\
**Replies:** 10\
**Last updated:** [February 1, 2021, 3:23pm UTC](https://discourse.julialang.org/t/likelihood-ratio-test/38217 "2021-02-01T15:23:57Z")

</div>

Hey everyone, I am looking for a way to do Likelihood Ratio Tests in Julia. I have found a function in MixedModels.jl (which is also what I am using to fit my models), but it doesn’t seem to work for Generalized Linear …

---

## [ReverseDiff.jl gives zeros when using fill](https://discourse.julialang.org/t/reversediff-jl-gives-zeros-when-using-fill/54369)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 1\
**Last updated:** [February 1, 2021, 11:53am UTC](https://discourse.julialang.org/t/reversediff-jl-gives-zeros-when-using-fill/54369 "2021-02-01T11:53:15Z")

</div>

Hey, the following MWE: function g(x) out = fill(0.0, size(x)) for i = 1:size(x)\[1\] out\[i, :\] .= x\[i, :\] end return out end ReverseDiff.gradient(x -\> sum(g(x)), randn((5, 5))) which returns 5×…

---

## [How to subset dataframe by multiple rows with same value?](https://discourse.julialang.org/t/how-to-subset-dataframe-by-multiple-rows-with-same-value/54294)

<div class="topic-metadata">

**Author:** [@Shazman](https://discourse.julialang.org/u/Shazman)\
**Replies:** 6\
**Last updated:** [February 1, 2021, 11:48am UTC](https://discourse.julialang.org/t/how-to-subset-dataframe-by-multiple-rows-with-same-value/54294 "2021-02-01T11:48:01Z")

</div>

Hi I want to subset a dataframe(df) by multiple rows with value (10004). I tried the command, but it does not work, I am wondering why ? df\[in(\[10004\]).(df.HWG), :\] 28,960 rows × 11 columns (omitted printing of 2 co…

---

## [Matrix multiplication with CPU and CUDA](https://discourse.julialang.org/t/matrix-multiplication-with-cpu-and-cuda/54364)

<div class="topic-metadata">

**Author:** [@ymtoo](https://discourse.julialang.org/u/ymtoo)\
**Replies:** 2\
**Last updated:** [February 1, 2021, 9:04am UTC](https://discourse.julialang.org/t/matrix-multiplication-with-cpu-and-cuda/54364 "2021-02-01T09:04:23Z")

</div>

Matrix multiplication yields slightly different results with CPU and CUDA. Is this a normal behaviour? julia\> using CUDA julia\> X = randn(Float32, 8, 16) 8×16 Array{Float32,2}: 0.933839 0.535854 0.054124 … -0.…

---

## [3d graph error](https://discourse.julialang.org/t/3d-graph-error/54224)

<div class="topic-metadata">

**Author:** [@Evan](https://discourse.julialang.org/u/Evan)\
**Replies:** 7\
**Last updated:** [February 1, 2021, 8:38am UTC](https://discourse.julialang.org/t/3d-graph-error/54224 "2021-02-01T08:38:31Z")

</div>

I’m getting an error from simple 3d plots, example of plot and error is below. What am i doing wrong? using Plots; pyplot() x=range(-2,stop=2,length=100) y=range(sqrt(2),stop=2,length=100) f(x,y) = x\*y-x-y+1 plot(x,…

---

## [ERROR: LoadError: UndefVarError: getValue not defined](https://discourse.julialang.org/t/error-loaderror-undefvarerror-getvalue-not-defined/54350)

<div class="topic-metadata">

**Author:** [@Prottay\_Adhikari](https://discourse.julialang.org/u/Prottay_Adhikari)\
**Replies:** 9\
**Last updated:** [February 1, 2021, 1:52am UTC](https://discourse.julialang.org/t/error-loaderror-undefvarerror-getvalue-not-defined/54350 "2021-02-01T01:52:52Z")

</div>

I was trying to run the power system example to execute the economic load dispatch operation. The original code was reported here. However when I try to run this code (with the modifications to make the code compliant …

---

## [Problem with setting start value for PATH solver(PATH.jl) when solving a complementarity problem](https://discourse.julialang.org/t/problem-with-setting-start-value-for-path-solver-path-jl-when-solving-a-complementarity-problem/53918)

<div class="topic-metadata">

**Author:** [@jshengdb](https://discourse.julialang.org/u/jshengdb)\
**Replies:** 6\
**Last updated:** [January 31, 2021, 9:12pm UTC](https://discourse.julialang.org/t/problem-with-setting-start-value-for-path-solver-path-jl-when-solving-a-complementarity-problem/53918 "2021-01-31T21:12:23Z")

</div>

Hello, I am now having a problem with setting initial value for PATH solver(PATH.jl). I am trying to solve a linear complementarity problem with a chosen initial point. The problem is following: A = Dict( (1,1) =\> …

---

## [Can I modify Flux parameters manually?](https://discourse.julialang.org/t/can-i-modify-flux-parameters-manually/54344)

<div class="topic-metadata">

**Author:** [@DevJac](https://discourse.julialang.org/u/DevJac)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 8:45pm UTC](https://discourse.julialang.org/t/can-i-modify-flux-parameters-manually/54344 "2021-01-31T20:45:38Z")

</div>

I want to be able to manually modify my Flux parameters, but when I have a Zygote.Params object, I can’t seem to change anything about it. I am trying to average the parameters of two networks that are the same shape (Po…

---

## [Computing Flux.gradient change the model](https://discourse.julialang.org/t/computing-flux-gradient-change-the-model/54284)

<div class="topic-metadata">

**Author:** [@anon74562486](https://discourse.julialang.org/u/anon74562486)\
**Replies:** 10\
**Last updated:** [January 31, 2021, 7:54pm UTC](https://discourse.julialang.org/t/computing-flux-gradient-change-the-model/54284 "2021-01-31T19:54:09Z")

</div>

I don’t speak English well, so sorry for the mistakes. I have an exercise of differential programming. I have an image taken from MNIST and a fully connected NN that classifies correctly that image. Then I want to mod…

---

## [4D plotting](https://discourse.julialang.org/t/4d-plotting/54138)

<div class="topic-metadata">

**Author:** [@Ruchitha\_Kumar](https://discourse.julialang.org/u/Ruchitha_Kumar)\
**Replies:** 8\
**Last updated:** [January 31, 2021, 7:03pm UTC](https://discourse.julialang.org/t/4d-plotting/54138 "2021-01-31T19:03:12Z")

</div>

How to plot a 4D graph in julia? Can someone please help with this? Thanks in advance

---

## [Native Qp solver?](https://discourse.julialang.org/t/native-qp-solver/54304)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 4:48pm UTC](https://discourse.julialang.org/t/native-qp-solver/54304 "2021-01-31T16:48:10Z")

</div>

Hey, I’m used to OSQP for QP solving in Float64, which had a lot of wrappers for all languages. However, Julia has a deep understanding of what Is a real number, and I’d like to solve QP for any real number, including …

---

## [L-BFGS returns a NaN gradient when providing analytical gradient. BFGS shows no issues](https://discourse.julialang.org/t/l-bfgs-returns-a-nan-gradient-when-providing-analytical-gradient-bfgs-shows-no-issues/54196)

<div class="topic-metadata">

**Author:** [@juandarias](https://discourse.julialang.org/u/juandarias)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 1:16pm UTC](https://discourse.julialang.org/t/l-bfgs-returns-a-nan-gradient-when-providing-analytical-gradient-bfgs-shows-no-issues/54196 "2021-01-31T13:16:23Z")

</div>

Observations When providing an analytical gradient for optimization using LBFGS with boxed constraints, the optimizer fails occasionally due to gradient becoming NaN, i.e. g(x) = \[Nan, ..., Nan\]. The analytical gradien…

---

## [Changing color/colorbar limits in a heat map in Plots.jl](https://discourse.julialang.org/t/changing-color-colorbar-limits-in-a-heat-map-in-plots-jl/54277)

<div class="topic-metadata">

**Author:** [@Peter\_Staab](https://discourse.julialang.org/u/Peter_Staab)\
**Replies:** 3\
**Last updated:** [January 31, 2021, 12:54pm UTC](https://discourse.julialang.org/t/changing-color-colorbar-limits-in-a-heat-map-in-plots-jl/54277 "2021-01-31T12:54:37Z")

</div>

I’m looking to change the range of colors on a heat map. For example: hm1 = heatmap(rand(20,20),aspect\_ratio=:equal) hm2 = heatmap(0.9\*rand(20,20),aspect\_ratio=:equal) plot(hm1,hm2) resulting in: defaults to 0-\>1 …

---

## [Changing the background color of a 3D Scene in Makie](https://discourse.julialang.org/t/changing-the-background-color-of-a-3d-scene-in-makie/53490)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 8\
**Last updated:** [January 31, 2021, 10:34am UTC](https://discourse.julialang.org/t/changing-the-background-color-of-a-3d-scene-in-makie/53490 "2021-01-31T10:34:13Z")

</div>

How can I make the background color of a (3D) scene contained within an LScene ? Including backgroundcolor=:black in the scenekw arg doesn’t seem to do it, nor does setting the attribute directly on lscene.scene . Howeve…

---

## [Makie recipe usage](https://discourse.julialang.org/t/makie-recipe-usage/54292)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 2\
**Last updated:** [January 31, 2021, 9:06am UTC](https://discourse.julialang.org/t/makie-recipe-usage/54292 "2021-01-31T09:06:17Z")

</div>

I read about a post makie-recipe-specialisation-for-specific-types for plotting customized types from Makie. The official document also has a Plot-Recipes section, but I still do not understand how to use it. Additionall…

---

## [How to send a simple "GET" or "POST" with parameters](https://discourse.julialang.org/t/how-to-send-a-simple-get-or-post-with-parameters/54125)

<div class="topic-metadata">

**Author:** [@nuclear718](https://discourse.julialang.org/u/nuclear718)\
**Replies:** 2\
**Last updated:** [January 31, 2021, 2:41am UTC](https://discourse.julialang.org/t/how-to-send-a-simple-get-or-post-with-parameters/54125 "2021-01-31T02:41:14Z")

</div>

The data provider has an example in python: url = "xxx" parameter = { "dataset": "TaiwanStockInfo", "token": "", # 參考登入，獲取金鑰 } resp = requests.get(url, params=parameter) How to translate these simple python cod…

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

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