[julia-users] Re: Create EPS files with Gadfly

2016-10-19 Thread Christopher Fisher
: > > The list of available backends to Gadfly are available here: > http://gadflyjl.org/stable/man/backends.html > > There is no EPS backend, only a PS backend, which you may be able to > convert to eps?? > > Regards > - > Avik > > > On Wednesday, 19 October 2016 2

[julia-users] Create EPS files with Gadfly

2016-10-19 Thread Christopher Fisher
Is it possible to create .eps files in Gadfly? Thanks, Chris

[julia-users] Layered subplot does not work with categorical variables

2016-10-14 Thread Christopher Fisher
Hi all- I'm having trouble creating a subplot with multiple layers when the variables are categorical. Here is a stripped down version of my code. df = DataFrame(Condition = repeat(["Condition 1","Condition 2"], inner = 3), Block = repeat(["Block 1","Block 2", "Block 3"],outer = 2),y1 =

[julia-users] Layered subplot does not work with categorical variables

2016-10-14 Thread Christopher Fisher
Hi all- I'm having trouble creating a subplot with multiple layers when the variables are categorical. Here is a stripped down version of my code. df = DataFrame(Condition = repeat(["Condition 1","Condition 2"], inner = 3), Block = repeat(["Block 1","Block 2", "Block 3"],outer = 2),y1 =

[julia-users] Re: Nested Grouping in Gadfly

2016-10-14 Thread Christopher Fisher
I guess one approach is to use subplots with the grid lines turned off. But if someone has a better solution, I would like to know. On Friday, October 14, 2016 at 6:18:35 AM UTC-4, Christopher Fisher wrote: > > Hi all- > > I want to create a plot with nested grouping. The

[julia-users] Nested Grouping in Gadfly

2016-10-14 Thread Christopher Fisher
Hi all- I want to create a plot with nested grouping. The data contain a condition grouping variable (1 and 2) and a block grouping variable (1,2 and 3). So I would like to be able to group the data by condition and display the blocks (in order from 1 to 3) within each condition. Ultimately,

Re: [julia-users] Setting up Stan in Ubuntu

2016-09-01 Thread Christopher Fisher
module DataFrames.* > *INFO: Recompiling stale cache file > /Users/rob/.julia/lib/v0.5/KernelDensity.ji for module KernelDensity.* > > *julia> **CMDSTAN_HOME* > *"/Users/rob/Projects/Stan/cmdstan"* > > This should point to the top level: > > > Regards, &

[julia-users] Re: Setting up Stan in Ubuntu

2016-09-01 Thread Christopher Fisher
Correction. The paths should have " " around them. On Thursday, September 1, 2016 at 6:19:00 AM UTC-4, Christopher Fisher wrote: > > Also, I've tried adding a path in the .juliarc file. Its not clear to me > what subfolder in cmd stan it should point to, so I

[julia-users] Re: Setting up Stan in Ubuntu

2016-09-01 Thread Christopher Fisher
/cmdstan-2.11.0/stan_2.11.0 On Thursday, September 1, 2016 at 5:55:50 AM UTC-4, Christopher Fisher wrote: > > I am encountering a problem while trying to interface Stan through Julia. > Right now I am using Julia .4.6, Stan .3.2, Mamba .9.2 and Ubuntu 16.04. I > have successfully instal

[julia-users] Setting up Stan in Ubuntu

2016-09-01 Thread Christopher Fisher
I am encountering a problem while trying to interface Stan through Julia. Right now I am using Julia .4.6, Stan .3.2, Mamba .9.2 and Ubuntu 16.04. I have successfully installed cmd Stan and ran the Bernoulli test model. However, when I run Pkg.test("Stan") I get the following error:

[julia-users] How to create Array of Dict{ASCIIString,Any}

2016-08-06 Thread Christopher Fisher
Hi all- I'm trying to create an Array of Dict{ASCIIString,Any}. What I have right now is similar to this: Stimuli = [Dict("slots" => Dict("name"=> i,"list"=> 1)) for i = 1:10] I want to build in the flexibility so I can add an entry later in the code: Stimuli[1]["time"] = .234 but I get the

