Re: [scikit-learn] Adding a function that Calculates Weight of Evidence and Information Value

2016-10-05 Thread urvesh patel
Hi Andreas, You are correct about weight of evidence. Information Value is a fancy term but it is very similar to mutual information. Also, this method is used most widely with uplift random forest methodology or any incremental modeling problems where the goal is to find subset of population who

Re: [scikit-learn] wrapper for GraphCut or GridCut

2016-10-05 Thread Andreas Mueller
On 10/05/2016 11:19 AM, Jiří Borovec wrote: Hello, for the regular graph and GridCut (https://github.com/willemolding/gridcut-python), meaning regular grid like image it would be better have it in skimage, but talking about general graph, I would keep in sklearn. I disagree. Why would it be

Re: [scikit-learn] Adding a function that Calculates Weight of Evidence and Information Value

2016-10-05 Thread Andreas Mueller
Hey Urvesh. That looks interesting. We recently added mutual information based feature selection. To add this to scikit-learn, we would like to see that this is an established method, for example via citations or forks or some other way. If it's only a year old (the date of the blog post) that

Re: [scikit-learn] wrapper for GraphCut or GridCut

2016-10-05 Thread Jiří Borovec
Hello, for the regular graph and GridCut ( https://github.com/willemolding/gridcut-python), meaning regular grid like image it would be better have it in skimage, but talking about general graph, I would keep in sklearn. I think that you already have a wrapper for GraphCut ( https://github.com/amue

Re: [scikit-learn] wrapper for GraphCut or GridCut

2016-10-05 Thread Andreas Mueller
Hi Jiri. I think both are better suited for scikit-image. I think Emanuelle there is actually working on graph cut right now. I'd ask on the scikit-image mailing list what the current status is. Best, Andy On 10/05/2016 09:13 AM, Jiří Borovec wrote: Hello, I was thinking about adding GraphCut

[scikit-learn] wrapper for GraphCut or GridCut

2016-10-05 Thread Jiří Borovec
Hello, I was thinking about adding GraphCut ( http://www.csd.uwo.ca/~yuri/Papers/pami01.pdf) of GridCut ( http://www.gridcut.com/) which both of them are already implemented in C/C++ a some of then have also wrapper in Python. What is the statement to this task, having GraphCut included in this lib

Re: [scikit-learn] Identifying column names of Non-zero values

2016-10-05 Thread Startup Hire
Hi Samo, Thanks a lot. It works at a row level and I can append it a row level to the main dataframe to do further analysis. Regards, Sanant On Wed, Oct 5, 2016 at 5:05 PM, Samo Turk wrote: > Something like this might work: > > def non_zero(row, columns): > return list(columns[~(row == 0)]

Re: [scikit-learn] Identifying column names of Non-zero values

2016-10-05 Thread Maciek Wójcikowski
Hi Sanant and Samo, Even easier and faster solution: > df.columns[(df.values != 0).any(axis=0)] Or if some reason != 0 does not work for you: > df.columns[(~(df.values == 0)).any(axis=0)] Pozdrawiam, | Best regards, Maciek Wójcikowski [email protected] 2016-10-05 13:35 GMT+02:00 Sa

Re: [scikit-learn] Identifying column names of Non-zero values

2016-10-05 Thread Samo Turk
Something like this might work: def non_zero(row, columns): return list(columns[~(row == 0)]) df.apply(lambda x: non_zero(x, df.columns), axis=1) Cheers, Samo On Wed, Oct 5, 2016 at 11:58 AM, Startup Hire wrote: > Hi Pypers, > > Hope you are doing well. > > I am working on a project to fi

[scikit-learn] Identifying column names of Non-zero values

2016-10-05 Thread Startup Hire
Hi Pypers, Hope you are doing well. I am working on a project to find out the column names of non-zero values at a row level. How can this effectively done in python pandas/dataframe? For example, *Column1* *Column *2 *Column *3 Column 4 Column 5 Column 6 *Column 7* New column t