Suppose I want to calculate a simple row sum in a matrix using nested for loops but the matrix is a sparse matrix.Is there any difference in using the loops while using the sparse matrix? ]]>

Thank you for your great post! really Helpful. I am not really sure to follow the last part though.

How would you modify the following line to select row 3 and 4?

b = csr_matrix((a.data[a.indptr[3]:a.indptr[3+1]], a.indices[a.indptr[3]:a.indptr[3+1]], np.array([0,len(a.indices[a.indptr[3]:a.indptr[3+1]])])), shape=(1,n))

Many thanks.

]]>Can You help me which def should I call for the cross validation in Python, and how to use it?

Thanks ]]>

I did not understand the dependent example you gave, moreover in the labeling of second diagram when arrows were from Y to X, the name was given XY. But for arrow from X to Z, the name was XZ instead of ZX? The picture is confusing me because of this. And it would have been better if an even simpler example was used, as I did not get the dependent scenario.

Thanks! and Cheers. ]]>