Anyway - thinking through all the advice, what I was thinking of doing was:
np.dot(X.ravel().T, X.ravel())
Which should give me a correctly sized covariance matrix.
On Fri, Dec 14, 2012 at 6:03 PM, federico vaggi <[email protected]>wrote:
> I didn't know I could do simply average covariances. That works.
>
> On the second point though:
>
> The (n_samples, n_features) matrix is the adjacency matrix of a network.
> By calculating the covariance matrix, I was trying to find the covariance
> between all possible edges of the network - and thus I was expecting the
> resulting covariance to be of size (n_samples * n_features, n_samples,
> n_features). I have a hard time figuring out what the (n_samples,
> n_features) matrix actually represents..
>
> Federico
>
>
>
> On Fri, Dec 14, 2012 at 5:52 PM, Gael Varoquaux <
> [email protected]> wrote:
>
>> On Fri, Dec 14, 2012 at 05:51:08PM +0100, federico vaggi wrote:
>> > In this case, X is:
>>
>> > (n_samples, n_features, M_bootstrapped_iterations):
>>
>> > So I thought I could get a better estimate by taking each M-length
>> vector and
>> > calculating the covariance against every other vector, which would
>> result in a
>> > (n_samples * n_features, n_samples* n_features) sized matrix, not a
>> (n_samples,
>> > n_features) sized matrix.
>>
>> Compute an (n_features, n_features) covariance matrix for each
>> bootsrapped iteration and average them.
>>
>> G
>>
>>
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>> http://p.sf.net/sfu/logmein_12329d2d
>> _______________________________________________
>> Scikit-learn-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>
>
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general