[julia-users] Compute eigenvalues in parallel

2016-05-20 Thread AStupidbear
Is there a package in julia to compute eigenvalues in parallel?

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Kevin Liu
If accuracy is 'the nearness of a calculation to the true value', and the assumption is the relation between all variables remain linear, then I don't see why accuracy wouldn't be useful in GLM. On Friday, May 20, 2016 at 6:24:06 PM UTC-3, Kevin Liu wrote: > > Pkg.update() updated all

[julia-users] Re: linreg strangely picky about inputs

2016-05-20 Thread Steven G. Johnson
I think it's an error. The method definition should probably just be: linreg{T<:Number,S<:Number}(X::AbstractVector{T}, y::AbstractVector{S}) = [ones(T, size(X,1)) X] \ y which will allow it to work for X and y of different types. A PR (pull request) with a patch and a test case would be most

[julia-users] linreg strangely picky about inputs

2016-05-20 Thread Gabriel Gellner
Is it intentional that the builting linreg is so picky about its inputs? It seems to me that the code is a one liner: linreg{T<:Number}(X::AbstractVector{T}, y::AbstractVector{T}) = [ones(T, size(X,1)) X] \ y but forcing the types to be the same for both seems strange to me as it throws errors

[julia-users] Re: frame

2016-05-20 Thread David P. Sanders
El viernes, 20 de mayo de 2016, 20:12:22 (UTC+1), Henri Girard escribió: > > Hi, > I would like to make a frame in julia pyplot graphic 2D > I tried set_frame_on but nothing display idem for border=:on > Is there a command ? > What is a frame? What is the matplotlib command for this? For

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Kevin Liu
Pkg.update() updated all packages, did the job, thanks. So suppose I have a dataset called train. R2(train), rˆ2(train), r2(train) didn't work. I meant predictive accuracy. Does it apply to GLM? On Friday, May 20, 2016 at 1:26:47 PM UTC-3, Milan Bouchet-Valat wrote: > > Le vendredi 20 mai

[julia-users] frame

2016-05-20 Thread Henri Girard
Hi, I would like to make a frame in julia pyplot graphic 2D I tried set_frame_on but nothing display idem for border=:on Is there a command ? Regards Henri

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 08:37 -0700, Kevin Liu a écrit : > Pkg.update("GLM") > ERROR: MethodError: `update` has no method matching > update(::ASCIIString) Try Pkg.update(). > > Le jeudi 19 mai 2016 à 19:08 -0700, Kevin Liu a écrit :  > > > Thanks. I might need some help if I encounter problems

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 08:59 -0700, Kevin Liu a écrit : > I think accuracy doesn't make sense for a linear model whose purpose > isn't to predict. Do you agree?  Sorry, I don't know what you mean by "accuracy". Anyway, only users know the purpose of their models. All we can do is provide the

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Kevin Liu
I think accuracy doesn't make sense for a linear model whose purpose isn't to predict. Do you agree? On Friday, May 20, 2016 at 12:37:44 PM UTC-3, Kevin Liu wrote: > > Pkg.update("GLM") > > *ERROR: MethodError: `update` has no method matching update(::ASCIIString)* > > > > On Friday, May 20,

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Kevin Liu
Pkg.update("GLM") *ERROR: MethodError: `update` has no method matching update(::ASCIIString)* On Friday, May 20, 2016 at 4:29:20 AM UTC-3, Milan Bouchet-Valat wrote: > > Le jeudi 19 mai 2016 à 19:08 -0700, Kevin Liu a écrit : > > Thanks. I might need some help if I encounter problems on this

[julia-users] Re: Unexpected allocations in summing an array

2016-05-20 Thread Darwin Darakananda
I see, that makes sense. Thanks! On Friday, May 20, 2016 at 1:29:42 AM UTC-7, Kristoffer Carlsson wrote: > > Note that you only pay the cost once per function call in your first case > and not every time you access it inside the function. When x is inside the > function it's type is known so

Re: [julia-users] Re: Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Evan Fields
> > Yes, thanks for your help. I did Pkg.add("TravelingSalesmanHeuristics") > and checked out master in that directory. Pkg.tag and Pkg.publish both > seemed to work fine. Surely this was all an unforced error on my part but hopefully someone in the future will find this thread useful.

[julia-users] Re: vector assignment performance

