# Specific Domains

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

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

**Page:** 380

---

## [Burn-in in Metropolis-Hastings](https://discourse.julialang.org/t/burn-in-in-metropolis-hastings/57769)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 9\
**Last updated:** [March 25, 2021, 6:38am UTC](https://discourse.julialang.org/t/burn-in-in-metropolis-hastings/57769 "2021-03-25T06:38:33Z")

</div>

i have written a metropolis-hastings code for myself but it doesn’t quite give me the smoothest result that i want so i want to put the burn-in in it, maybe finding a good starting point will increase the efficiency, the…

---

## [Mutate Zygote Gradients with a Custom Mask Before Update?](https://discourse.julialang.org/t/mutate-zygote-gradients-with-a-custom-mask-before-update/57236)

<div class="topic-metadata">

**Author:** [@boltzmannbrain](https://discourse.julialang.org/u/boltzmannbrain)\
**Replies:** 1\
**Last updated:** [March 25, 2021, 5:07am UTC](https://discourse.julialang.org/t/mutate-zygote-gradients-with-a-custom-mask-before-update/57236 "2021-03-25T05:07:50Z")

</div>

I’m new to Flux/Zygote and I’m trying to train a model with dense layers such that the associated weight matrices are lower triangular. It seems like the way to do this is to write a custom train! function and zero the g…

---

## [ComponentArrays.jl with NLopt.jl](https://discourse.julialang.org/t/componentarrays-jl-with-nlopt-jl/57482)

<div class="topic-metadata">

**Author:** [@avonmoll](https://discourse.julialang.org/u/avonmoll)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 2:08pm UTC](https://discourse.julialang.org/t/componentarrays-jl-with-nlopt-jl/57482 "2021-03-24T14:08:38Z")

</div>

These two packages seem to be incompatible. Without fully understanding the internals of NLopt.jl it seems that the vector of optimization variables ends up getting cast as an Array{Float64,1}. This basic snippet works: …

---

## [ModelingToolkit's structural\_simplify fails on LI-cutset simplification](https://discourse.julialang.org/t/modelingtoolkits-structural-simplify-fails-on-li-cutset-simplification/57852)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 8:42pm UTC](https://discourse.julialang.org/t/modelingtoolkits-structural-simplify-fails-on-li-cutset-simplification/57852 "2021-03-24T20:42:42Z")

</div>

I modified the example on acausal component modelling from ModelingToolkit and I get internal tearing error. In my modification I have a series connected V+R+L+L circuit. The series connection of inductors/current sourc…

---

## [Custom likelihood function optimization](https://discourse.julialang.org/t/custom-likelihood-function-optimization/57849)

<div class="topic-metadata">

**Author:** [@ocolluphid](https://discourse.julialang.org/u/ocolluphid)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 7:46pm UTC](https://discourse.julialang.org/t/custom-likelihood-function-optimization/57849 "2021-03-24T19:46:36Z")

</div>

Hi, I’m having trouble with this likelihood maximization problem. My likelihood function “works” when I call it with some random parameters (i.e. it outputs a likelihood value) but when I pass it through the Optim.jl pa…

---

## [New to Julia, using it for dynamic systems simulations](https://discourse.julialang.org/t/new-to-julia-using-it-for-dynamic-systems-simulations/55285)

<div class="topic-metadata">

**Author:** [@Babou](https://discourse.julialang.org/u/Babou)\
**Replies:** 14\
**Last updated:** [March 24, 2021, 5:09pm UTC](https://discourse.julialang.org/t/new-to-julia-using-it-for-dynamic-systems-simulations/55285 "2021-03-24T17:09:02Z")

</div>

Hi all, I am a new Julia user. I am going to be using it to run some toy simulations of biologically realistic neural networks. If you aren’t familiar with this topic have a peak here.I saw DifferentialEquations.jl an…

---

## [Plotting multiple figures using Plots.jl](https://discourse.julialang.org/t/plotting-multiple-figures-using-plots-jl/57859)

<div class="topic-metadata">

**Author:** [@Marca85](https://discourse.julialang.org/u/Marca85)\
**Replies:** 6\
**Last updated:** [March 24, 2021, 1:39pm UTC](https://discourse.julialang.org/t/plotting-multiple-figures-using-plots-jl/57859 "2021-03-24T13:39:46Z")

</div>

Hi, I would like to run a script in Visual Studio Code that plot different graphs in multiple figures (multiple windows, not multiple subplots). using Plots x = 1:10 plot(x,x, label="linear") plot(x,x.^2, label="quadr…

---

## [Integration over regions with varying boundaries, triangular domains and more](https://discourse.julialang.org/t/integration-over-regions-with-varying-boundaries-triangular-domains-and-more/57157)

<div class="topic-metadata">

**Author:** [@Aleksandr\_Mikheev](https://discourse.julialang.org/u/Aleksandr_Mikheev)\
**Replies:** 10\
**Last updated:** [March 24, 2021, 5:08am UTC](https://discourse.julialang.org/t/integration-over-regions-with-varying-boundaries-triangular-domains-and-more/57157 "2021-03-24T05:08:06Z")

</div>

This topic may be considered, in some sense, as a follow-up of my previous thread. Thanks to stevengj and ChrisRackauckas I believe I more or less solved the “symbolic part” of my problem and could start working on the a…

---

## [How to use \`ordered\` keyword equals to \`true\` with \`StatsBase.sample()\` function when sampling 2 or more dimensional array from a population?](https://discourse.julialang.org/t/how-to-use-ordered-keyword-equals-to-true-with-statsbase-sample-function-when-sampling-2-or-more-dimensional-array-from-a-population/57796)

<div class="topic-metadata">

**Author:** [@shubh\_b](https://discourse.julialang.org/u/shubh_b)\
**Replies:** 8\
**Last updated:** [March 24, 2021, 4:05am UTC](https://discourse.julialang.org/t/how-to-use-ordered-keyword-equals-to-true-with-statsbase-sample-function-when-sampling-2-or-more-dimensional-array-from-a-population/57796 "2021-03-24T04:05:01Z")

</div>

I was using sample() function from StatsBase module for sampling with replacement from a population a and sampling probabilities weight vector wv as below: a = \[31, 12, 29, 9, 15\] wv = weights(\[0.1, 0.4, 0.2, 0.1, 0.2\])…

---

## [Using EnsembleThreads in DifferentialEquations.jl fails for SDEs with trajectories \> nthreads](https://discourse.julialang.org/t/using-ensemblethreads-in-differentialequations-jl-fails-for-sdes-with-trajectories-nthreads/57831)

<div class="topic-metadata">

**Author:** [@Junkiejim](https://discourse.julialang.org/u/Junkiejim)\
**Replies:** 3\
**Last updated:** [March 24, 2021, 3:19am UTC](https://discourse.julialang.org/t/using-ensemblethreads-in-differentialequations-jl-fails-for-sdes-with-trajectories-nthreads/57831 "2021-03-24T03:19:33Z")

</div>

I’m trying to run some stochastic simulations for a research problem using DifferentialEquations.jl. I’ve had no problem setting up my differential equation, and solving it is fine until I try to setup an ensembleproblem…

---

## [Error when assigning a difference to a vector](https://discourse.julialang.org/t/error-when-assigning-a-difference-to-a-vector/57748)

<div class="topic-metadata">

**Author:** [@umair\_durrani](https://discourse.julialang.org/u/umair_durrani)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 1:57am UTC](https://discourse.julialang.org/t/error-when-assigning-a-difference-to-a-vector/57748 "2021-03-24T01:57:45Z")

</div>

I have posted this question on stackoverflow as well. I am using the following code to apply a function to my data. The function definition is also provided below. However, I am getting a type error. Could you please he…

---

## [How to use gradient of neural network as the loss function?](https://discourse.julialang.org/t/how-to-use-gradient-of-neural-network-as-the-loss-function/50569)

<div class="topic-metadata">

**Author:** [@XiaodongMa-MRI](https://discourse.julialang.org/u/XiaodongMa-MRI)\
**Replies:** 13\
**Last updated:** [March 23, 2021, 6:30pm UTC](https://discourse.julialang.org/t/how-to-use-gradient-of-neural-network-as-the-loss-function/50569 "2021-03-23T18:30:15Z")

</div>

Dear all, I want to put the gradient of neural network (i.e., the gradient of NN output w.r.t input) in the loss function. However, it seems that Zygote cannot differentiate that. Here is my code: using Flux using Zygo…

---

## [JuMP/CPLEX: problems with submitting heuristic solution](https://discourse.julialang.org/t/jump-cplex-problems-with-submitting-heuristic-solution/57807)

<div class="topic-metadata">

**Author:** [@Ryao](https://discourse.julialang.org/u/Ryao)\
**Replies:** 1\
**Last updated:** [March 23, 2021, 6:27pm UTC](https://discourse.julialang.org/t/jump-cplex-problems-with-submitting-heuristic-solution/57807 "2021-03-23T18:27:45Z")

</div>

Hi everyone, I try to submit a solution extracted from a second model to the main model while encountering such error, any idea? Is there a way to get the CPLEX.Optimizer object from a Model object? Regards, Ryao ER…

---

## [Rotate text such that it aligns with the gradient of a line](https://discourse.julialang.org/t/rotate-text-such-that-it-aligns-with-the-gradient-of-a-line/57799)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 4\
**Last updated:** [March 23, 2021, 6:12pm UTC](https://discourse.julialang.org/t/rotate-text-such-that-it-aligns-with-the-gradient-of-a-line/57799 "2021-03-23T18:12:54Z")

</div>

Hello, I’m trying to make some text line up with a line from A to B, the problem is that the angle is fixed and not relative to the aspect ratio of the figure. I suppose a way to do it is to get the size of the figure a…

---

## [MakieLayout - Alignment of horizontal colorbar and legend](https://discourse.julialang.org/t/makielayout-alignment-of-horizontal-colorbar-and-legend/57804)

<div class="topic-metadata">

**Author:** [@fabgrei](https://discourse.julialang.org/u/fabgrei)\
**Replies:** 2\
**Last updated:** [March 23, 2021, 5:54pm UTC](https://discourse.julialang.org/t/makielayout-alignment-of-horizontal-colorbar-and-legend/57804 "2021-03-23T17:54:56Z")

</div>

I would like to have the colorbar and the legend nicely aligned. Is there a way to perfectly align the top row of the legend with tick labels of the colorbar, and also the titles of legend and colorbar? This is how it l…

---

## [Plots stroke and fill different alpha](https://discourse.julialang.org/t/plots-stroke-and-fill-different-alpha/57794)

<div class="topic-metadata">

**Author:** [@luboshanus](https://discourse.julialang.org/u/luboshanus)\
**Replies:** 0\
**Last updated:** [March 23, 2021, 3:34pm UTC](https://discourse.julialang.org/t/plots-stroke-and-fill-different-alpha/57794 "2021-03-23T15:34:35Z")

</div>

Hi, I would like to have different alphas for fill and stroke of markers. Using Plots.jl and gr(). Wishing this would work scatter(rand(10), marker=(20, 0.3, :green, Plots.stroke(5, :blue, :solid; alpha=0.9))) but th…

---

## [Differentialequations.jl: SDE ensemble solve fails for vector SDEs?](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631)

<div class="topic-metadata">

**Author:** [@colm-connaughton](https://discourse.julialang.org/u/colm-connaughton)\
**Replies:** 2\
**Last updated:** [March 23, 2021, 2:52pm UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-ensemble-solve-fails-for-vector-sdes/57631 "2021-03-23T14:52:35Z")

</div>

I’ve been using the examples in the documentation to play around with the SDE solvers in DifferentialEquations.jl and have run into trouble trying to run ensemble simulations with vector-valued SDEs (the scalar case work…

---

## [Quasi-newton nonlinear solver for sparse jacobian](https://discourse.julialang.org/t/quasi-newton-nonlinear-solver-for-sparse-jacobian/57672)

<div class="topic-metadata">

**Author:** [@RangeFu](https://discourse.julialang.org/u/RangeFu)\
**Replies:** 20\
**Last updated:** [March 23, 2021, 12:40pm UTC](https://discourse.julialang.org/t/quasi-newton-nonlinear-solver-for-sparse-jacobian/57672 "2021-03-23T12:40:14Z")

</div>

Hi community, I was wondering if there is a sparse-optimized quasi-newton solver in the Julia ecosystem. This question was motivated by the undocumented broyden solver in NLsolve.jl. This solver requires the inverse of …

---

## [Array of structures vs. Structures of arrays](https://discourse.julialang.org/t/array-of-structures-vs-structures-of-arrays/56936)

<div class="topic-metadata">

**Author:** [@shiroghost](https://discourse.julialang.org/u/shiroghost)\
**Replies:** 10\
**Last updated:** [March 23, 2021, 12:38pm UTC](https://discourse.julialang.org/t/array-of-structures-vs-structures-of-arrays/56936 "2021-03-23T12:38:19Z")

</div>

Hi all, I am trying my first steps with CUDA.jl and I have a question about memory layout. I have a simple unmutable structure, for example: struct Angles x::SVector{3, Float64} end I have operations like function …

---

## [Calculating the branch current](https://discourse.julialang.org/t/calculating-the-branch-current/57768)

<div class="topic-metadata">

**Author:** [@priod](https://discourse.julialang.org/u/priod)\
**Replies:** 3\
**Last updated:** [March 23, 2021, 11:32am UTC](https://discourse.julialang.org/t/calculating-the-branch-current/57768 "2021-03-23T11:32:55Z")

</div>

I need some help in calculating the branch current flows using the PowerModels package, and matpower casses.

---

## [Upper bound algorithm how can I translate my algorithm in julia code](https://discourse.julialang.org/t/upper-bound-algorithm-how-can-i-translate-my-algorithm-in-julia-code/57729)

<div class="topic-metadata">

**Author:** [@Yasmine\_123](https://discourse.julialang.org/u/Yasmine_123)\
**Replies:** 2\
**Last updated:** [March 23, 2021, 9:18am UTC](https://discourse.julialang.org/t/upper-bound-algorithm-how-can-i-translate-my-algorithm-in-julia-code/57729 "2021-03-23T09:18:51Z")

</div>

Hi everyone, I am a new user of julia. I should write an optimistic algorithm given the similarity parameters sij and the number of families r, partition the m product types into r families G1, …, Gr, each of size m/r,…

---

## [VegaLite vlplot basic usage, encoding](https://discourse.julialang.org/t/vegalite-vlplot-basic-usage-encoding/57700)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [March 22, 2021, 7:01pm UTC](https://discourse.julialang.org/t/vegalite-vlplot-basic-usage-encoding/57700 "2021-03-22T19:01:27Z")

</div>

I’m new to both Vega Lite and VegaLite.jl, and I’m confused about exactly how is vlplot supposed to work. The VegaLite documentation seems to consist mostly of examples and lacks a more systematic approach to documentati…

---

## [Is anyone up for collaborating on a vectorized (portfolio) backtesting library?](https://discourse.julialang.org/t/is-anyone-up-for-collaborating-on-a-vectorized-portfolio-backtesting-library/57720)

<div class="topic-metadata">

**Author:** [@itchingpixels](https://discourse.julialang.org/u/itchingpixels)\
**Replies:** 7\
**Last updated:** [March 22, 2021, 5:18pm UTC](https://discourse.julialang.org/t/is-anyone-up-for-collaborating-on-a-vectorized-portfolio-backtesting-library/57720 "2021-03-22T17:18:55Z")

</div>

Hi! I just replied on another thread - I’ve started working on a vectorized (both single asset and portfolio) backtesting framework. I think it could be a low hanging fruit (it’s really not rocket science), high leverag…

---

## [\[differentialequations.jl\] stuck at initial value when using function](https://discourse.julialang.org/t/differentialequations-jl-stuck-at-initial-value-when-using-function/57716)

<div class="topic-metadata">

**Author:** [@DCT](https://discourse.julialang.org/u/DCT)\
**Replies:** 3\
**Last updated:** [March 22, 2021, 2:58pm UTC](https://discourse.julialang.org/t/differentialequations-jl-stuck-at-initial-value-when-using-function/57716 "2021-03-22T14:58:09Z")

</div>

Hi all, Being new to Julia, I started playing around a bit with differential equations. I started with a simple system, du = A \* u where A is an n\*n array, and u a vector of length n. when I set up the system as f(u…

---

## [Boundary Value Problem with ModellingToolkit or DiffEqOperators](https://discourse.julialang.org/t/boundary-value-problem-with-modellingtoolkit-or-diffeqoperators/57656)

<div class="topic-metadata">

**Author:** [@kkakosim](https://discourse.julialang.org/u/kkakosim)\
**Replies:** 3\
**Last updated:** [March 21, 2021, 8:45pm UTC](https://discourse.julialang.org/t/boundary-value-problem-with-modellingtoolkit-or-diffeqoperators/57656 "2021-03-21T20:45:00Z")

</div>

At first I thought that there was a bug in the packages but probably I am doing something (completely wrong). I am trying to run the bellow spherical coordinates system with Boundary Values. But not sure if it even makes…

---

## [Efficient Nash Equilibria using JuMP](https://discourse.julialang.org/t/efficient-nash-equilibria-using-jump/57616)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 5\
**Last updated:** [March 21, 2021, 8:31pm UTC](https://discourse.julialang.org/t/efficient-nash-equilibria-using-jump/57616 "2021-03-21T20:31:19Z")

</div>

Previously I have been using LRSLib (which calls the C library lrsnash) for computing Nash equilibria of two-player simultaneous move zero-sum games. However, I wanted to implement a pure Julia implementation for the sak…

---

## [PyCall / RCall in notebook showing graph displayed by the other language?](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624)

<div class="topic-metadata">

**Author:** [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Replies:** 3\
**Last updated:** [March 21, 2021, 8:13pm UTC](https://discourse.julialang.org/t/pycall-rcall-in-notebook-showing-graph-displayed-by-the-other-language/57624 "2021-03-21T20:13:48Z")

</div>

Is it possible to call for instance ggplot2 in R, and have the graph be shown in a Julia Jupyter notebook? Any example code somewhere?

---

## [GraphDB packages or solutions](https://discourse.julialang.org/t/graphdb-packages-or-solutions/57561)

<div class="topic-metadata">

**Author:** [@zgornel](https://discourse.julialang.org/u/zgornel)\
**Replies:** 6\
**Last updated:** [March 21, 2021, 7:38pm UTC](https://discourse.julialang.org/t/graphdb-packages-or-solutions/57561 "2021-03-21T19:38:46Z")

</div>

Is there any graphdb-like package that allows for more complex pattern queries and sub-graph retrieval (similar to neo4j’s or grakn’s). Metagraphs+Lightgraphs is the only thing I have found so far.

---

## [Upload an Arduino sketch from Julia](https://discourse.julialang.org/t/upload-an-arduino-sketch-from-julia/57452)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 6\
**Last updated:** [March 21, 2021, 7:26pm UTC](https://discourse.julialang.org/t/upload-an-arduino-sketch-from-julia/57452 "2021-03-21T19:26:46Z")

</div>

To upload a sketch (i.e. an .ino file) to an Arduino I normally just use the Arduino IDE. But it would be amazing if there was a way to do this from Julia. Ideally, this would involve some wrapped binary that would work …

---

## [What is the best visualization for seeing changes in distribution over time in hierarchical data?](https://discourse.julialang.org/t/what-is-the-best-visualization-for-seeing-changes-in-distribution-over-time-in-hierarchical-data/57594)

<div class="topic-metadata">

**Author:** [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Replies:** 9\
**Last updated:** [March 21, 2021, 6:02pm UTC](https://discourse.julialang.org/t/what-is-the-best-visualization-for-seeing-changes-in-distribution-over-time-in-hierarchical-data/57594 "2021-03-21T18:02:30Z")

</div>

I am trying to find a good visualization for how how I spent my time is changing over time. I can visualize this data for a single interval very well with a sunburst or treemap chart: But visualizing the changes in t…

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

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