X = np.array([[0, 1], [1, 0]])
observed = X
Y = np.array([[0,1], [1,0]])
expected = np.dot(np.atleast_2d(Y.mean(axis=0)).T,
np.atleast_2d(X.sum(axis=0)))
chisquare(observed, expected)
> (array([ 1., 1.]), array([ 0., 0.]))
>
> It may not be pretty,
On 09/04/2012 04:07 PM, Olivier Grisel wrote:
> 2012/9/4 Andreas Mueller :
>> On 09/04/2012 03:43 PM, Olivier Grisel wrote:
>>> 2012/9/4 Andreas Mueller :
Hi everybody.
I'm pretty new to feature selection stuff and I tried to use the chi2
selection.
I got a pvalue of exactly zer
2012/9/4 Andreas Mueller :
> On 09/04/2012 03:43 PM, Olivier Grisel wrote:
>> 2012/9/4 Andreas Mueller :
>>> Hi everybody.
>>> I'm pretty new to feature selection stuff and I tried to use the chi2
>>> selection.
>>> I got a pvalue of exactly zero on one of the features and one of e-250
>>> on anoth
2012/9/4 Andreas Mueller :
> On 09/04/2012 03:23 PM, Lars Buitinck wrote:
>> What did the input look like? chi2 expects frequencies, i.e. strictly
>> non-negative feature values.
>>
> The inputs were non-negative, but some >1.
That should be perfectly ok, it's designed for the kind of output that
On 09/04/2012 03:43 PM, Olivier Grisel wrote:
> 2012/9/4 Andreas Mueller :
>> Hi everybody.
>> I'm pretty new to feature selection stuff and I tried to use the chi2
>> selection.
>> I got a pvalue of exactly zero on one of the features and one of e-250
>> on another one.
>> That seems a bit fishy,
2012/9/4 Andreas Mueller :
> Hi everybody.
> I'm pretty new to feature selection stuff and I tried to use the chi2
> selection.
> I got a pvalue of exactly zero on one of the features and one of e-250
> on another one.
> That seems a bit fishy, in particular as they don't seem to correlate
> very s