[julia-users] How to omit values below identify line in Gadfly contour plot

2016-08-03 Thread Christopher Fisher
Hi all- I am trying to create a contour plot in Gadfly. The values below the identity line where y <= x are not sensible. So I would like to omit those values from the plot. Is there a way to accomplish this? Thanks, Chris

[julia-users] Installs .5.0 dev on unbuntu instead of .4.6

2016-07-22 Thread Christopher Fisher
Hi all- I'm trying reinstall Julia .4.6 on Ubuntu 16.04. For some reason when I follow the platform specific instructions, it installs .5.0 dev instead of the stable version .4.6. Is there a way to install .4.6? Unfortunately, .5 dev is unstable

[julia-users] Automatically restart long running process

2016-07-11 Thread Christopher Fisher
Hi all- I was wondering if there is a simple way to restart a long running script in Julia. Right now my script will start where it left off when manually. However, I'm not sure how to check that the process is not running/was interrupted and spawn the process. My best guess it that it would

Re: [julia-users] Recover lost script from active command line session

2016-07-11 Thread Christopher Fisher
Thanks. I'll look into this. On Monday, July 11, 2016 at 8:06:31 AM UTC-4, Stefan Karpinski wrote: > > On the off chance that the file has been rm'ed but you still have a file > handle for it open in the process, you may be able to use lsof to find a > inode number from which you might be able

Re: [julia-users] Recover lost script from active command line session

