Re: [go-nuts] Multi Variable Linear Regression (with r squared and p values)

2016-07-23 Thread Vineet Jain
As an example: https://github.com/sajari/regression/blob/master/regression.go You can get the final R**2 but not by each variable and there is no p-value. On Saturday, July 23, 2016 at 5:38:42 PM UTC-4, Michael Jones wrote: > > Surely this calculation is part of that regression module or a

[go-nuts] Creating a symbolic link to a Go project folder

2016-07-23 Thread randall
Hello! Is the following a bad practice? Can it cause issues with the Go tool set? - my *GOPATH* is set to *$HOME* - I have Go code in a git repo named *~/src/github.com/my-user/my-project* - I have a project folder with notes, todo's and other reference files named

Re: [go-nuts] Will go compiler do optimization here if "bytes" is a global variable?

2016-07-23 Thread 'Keith Randall' via golang-nuts
This was a concern when we originally implemented the m[string(b)] optimization. If someone is simultaneously modifying b, then weird things happen during the lookup. But it won't crash anything, just maybe not return what you expect. And that's ok in cases of a data race, the spec makes no

[go-nuts] Re: ANNOUNCE: gini

2016-07-23 Thread James Pirruccello
This seems incredibly useful. I wonder if you'd consider creating an example project as a demonstration, showing what import path we should be using and very basic operation -- I think it would help get interested people onboard quickly. Thanks for considering! - James On Saturday, July 23,

Re: [go-nuts] Multi Variable Linear Regression (with r squared and p values)

2016-07-23 Thread Michael Jones
Surely this calculation is part of that regression module or a dependent module. On Jul 23, 2016 11:50 AM, wrote: > I'm trying to port over some code using linear regression (statsmodule > package) in python to golang. I need the library to give me r square and p > values

Re: [go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread Lars Seipel
On Sat, Jul 23, 2016 at 08:36:03AM -0700, Tamás Gulácsi wrote: > Yes, you have to normalize your String to be able to count the runes, and > have that be the count of characters. That would only work if there was a precomposed form for every possible combining character sequence, which is not

Re: [go-nuts] Will go compiler do optimization here if "bytes" is a global variable?

2016-07-23 Thread 'Axel Wagner' via golang-nuts
The answer, I think, is yes. Because the only way, that any modification of bytes can occur, is if there's a race and in the case of a race (hehe) all bets are off anyway. I also see no reason for the scope of bytes to have any influence on it, as races can also occur with variables in local

Re: [go-nuts] Will go compiler do optimization here if "bytes" is a global variable?

2016-07-23 Thread Jan Mercl
On Sat, Jul 23, 2016 at 9:03 PM T L wrote: > If "bytes" is a local variable, it is reasonable the compiler will do the optimization. > But how about if "bytes" is a global variable? Not sure what a global variable is. Go has universe scope, but user code cannot declare

[go-nuts] Will go compiler do optimization here if "bytes" is a global variable?

2016-07-23 Thread T L
http://go-talks.appspot.com/github.com/davecheney/presentations/writing-high-performance-go.slide#30 the above slide says "the conversion of the byte slice to a string" in the following case will no copy the underlining byte array. > var m = map[string]string{} > v, ok := m[string(bytes)] > >

[go-nuts] Multi Variable Linear Regression (with r squared and p values)

2016-07-23 Thread webuser1200
I'm trying to port over some code using linear regression (statsmodule package) in python to golang. I need the library to give me r square and p values for each coefficient/variable. Is there such a library in golang or c (that I can write bindings for)? WU -- You received this message

[go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread T L
Thanks for the information! On Saturday, July 23, 2016 at 11:55:42 PM UTC+8, Manlio Perillo wrote: > > Il giorno sabato 23 luglio 2016 16:52:29 UTC+2, T L ha scritto: >> >> len(str) will get the count of bytes. >> >> utf8.RuneCountInString(str) will get the count of runes. >> >> but how to get

[go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread Manlio Perillo
Il giorno sabato 23 luglio 2016 16:52:29 UTC+2, T L ha scritto: > > len(str) will get the count of bytes. > > utf8.RuneCountInString(str) will get the count of runes. > > but how to get the count of characters? > The term "character" may be used to refer to a "grapheme cluster". How to find

[go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread Tamás Gulácsi
Yes, you have to normalize your String to be able to count the runes, and have that be the count of characters. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread T L
On Saturday, July 23, 2016 at 11:04:44 PM UTC+8, Matt Silverlock wrote: > > https://blog.golang.org/strings > > utf8.RuneCountInString is about as close as you will get. Do you have an > example string that is not meeting expectations? > I forgot in which article (an official one) that says

[go-nuts] Re: Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread Matt Silverlock
https://blog.golang.org/strings utf8.RuneCountInString is about as close as you will get. Do you have an example string that is not meeting expectations? On Saturday, July 23, 2016 at 7:52:29 AM UTC-7, T L wrote: > > len(str) will get the count of bytes. > > utf8.RuneCountInString(str) will

[go-nuts] Is there a standard lib function which will return the count of characters in a string?

2016-07-23 Thread T L
len(str) will get the count of bytes. utf8.RuneCountInString(str) will get the count of runes. but how to get the count of characters? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

Re: [go-nuts] Optional params (RPC)

2016-07-23 Thread 'Axel Wagner' via golang-nuts
I think pointers are a good way to do it. An alternative is shown by the sql-package: https://godoc.org/database/sql#NullString Though it kind of depends on what your serialization layer provides. On Sat, Jul 23, 2016 at 3:02 AM, 'Mihai B' via golang-nuts < golang-nuts@googlegroups.com> wrote: >