# Specific Domains

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

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

**Page:** 436

---

## [Loss function for sequence modeling w/ RNN](https://discourse.julialang.org/t/loss-function-for-sequence-modeling-w-rnn/42452)

<div class="topic-metadata">

**Author:** [@austinbean](https://discourse.julialang.org/u/austinbean)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 7:42pm UTC](https://discourse.julialang.org/t/loss-function-for-sequence-modeling-w-rnn/42452 "2020-07-10T19:42:15Z")

</div>

I’d like advice on the best way to model the loss function in Flux for an RNN where I’m modeling a sequence of words in labeled sentences. (This is for a regression task, but a sentiment analysis task would look similar…

---

## [Plots.jl crash](https://discourse.julialang.org/t/plots-jl-crash/42852)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 4:52pm UTC](https://discourse.julialang.org/t/plots-jl-crash/42852 "2020-07-10T16:52:57Z")

</div>

Hi, after updating package Plots.jl, the command “using Plots” gave me the following error. Re-building package doesn’t help, however, other packages work without any problem. Could somebody please give me some advice h…

---

## [Model constraint error](https://discourse.julialang.org/t/model-constraint-error/42850)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 4:45pm UTC](https://discourse.julialang.org/t/model-constraint-error/42850 "2020-07-10T16:45:46Z")

</div>

How to solve this error? BoundsError: attempt to access 2×2 Array{Int64,2} at index \[1, 3\] using JuMP, Cbc Model1 = Model(with\_optimizer(Cbc.Optimizer)) t = 4 w = 2 T = 1:t W = 1:w WH = \[2489 1447; 11073 5414\] @vari…

---

## [Comparation with Flux leads to odd results in Flux](https://discourse.julialang.org/t/comparation-with-flux-leads-to-odd-results-in-flux/42839)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 5\
**Last updated:** [July 10, 2020, 1:39pm UTC](https://discourse.julialang.org/t/comparation-with-flux-leads-to-odd-results-in-flux/42839 "2020-07-10T13:39:23Z")

</div>

Hello, I’m developing a toy ML library (BetaML) to learn a bit about ML algorithms (I’m pretty a newbie). I tested BetaML with a bike sharing demand forecast example and compared it with Flux: https://github.com/sylva…

---

## [Taking Complex Autodiff Seriously in ChainRules](https://discourse.julialang.org/t/taking-complex-autodiff-seriously-in-chainrules/39317)

<div class="topic-metadata">

**Author:** [@Mason](https://discourse.julialang.org/u/Mason)\
**Replies:** 65\
**Last updated:** [July 10, 2020, 1:45pm UTC](https://discourse.julialang.org/t/taking-complex-autodiff-seriously-in-chainrules/39317 "2020-07-10T13:45:07Z")

</div>

So these conversations have been starting up recently again on the Slack autodiff channel and in places like Complex numbers · Issue #159 · JuliaDiff/ChainRulesCore.jl · GitHub. I think there’s a lot of misconceptions o…

---

## [Flux.jl: Initializing Parameters in Specified Range](https://discourse.julialang.org/t/flux-jl-initializing-parameters-in-specified-range/42621)

<div class="topic-metadata">

**Author:** [@astroboy](https://discourse.julialang.org/u/astroboy)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 12:45pm UTC](https://discourse.julialang.org/t/flux-jl-initializing-parameters-in-specified-range/42621 "2020-07-10T12:45:07Z")

</div>

Hello! I hope you’re all doing well. I’m trying to figure out how to initialize the parameters of a simple Dense layer object uniformly in a range that I specify. I know that I can access how the layer parameters are in…

---

## [Aggregate deprecated use combine](https://discourse.julialang.org/t/aggregate-deprecated-use-combine/42809)

<div class="topic-metadata">

**Author:** [@jguo](https://discourse.julialang.org/u/jguo)\
**Replies:** 6\
**Last updated:** [July 9, 2020, 11:25pm UTC](https://discourse.julialang.org/t/aggregate-deprecated-use-combine/42809 "2020-07-09T23:25:28Z")

</div>

dear Julia Community, I am new to Julia. Here is my problem using aggregate function. using DataFrames df6 = DataFrame(Group = rand(\["A", "B", "C"\], 15), Variable1 = randn(15), Variable2 = rand(15)); aggregate(df6, :G…

---

## [In Plots.jl, how does one control the space between ylabel and yaxis?](https://discourse.julialang.org/t/in-plots-jl-how-does-one-control-the-space-between-ylabel-and-yaxis/5717)

<div class="topic-metadata">

**Author:** [@mwsohn](https://discourse.julialang.org/u/mwsohn)\
**Replies:** 14\
**Last updated:** [July 9, 2020, 6:44pm UTC](https://discourse.julialang.org/t/in-plots-jl-how-does-one-control-the-space-between-ylabel-and-yaxis/5717 "2020-07-09T18:44:46Z")

</div>

I don’t seem to find any example or documentation about this.

---

## [How to use Gurobi variable hints in JuMP 0.21](https://discourse.julialang.org/t/how-to-use-gurobi-variable-hints-in-jump-0-21/42764)

<div class="topic-metadata">

**Author:** [@ryancorywright](https://discourse.julialang.org/u/ryancorywright)\
**Replies:** 3\
**Last updated:** [July 9, 2020, 4:33pm UTC](https://discourse.julialang.org/t/how-to-use-gurobi-variable-hints-in-jump-0-21/42764 "2020-07-09T16:33:27Z")

</div>

Hi, I was wondering whether it was possible to access the Gurobi variable hint attributes VarHintVal using JuMP, or failing that by accessing a lower level model. As a concrete working example, suppose that I’m solving…

---

## [Ipopt with JuMP -- Restoration Failure Crashing Julia](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753)

<div class="topic-metadata">

**Author:** [@Dominic\_Pazzula](https://discourse.julialang.org/u/Dominic_Pazzula)\
**Replies:** 9\
**Last updated:** [July 9, 2020, 3:13pm UTC](https://discourse.julialang.org/t/ipopt-with-jump-restoration-failure-crashing-julia/42753 "2020-07-09T15:13:18Z")

</div>

I have some code calling Ipopt through JuMP. I’m in the testing phase and have a small and large-ish problem. Small problem runs without issue. The large problem hits a Restoration Failure (ok, I can work to fix that)…

---

## [Fast integration of log(2^(P(x)exp(-x^2/2)+1)](https://discourse.julialang.org/t/fast-integration-of-log-2-p-x-exp-x-2-2-1/42762)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 4\
**Last updated:** [July 9, 2020, 8:49am UTC](https://discourse.julialang.org/t/fast-integration-of-log-2-p-x-exp-x-2-2-1/42762 "2020-07-09T08:49:33Z")

</div>

Hello, I would like to compute \\int\_0^{x\_i}log(2^{P\_i(t)exp(-t^2/2)} + 1)dt for a large number of values x\_i where P\_i is a different polynomial (degree \<6) for each x\_i value. The naive approach is to use the functi…

---

## [How to define a JuMP variable in a specific discrete set?](https://discourse.julialang.org/t/how-to-define-a-jump-variable-in-a-specific-discrete-set/42754)

<div class="topic-metadata">

**Author:** [@ZdM87](https://discourse.julialang.org/u/ZdM87)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 11:00pm UTC](https://discourse.julialang.org/t/how-to-define-a-jump-variable-in-a-specific-discrete-set/42754 "2020-07-08T23:00:55Z")

</div>

I have an integer variable that takes values in {2, 5, 6, 8, 10}. How do I define this in JuMP? For an integer variable, I do @variable(model, x, Int) but this will take all integer variables. I can set the upper and …

---

## [Correct syntax for Ipopt and JuMP request?](https://discourse.julialang.org/t/correct-syntax-for-ipopt-and-jump-request/42743)

<div class="topic-metadata">

**Author:** [@zazizoma](https://discourse.julialang.org/u/zazizoma)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 10:49pm UTC](https://discourse.julialang.org/t/correct-syntax-for-ipopt-and-jump-request/42743 "2020-07-08T22:49:54Z")

</div>

Hello, I’m attempting to maximize f(x, y) = c\_1xy^\\gamma - c\_2y using Ipopt, JuMP and Julia 1.4.2. Both x and y have upper and lower bounds. I need to suppress Ipopt output as the routine is running in a loop. This m…

---

## [JuMP variable bound by bin variable](https://discourse.julialang.org/t/jump-variable-bound-by-bin-variable/42480)

<div class="topic-metadata">

**Author:** [@RaulBritto](https://discourse.julialang.org/u/RaulBritto)\
**Replies:** 2\
**Last updated:** [July 3, 2020, 5:31pm UTC](https://discourse.julialang.org/t/jump-variable-bound-by-bin-variable/42480 "2020-07-03T17:31:04Z")

</div>

Hello, I trying to optimize using JuMP with GLPK. The model has the vectors of variables: y is a binary vector. Each y\[ j \] represents when thefeature is actived or deactived. x is float vector. Each variable x\[ j…

---

## [How to add a rotated annotation using Plots.jl?](https://discourse.julialang.org/t/how-to-add-a-rotated-annotation-using-plots-jl/33705)

<div class="topic-metadata">

**Author:** [@Tianzhu\_Xiong](https://discourse.julialang.org/u/Tianzhu_Xiong)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 5:21pm UTC](https://discourse.julialang.org/t/how-to-add-a-rotated-annotation-using-plots-jl/33705 "2020-07-08T17:21:29Z")

</div>

Sometimes it is convenient to squeeze in a rotated (eg. vertically placed) text in a thin figure. The annotate!() method in Plots.jl seems to only produce horizontal text in the plot, is there any trick to rotate the tex…

---

## [Count cumulative number of unique elements](https://discourse.julialang.org/t/count-cumulative-number-of-unique-elements/42736)

<div class="topic-metadata">

**Author:** [@tpoisot](https://discourse.julialang.org/u/tpoisot)\
**Replies:** 1\
**Last updated:** [July 8, 2020, 3:10pm UTC](https://discourse.julialang.org/t/count-cumulative-number-of-unique-elements/42736 "2020-07-08T15:10:45Z")

</div>

I am trying to produce a species discovery curve, which is basically the number of unique species observed over time. So, at time t, the value is length(unique(\_.species\_name)) for all observations up to time t - this in…

---

## [Force model to discard basis](https://discourse.julialang.org/t/force-model-to-discard-basis/41104)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 10\
**Last updated:** [July 8, 2020, 2:53pm UTC](https://discourse.julialang.org/t/force-model-to-discard-basis/41104 "2020-07-08T14:53:50Z")

</div>

I am wondering if there is a JuMP/MOI way (this is, solver-agnostic) to discard the simplex basis that is implicitly carried by a Model after an LP was solved by the first time. My problem is that I have a large model t…

---

## [Is there a DictTables.jl?](https://discourse.julialang.org/t/is-there-a-dicttables-jl/42700)

<div class="topic-metadata">

**Author:** [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Replies:** 7\
**Last updated:** [July 8, 2020, 1:50pm UTC](https://discourse.julialang.org/t/is-there-a-dicttables-jl/42700 "2020-07-08T13:50:54Z")

</div>

I have a problem in which the data is tabular, but one of the columns is the keys for the rest of the row. For example: │ id │ x2 │ y2 │ │ String │ Int64 │ Int64 │ ┼────────┼───────┼───────┤ │ a │ 1 │…

---

## [DifferentialEquations and Parameter Estimation with Indicator Variables](https://discourse.julialang.org/t/differentialequations-and-parameter-estimation-with-indicator-variables/42633)

<div class="topic-metadata">

**Author:** [@Alfie](https://discourse.julialang.org/u/Alfie)\
**Replies:** 4\
**Last updated:** [July 8, 2020, 8:40am UTC](https://discourse.julialang.org/t/differentialequations-and-parameter-estimation-with-indicator-variables/42633 "2020-07-08T08:40:54Z")

</div>

Hi I am new to Julia, sorry for this basic question, I am doing some parameter fitting, and would like to use a binary indicator variable (0/1) to differentiate groups from my data. I have the following code: f…

---

## [Getting the "current seriescolor" in a recipe](https://discourse.julialang.org/t/getting-the-current-seriescolor-in-a-recipe/42675)

<div class="topic-metadata">

**Author:** [@met-j](https://discourse.julialang.org/u/met-j)\
**Replies:** 2\
**Last updated:** [July 8, 2020, 8:29am UTC](https://discourse.julialang.org/t/getting-the-current-seriescolor-in-a-recipe/42675 "2020-07-08T08:29:46Z")

</div>

I am working on a Plots recipe based on the marginalhist example. I would like to make the fillcolor of the histogram subplots dependend on the colorgradient used. While this works manually seriescolor --\> cgrad(:star…

---

## [Tricks for parallel computing in Julia](https://discourse.julialang.org/t/tricks-for-parallel-computing-in-julia/42638)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 11\
**Last updated:** [July 7, 2020, 11:12pm UTC](https://discourse.julialang.org/t/tricks-for-parallel-computing-in-julia/42638 "2020-07-07T23:12:41Z")

</div>

The graph above represents execution time per call of the function once in the program below as a function of the number of workers used on a 32 cpu/64 thread machine. The green line (left y axis) represents the progr…

---

## [Performing vector operations on a specific range of a CuArray](https://discourse.julialang.org/t/performing-vector-operations-on-a-specific-range-of-a-cuarray/39706)

<div class="topic-metadata">

**Author:** [@ozmaden](https://discourse.julialang.org/u/ozmaden)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 8:11pm UTC](https://discourse.julialang.org/t/performing-vector-operations-on-a-specific-range-of-a-cuarray/39706 "2020-07-07T20:11:48Z")

</div>

Hello everyone! I’m taking my first steps with Julia and programming GPUs, also this is my first post here. So please forgive me if the question is too banal or has been answered before :slight\_smile: I could not find an…

---

## [Saving VegaLite Plots](https://discourse.julialang.org/t/saving-vegalite-plots/42575)

<div class="topic-metadata">

**Author:** [@Chris\_Anderson](https://discourse.julialang.org/u/Chris_Anderson)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 5:46pm UTC](https://discourse.julialang.org/t/saving-vegalite-plots/42575 "2020-07-07T17:46:11Z")

</div>

I’m having some trouble saving plots I’ve created using VegaLite. Here is what I’ve been trying. grph1 |\> save("/PATH/figure.png") I get this error. MethodError: no method matching save\_(::FileIO.File{FileIO.DataForm…

---

## [Large memory allocation in ForwardDiff](https://discourse.julialang.org/t/large-memory-allocation-in-forwarddiff/42581)

<div class="topic-metadata">

**Author:** [@shiroghost](https://discourse.julialang.org/u/shiroghost)\
**Replies:** 14\
**Last updated:** [July 7, 2020, 3:06pm UTC](https://discourse.julialang.org/t/large-memory-allocation-in-forwarddiff/42581 "2020-07-07T15:06:43Z")

</div>

Hi all, I am a bit new to Julia, so I am sure that I should have a type stability problem somewhere, but I cannot find the mistake… I am trying to determine a simple hessian of a user supplied function. The user gives …

---

## [Sign restrictions on structural VARs](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268)

<div class="topic-metadata">

**Author:** [@donk\_fish](https://discourse.julialang.org/u/donk_fish)\
**Replies:** 5\
**Last updated:** [July 7, 2020, 8:11am UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268 "2020-07-07T08:11:20Z")

</div>

Good morning, I’m curious how far Julia has gotten with libraries to estimate various types of (S)VAR models? For example, is there a library that implements sign restrictions? I couldn’t find anything by searching.

---

## [Using ForwardDiff on qr factorization](https://discourse.julialang.org/t/using-forwarddiff-on-qr-factorization/42625)

<div class="topic-metadata">

**Author:** [@aross](https://discourse.julialang.org/u/aross)\
**Replies:** 11\
**Last updated:** [July 7, 2020, 6:45am UTC](https://discourse.julialang.org/t/using-forwarddiff-on-qr-factorization/42625 "2020-07-07T06:45:09Z")

</div>

I am doing a linear least-squares optimization on a function by using QR factorization. I wish to find the gradient so that I can optimize a different parameter, but I am running into trouble when passing qr() to Forward…

---

## [Evaluation, gradient and Hessian of a scalar function for multiple values using ForwardDiff.jl](https://discourse.julialang.org/t/evaluation-gradient-and-hessian-of-a-scalar-function-for-multiple-values-using-forwarddiff-jl/42641)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 5\
**Last updated:** [July 7, 2020, 1:36am UTC](https://discourse.julialang.org/t/evaluation-gradient-and-hessian-of-a-scalar-function-for-multiple-values-using-forwarddiff-jl/42641 "2020-07-07T01:36:25Z")

</div>

Hello, I would like to evaluate a scalar-function f: R \\xrightarrow{} R as well as its derivative and hessian at around 200 values using ForwardDiff.jl To speed-up the computations, is it possible to precompute an obje…

---

## [Tangents in Luxor.jl](https://discourse.julialang.org/t/tangents-in-luxor-jl/42170)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.julialang.org/u/turtle)\
**Replies:** 8\
**Last updated:** [July 7, 2020, 12:59am UTC](https://discourse.julialang.org/t/tangents-in-luxor-jl/42170 "2020-07-07T00:59:51Z")

</div>

I am still learning Luxor. I find two in-built tangent functions: circletangent2circles() makes circles of a particular radius tangential to two circles circlepointtangent() makes circles of a particular radius pass…

---

## [Polynomial optimization problem can't deal with redundant constraints](https://discourse.julialang.org/t/polynomial-optimization-problem-cant-deal-with-redundant-constraints/41839)

<div class="topic-metadata">

**Author:** [@aliceee](https://discourse.julialang.org/u/aliceee)\
**Replies:** 1\
**Last updated:** [June 25, 2020, 7:12am UTC](https://discourse.julialang.org/t/polynomial-optimization-problem-cant-deal-with-redundant-constraints/41839 "2020-06-25T07:12:44Z")

</div>

I’m exploring the following polynomial optimization problem: using SumOfSquares using DynamicPolynomials using MosekTools # Create symbolic variables (not JuMP decision variables) @polyvar x1 x2 # Create a Sum of Squa…

---

## [Specify jumps in a Heston-like model?](https://discourse.julialang.org/t/specify-jumps-in-a-heston-like-model/42422)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 9\
**Last updated:** [July 6, 2020, 8:35am UTC](https://discourse.julialang.org/t/specify-jumps-in-a-heston-like-model/42422 "2020-07-06T08:35:09Z")

</div>

I am working with a model similar to the Heston model, and would like to add jumps. I would like to have the jump rate which depend on the ordinary volatility as rate1(u,p,t) = λ0 .+ λ1.\*exp(u\[2\]/2.0) I understand tha…

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

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