2016-07-11 Thread Christopher Fisher
> :($(Expr(:lambda, Any[:x], Any[Any[Any[:x,:Any,0]],Any[],0,Any[]], :(begin > # none, line 1: > return x > end > > I don't know about non-function code. > > On Mon, 2016-07-11 at 13:18, Christopher Fisher <fish...@miamioh.edu > > wrote:

[julia-users] Re: performance of parallel code

2016-06-20 Thread Christopher Fisher
Would using pmap() be suitable for your application? Usually when I use that I get slightly more than a 2X speed up with 4 cores. On Monday, June 20, 2016 at 2:27:41 AM UTC-4, Boylan, Ross wrote: > > I think I've taken steps to minimize parallel overhead by providing only > one function call

[julia-users] Re: Help creating user-defined types and constructors

2016-06-05 Thread Christopher Fisher
Thanks again for the all of the advice. The Julia community is very helpful. I should be able to figure out a viable solution.

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
!Matched::Integer, !Matched::Integer, !Matched::Integer...) >> while loading In[1], in expression starting on line 36 >> >> in getindex at abstractarray.jl:488 >> >> >> >> On Saturday, June 4, 2016 at 3:11:18 PM UTC-4, Ford O. wrote: >>> >&

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
ion[:infected, 1] > population[:infected, 1] = false > > > > > On Saturday, June 4, 2016 at 2:19:02 PM UTC+2, Christopher Fisher wrote: >> >> I was wondering if someone would be willing to help me with creating >> user-defined types. I've been using Julia for abou

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
Got it. Thanks for clarifying. On Saturday, June 4, 2016 at 5:49:39 PM UTC-4, Steven G. Johnson wrote: > > > > On Saturday, June 4, 2016 at 5:05:47 PM UTC-4, Christopher Fisher wrote: >> >> Thanks Ford. Is there a reason you discourage using symbols? I opted for >>

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
field::Symbol, index...) = p.individuals[ > index...].(field) = value > getindex(p::Population, field::Symbol, index...) = p.individuals[index > ...].(field) > > Usage > population[:infected, 1] > population[:infected, 1] = false > > > > > On Saturday, June 4, 2016 at 2:19:02

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
Thanks everyone for your helpful suggestions. Although a few details seem fuzzy, I think I am learning quite a bit and I am very close to the final product. Combining Ford's initial code, Steve's code and David's code allowed me to access the information from specific individuals (e.g.

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
:47:55 AM UTC-4, Steven G. Johnson wrote: > > > > On Saturday, June 4, 2016 at 8:19:02 AM UTC-4, Christopher Fisher wrote: >> >> I was wondering if someone would be willing to help me with creating >> user-defined types. I've been using Julia for about two years no

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
: > population[index] = Individual() # set new individual > infected(population[index]) # gets the infected property of > individual at index > vaccinated(population[index])# ... > > But you don't really need functions for these things... > > > On Saturday, June 4,

[julia-users] Help creating user-defined types and constructors

2016-06-04 Thread Christopher Fisher
I was wondering if someone would be willing to help me with creating user-defined types. I've been using Julia for about two years now but I am new to the idea of creating custom types. I'm trying to create a population of agents/individuals in a simple epidemiological simulation. I would like

[julia-users] Re: How to vectorize a function which has a tuple as return value to a function which returns a tuple of matrices instead of a matrix with tuple elements?

2016-05-16 Thread Christopher Fisher
It appears that a::Float64 is converting your array into separate instances of Float64. Either of these should work: tupleFun(a::Array{Float64,2}) = (a+1, a-1) tupleFun(rand(3,3)) tupleFun(a) = (a+1, a-1) tupleFun(rand(3,3)) On Sunday, May 15, 2016 at 11:20:33 AM UTC-4, Hakuna M. wrote: >

[julia-users] Re: 2d density plot in Gadfly?

2016-04-17 Thread Christopher Fisher
Thanks for the suggestions, Mykel. On Sunday, April 17, 2016 at 12:37:58 PM UTC-4, Mykel Kochenderfer wrote: > > > I was wondering if it is possible to create a 2d density plot in Gadfly. > > It will produce counts rather than densities, so the scale will not be > quite right, but you can get

[julia-users] 2d density plot in Gadfly?

2016-04-17 Thread Christopher Fisher
Hi all- I was wondering if it is possible to create a 2d density plot in Gadfly. The closest option I found was a contour plot, but I would prefer a smooth gradient, such as the last example in the following link (minus the data points):

[julia-users] Re: Is there a performance penalty for defining functions inside functions?

2016-03-30 Thread Christopher Fisher
There might be some cases where defining functions within functions can improve speed. As Mauro noted, this may not be true in .4 but will be fixed in .5. See the following for examples:

[julia-users] Sampling from distributions appears to be slower in .4 compared to .3

2016-03-20 Thread Christopher Fisher
Hi all- It appears that sampling from certain distributions in .4 is slower than .3. Strangely, however, .4 is faster when sampling from a standard uniform distribution. Is there any reason for this? Here are a few cases with typical run times: #Version .4 *@time rand(10^8);* 0.380916

[julia-users] Display a point in violin plot

2016-03-20 Thread Christopher Fisher
Hi all- I am trying to visually assess the fit of a model. The model produces as distribution of predictions and the observation is one point. I would like to overlay the observation onto a violin plot of predictions. For some reason the observation does not display in this simple example:

[julia-users] Re: Create distributed array from a file

2016-01-26 Thread Christopher Fisher
Thanks for the idea. It may not apply in my particular case. I forgot to mention that my memory is 32GB on the machine I am using. So swapping with the hard drive does not seem likely. Given that the second execution of the function is much faster (1 second vs 5 min), my best guess is that the

[julia-users] Re: Create distributed array from a file

2016-01-26 Thread Christopher Fisher
Perhaps if its a precompling issue, it would be faster if I precomplied with a smaller distributed array. I'll try that and report back in the next day or two. On Tuesday, January 26, 2016 at 12:28:21 PM UTC-5, Christopher Fisher wrote: > > Thanks for the idea. It may not apply

[julia-users] Re: A grateful scientist

2015-10-26 Thread Christopher Fisher
I work with mathematical models of cognition and switched to Julia from Matlab about a year and a half ago. Aside from the debugger (step,step in, etc.), I don't miss Matlab all. Once the statistical packages mature, I'll phase out R too. I think the language is shaping up quite well and the

Re: [julia-users] Deprecation of require

2015-10-16 Thread Christopher Fisher
d each worker to load. What is the preferred way to > enable this in 0.4? > > > On Thursday, September 17, 2015 at 7:18:54 AM UTC-5, Christopher Fisher > wrote: >> >> I am using .4.0-rc1 and have encountered a similar situation and have >> fairly basic questions about the

Re: [julia-users] Re: Loading files and scoping of variables in parallel code

2015-10-11 Thread Christopher Fisher
ee > https://github.com/JuliaLang/julia/issues/9245. > > I think those are the only changes I had to make. > > --Tim > > > On Sunday, October 11, 2015 07:22:27 AM Christopher Fisher wrote: > > Sorry for the confusion. I realized the problem with sendto() was that

[julia-users] Re: a pmap question involving Monte Carlo

2015-10-10 Thread Christopher Fisher
I'm not positive, but it looks like PF_inner is expecting multiple inputs and pmap appears to be sending a single array of arrays to PF_inner. One thing you might try is accepting an array of arrays in PF_inner and extracting the components within the function. It might also be possible to map

[julia-users] Re: a pmap question involving Monte Carlo

2015-10-10 Thread Christopher Fisher
Another thing to check is how you are mapping your inputs to the available workers. Just to give you a simple example, suppose you have a function called MyModel that accepts an array of parameters and each worker receives the same parameters. The basic steps would be: Nworkers = 3 parms =

[julia-users] Re: a pmap question involving Monte Carlo

2015-10-10 Thread Christopher Fisher
you know > the outcome. > > Best wishes, > > Jim > > On Saturday, October 10, 2015 at 8:38:51 AM UTC-4, Christopher Fisher > wrote: >> >> Another thing to check is how you are mapping your inputs to the >> available workers. Just to give you a simple example,

[julia-users] Loading files and scoping of variables in parallel code

2015-10-09 Thread Christopher Fisher
Hi all- I am trying to load a file of functions on a cluster of computers. In the past, I used require() (now depreciated) and the sendto() function described here to make a data variable

[julia-users] Re: Passing data through Optim

2015-09-29 Thread Christopher Fisher
Thank you everyone for your help and examples. Its been very instructive. I found that simply assigning SubData in SubLoop1 as a const speed up the code 82 fold. I will try to incorporate the other advice where ever possible.

[julia-users] Re: Passing data through Optim

2015-09-28 Thread Christopher Fisher
Thanks for your willingness to investigate the matter more closely. I cannot post the exact code I am using (besides its rather long). However, I posted a toy example that follows the same basic operations. Essentially, my code involves an outer function (SubLoop) that loops through a data set

[julia-users] Re: Passing data through Optim

2015-09-28 Thread Christopher Fisher
re to optimum and it has access to b,c > println(f_closure(a)) > end > > julia> f(3,5,6) > 14 > > > > > > On Monday, September 28, 2015 at 2:46:45 PM UTC+2, Christopher Fisher > wrote: >> >> I was wondering if there is a way to pass data through t

[julia-users] Passing data through Optim

2015-09-28 Thread Christopher Fisher
I was wondering if there is a way to pass data through the optim function using the nelder_mead algorithm. As far as I can tell, the only way to fit a model to data is to declare the data as a global variable. I suspect this results in poor performance.

[julia-users] Re: [ANN] SQLite.jl package update

2015-08-24 Thread Christopher Fisher
Hi Jacob. I was wondering if you (or someone else) would mind answering a few questions? First, can you elaborate more on the method of converting a ResultSet to a DataFrame? Second, is there a way to list all of the tables in a database, something akin to dblistTables() in R? Thank you.

[julia-users] Re: [ANN] SQLite.jl package update

2015-08-24 Thread Christopher Fisher
exports a tables(db::SQLiteDB) method, does this do what you want? On Monday, 24 August 2015 15:13:33 UTC+1, Christopher Fisher wrote: Hi Jacob. I was wondering if you (or someone else) would mind answering a few questions? First, can you elaborate more on the method of converting a ResultSet

Re: [julia-users] Enumerating permutations

2015-07-31 Thread Christopher Fisher
UTC-4, Tamas Papp wrote: On Fri, Jul 31 2015, Christopher Fisher fish...@miamioh.edu javascript: wrote: I was wondering if there is a function for enumerating all of the permutations of size m from n elements, with repetitions allowed. For example, 3 permutations of [1 0] would

[julia-users] Enumerating permutations

2015-07-30 Thread Christopher Fisher
I was wondering if there is a function for enumerating all of the permutations of size m from n elements, with repetitions allowed. For example, 3 permutations of [1 0] would be [ 1 1 1;1 1 0;1 0 1;0 1 1;1 0 0; 0 1 0;0 0 1; 0 0 0]. (Analogous to

[julia-users] Re: New variables overwrite old variables in certain cases.

2015-07-25 Thread Christopher Fisher
such as `x[:]` returns a copy of `x`. So does applying an operation like `y * 4`. That's why writing `y = x[:]` or `y = y * 4` doesn't reassign `y` in such a way that subsequent modifications to `y` impact `x`. On Saturday, July 25, 2015 at 11:13:33 AM UTC-4, Christopher Fisher wrote: I am

[julia-users] New variables overwrite old variables in certain cases.

2015-07-25 Thread Christopher Fisher
I am writing a program (in .3.1) that takes a one dimensional array of indices (x) and creates a new one dimensional array of indices (x = y) and switches a given pair of elements in the new array. For some reason, the original array (x) changes when I change the new array (see below). In

[julia-users] Re: New variables overwrite old variables in certain cases.

2015-07-25 Thread Christopher Fisher
-is-not-the-territory/ On Saturday, July 25, 2015 at 8:13:33 AM UTC-7, Christopher Fisher wrote: I am writing a program (in .3.1) that takes a one dimensional array of indices (x) and creates a new one dimensional array of indices (x = y) and switches a given pair of elements in the new array. For some

[julia-users] Re: Using Multiple DistributedArrays with map

2015-04-29 Thread Christopher Fisher
/27677399/julia-how-to-copy-data-to-another-processor-in-julia There may be more elegant solutions, but this appears to work. On Tuesday, April 28, 2015 at 2:25:15 PM UTC-4, Christopher Fisher wrote: I'm fitting a complex cognitive model to data. Because the model does not have closed-form

[julia-users] Using Multiple DistributedArrays with map

2015-04-28 Thread Christopher Fisher
I'm fitting a complex cognitive model to data. Because the model does not have closed-form solution for the likelihood, computationally intensive simulation is required to generate the model predictions for fitting. My fitting routine involves two steps: (1) a brute force search of the

[julia-users] Re: Using Multiple DistributedArrays with map

2015-04-28 Thread Christopher Fisher
correction: map(LogLikelihood,RangeVar) On Tuesday, April 28, 2015 at 3:39:34 PM UTC-4, Christopher Fisher wrote: I forgot to add that when I tried to set up simpler code with only one array (and also no data passed through), it produced an error because it read the distributed array

[julia-users] Re: Using Multiple DistributedArrays with map

2015-04-28 Thread Christopher Fisher
I forgot to add that when I tried to set up simpler code with only one array (and also no data passed through), it produced an error because it read the distributed array, RangeVar, as a one dimensional array instead of a two dimensional array. map(LogLikelihood,DensityVar)

[julia-users] Problem with extend_trace in Optim

2015-04-24 Thread Christopher Fisher
Hi all- I am having trouble using the exended_trace method in Optim. My code and the resulting error message is located below. Everything works fine until I add extended_trace = true. Any help would be greatly appreciated. optimum =

[julia-users] Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
I would like to save the output of a kernel density estimate function for future use. The KernelDensity package returns an object of the type UnivariateKDE{FloatRange{Float64}} (constructor with 1 method). Ideally, I would like to save upwards of 1000 of these for future use because the model

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
Thank you for your replies, Rene and Simon. Unfortunately, HDF5 would not properly install. Simon, would you be able to show me the syntax for extracting the Range and Array from the UnivariateKDE object? I'm not familiar with these composite objects and could not find anything in my searches

[julia-users] Re: Saving Kernel Density Estimation Function output for later use

2015-03-24 Thread Christopher Fisher
Thank you. That part works. I saved the range and density to excel files and loaded them back into Julia. I realized that there does not appear to be a way to convert an Array to a Float range using convert(). As a workaround, I tried saving the FloatRange variable range as the min, step and

[julia-users] Make a dynamic variable available to all processors in a cluster

2015-03-23 Thread Christopher Fisher
I am not very experienced at parallel computing. My apologies in advance if the solution should be obvious. I have set up a cluster of computers to evaluate the fit of a simulation-based model. Essentially, I am trying to send a different set of parameters to each core to compare the model to

Re: [julia-users] Change array of arrays to a one dimensional array

2015-03-17 Thread Christopher Fisher
Excellent. I was not aware of the use of the ellipsis in Julia. Thanks! On Tuesday, March 17, 2015 at 9:03:48 PM UTC-4, Andreas Noack wrote: new_array = vcat(data...) 2015-03-17 20:59 GMT-04:00 Christopher Fisher fish...@miamioh.edu javascript:: Hi all- pmap outputs the results

[julia-users] Data structure with variable length outputs

2015-02-01 Thread Christopher Fisher
Hi all- I am trying to figure out a graceful way to store output from a model simulation. Each simulated trial produces a single reaction time, a single choice and a vector of visual fixations generated by a Markov chain. The complicating factor is that the size of the vector of visual

[julia-users] Re: Data structure with variable length outputs

2015-02-01 Thread Christopher Fisher
Thank you Ivar and Tim. Using append gave me a 3 fold improvement in speed and I'll look into the composite types. On Sunday, February 1, 2015 at 9:31:40 AM UTC-5, Christopher Fisher wrote: Hi all- I am trying to figure out a graceful way to store output from a model simulation. Each

[julia-users] PyPlot error when using Stan

2014-11-22 Thread Christopher Fisher
Hi- I am experiencing difficulty generating plots of MCMC chains with PyPlot. It was working fine and just stopped working. I even reverted to the latest working version of the code in Dropbox, but to no avail. Here is the code and the error message: p = plot(sim, [:trace, :mean, :density,

Re: [julia-users] PyPlot error when using Stan

2014-11-22 Thread Christopher Fisher
, Stan Mamba. I haven’t used PyPlot a lot, but if a restart doesn’t fix the problem, just send me the full code. Regards, Rob J. Goedman goe...@mac.com javascript: On Nov 22, 2014, at 6:22 AM, Christopher Fisher fish...@miamioh.edu javascript: wrote: Hi- I am experiencing

[julia-users] Progress on Julia IDE and/or debugger?

2014-09-17 Thread Christopher Fisher
Hello all- In the past, I have programmed in Matlab and R and started a partial transition to Julia over past 6 weeks. I really like the speed, the intuitive Matlab-like syntax and the fact that it is open source. However, Julia is sorely lacking a good IDE with built-in debugging, such as in

[julia-users] Problem Generating Matrices of random data using Distributions with Julia 0.3

2014-09-07 Thread Christopher Fisher
Hi all- I recently upgraded to Julia 0.3 and encountered a problem generating matrices of random data using Distributions. I did not receive this error with Julia 0.2. I receive the following error in both IJulia and terminal: using Distributions x = rand(Normal(0,1),10,10) `rand` has no

[julia-users] Re: Problem Generating Matrices of random data using Distributions with Julia 0.3

2014-09-07 Thread Christopher Fisher
PM UTC-4, Christopher Fisher wrote: Hi all- I recently upgraded to Julia 0.3 and encountered a problem generating matrices of random data using Distributions. I did not receive this error with Julia 0.2. I receive the following error in both IJulia and terminal: using Distributions x