2016-05-20 Thread Matt Bauman
I believe something just like that is already implemented in Devectorize.jl's @devec macro. Try: `@devec y[:] = y + a .* x[ind]`. https://github.com/lindahua/Devectorize.jl On Friday, May 20, 2016 at 11:04:34 AM UTC-4, vav...@uwaterloo.ca wrote: > > I'm not sure that fixed-size array solves

Re: [julia-users] Sharing methods across modules

2016-05-20 Thread Christoph Ortner
That does sound like a really nice option. No chance of getting this? On Friday, 20 May 2016 14:35:05 UTC+1, Tom Breloff wrote: > > Yes this is the best way (I think)... though part of me wishes there was > an empty module initialized in Base that could accept unsafe merging > without making

[julia-users] Re: vector assignment performance

2016-05-20 Thread vavasis
I'm not sure that fixed-size array solves the problem. For one thing, the size of the small array may not be known at compile time. For another, I don't want the small vectors necessarily to be immutable. I decided that what would really solve this problem is indicial notation. This can be

[julia-users] Re: Gadfly Geom.subplot_grid manual range

2016-05-20 Thread Hanspeter Höschle
Hi Luca, I had similar issues. This is what worked for me: sg = Geom.subplot_grid(Geom.point) sg.coord = Coord.cartesian(xmin=0) plot( d, x=:x, y=:y, color=:group, xgroup=:dist, sg, Guide.XLabel("..."), Guide.YLabel("..."), Theme(background_color=color("white"))) Somehow the attribute coord is

Re: [julia-users] Re: Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 07:14 -0700, Evan Fields a écrit : > On further inspection I think this is because I managed to name the > package repository TravelingSalesmanHeuristics.jl (rather than just > TravelingSalesmanHeuristics). Indeed I just ran > Pkg.add("TravelingSalesmanHeuristics") and

Re: [julia-users] Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 07:04 -0700, Evan Fields a écrit : > Presumably I'm doing something dumb, but I'm at a loss. I'm trying to > tag version 0.0.2 of TravelingSalesmanHeuristics in METADATA. With my > local machine up to date with the remote github repository, I run > Pkg.update() and

[julia-users] Re: Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Evan Fields
On further inspection I think this is because I managed to name the package repository TravelingSalesmanHeuristics.jl (rather than just TravelingSalesmanHeuristics). Indeed I just ran Pkg.add("TravelingSalesmanHeuristics") and now have in my .julia/v0.4 both TravelingSalesmanHeuristics and

[julia-users] Pkg.publish() : ERROR: There are no METADATA changes to publish

2016-05-20 Thread Evan Fields
Presumably I'm doing something dumb, but I'm at a loss. I'm trying to tag version 0.0.2 of TravelingSalesmanHeuristics in METADATA. With my local machine up to date with the remote github repository, I run Pkg.update() and Pkg.tag("TravelingSalesmanHeuristics.j", v"0.0.2") and get no errors.

Re: [julia-users] missing subscript

2016-05-20 Thread Yichao Yu
On Fri, May 20, 2016 at 9:51 AM, Davide Lasagna wrote: > Hi, > > Is there any particular reason why subscripts such as \_n are not defined > latex_symbols.jl? \_n is included, at least on the version of unicode used by 0.5 (and 0.4 I believe). For other ones, they are

[julia-users] missing subscript

2016-05-20 Thread Davide Lasagna
Hi, Is there any particular reason why subscripts such as \_n are not defined latex_symbols.jl? Cheers, Davide

Re: [julia-users] Sharing methods across modules

2016-05-20 Thread Tom Breloff
Yes this is the best way (I think)... though part of me wishes there was an empty module initialized in Base that could accept unsafe merging without making your own independent module. So you could do something like: module A type TA end Base.Tmp.blib(::TA) = "I come from A" end module B

[julia-users] Re: parallel computing in julia

2016-05-20 Thread Andrei Zh
In addition to what Fred said, `addprocs()` adds new workers, i.e. processes, which are not necessary bound to your CPU cores. On Friday, May 20, 2016 at 6:05:05 AM UTC+3, SHORE SHEN wrote: > > Hi > > Im doing a loop and need parallel computing. > > from the doc, it is said to "julia -p n"

[julia-users] Re: parallel computing in julia

2016-05-20 Thread Fred
To start 4 cpus : $ julia -p 3 _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.5

[julia-users] Re: parallel computing in julia

2016-05-20 Thread Fred
Hi, You have started julia and then you try to start it again with julia -p 2. just type julia -p 2 in a terminal before starting julia :) $ julia -p 2 _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation:

Re: [julia-users] Sharing methods across modules

2016-05-20 Thread Milan Bouchet-Valat
Le vendredi 20 mai 2016 à 05:53 -0700, Christoph Ortner a écrit : > I want to understand how to share methods across modules who don't > know of one another.  I understand that this is discussed in various > places; I tried to go through may issues, but in the end I didn't get > a good picture of

[julia-users] Re: moving data to workers for distributed workloads

2016-05-20 Thread Matthew Pearce
Greg, interesting suggestion about const - I should use that more. In that setup we'd still be transferring alot of big coefficient vectors around (workarounds possible).

[julia-users] Re: How is broadcast supposed to work?

2016-05-20 Thread Lutfullah Tomak
It is because promote_op(::Any, T) = (@_pure_meta; T) julia> @which Base.promote_op(sin,Int64) promote_op(::Any, T) at promotion.jl:226 julia> Base.promote_op(sin,Int64) Int64 It seems promote_op assumes that all functions that does not specialize on it return element type of array. On Friday,

[julia-users] Re: How is broadcast supposed to work?

2016-05-20 Thread Steven G. Johnson
On Friday, May 20, 2016 at 8:41:49 AM UTC-4, Scott T wrote: > > Noticed this when playing around with the new f.(x) syntax, which I > assumed would work like map. > > julia> map(sin, 3) > 0.1411200080598672 > > julia> map(sin, [3]) > 1-element Array{Float64,1}: > 0.14112 > > Map works like I'm

[julia-users] Sharing methods across modules

2016-05-20 Thread Christoph Ortner
I want to understand how to share methods across modules who don't know of one another. I understand that this is discussed in various places; I tried to go through may issues, but in the end I didn't get a good picture of what I should do now. Long post - my question in the end is: is

[julia-users] How is broadcast supposed to work?

2016-05-20 Thread Scott T
Noticed this when playing around with the new f.(x) syntax, which I assumed would work like map. julia> map(sin, 3) 0.1411200080598672 julia> map(sin, [3]) 1-element Array{Float64,1}: 0.14112 Map works like I'm used to: number goes to number, array goes to array. julia> sin.(3) # same as

[julia-users] Re: Unexpected allocations in summing an array

2016-05-20 Thread Kristoffer Carlsson
Note that you only pay the cost once per function call in your first case and not every time you access it inside the function. When x is inside the function it's type is known so everything there is fast. This is usually called a "function barrier" where you shield away your performance

[julia-users] Re: Unexpected allocations in summing an array

2016-05-20 Thread Kristoffer Carlsson
"@allocated sum_rand(length(x)) # 16" Here you access x which is a non const global variable. If you want to use global variables and have good performance, use "const". julia> const x = rand(100); julia> @allocated sum_rand(length(x)) 0

Re: [julia-users] Re: Coefficient of determination/R2/r-squared of model and accuracy of R2 estimate

2016-05-20 Thread Milan Bouchet-Valat
Le jeudi 19 mai 2016 à 19:08 -0700, Kevin Liu a écrit : > Thanks. I might need some help if I encounter problems on this pseudo > version.  I've just tagged a new 0.5.2 release, so this shouldn't be necessary now (just run Pkg.update()). Regards > > Le jeudi 19 mai 2016 à 09:30 -0700, Kevin Liu

[julia-users] Re: Unexpected allocations in summing an array

2016-05-20 Thread Darwin Darakananda
Thanks! That eliminated the extra allocations. But I'm not understanding why that works. The individual functions are not using any global variables, the array I'm passing has a concrete type, so why would the function be compiled with a heap allocated accumulator at all? Also, would this

[julia-users] Unexpected allocations in summing an array

2016-05-20 Thread Kristoffer Carlsson
Do your timings in a function.

[julia-users] Unexpected allocations in summing an array

2016-05-20 Thread Darwin Darakananda
Hello all, I'm running into some unexpected memory allocations that I'm hoping someone can help me with. Here's an example the demonstrates the problem: function sum_rand(n::Int) s = zero(Float64) for i in 1:n s += rand(Float64) end return s end sum_rand(x::Vector) =