Python scipy.sparse.tocsc() Examples

The following are 10 code examples of scipy.sparse.tocsc(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module scipy.sparse , or try the search function .
Example #1
Source File: matutils.py    From topical_word_embeddings with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #2
Source File: matutils.py    From topical_word_embeddings with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #3
Source File: matutils.py    From topical_word_embeddings with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #4
Source File: matutils.py    From category2vec with GNU Lesser General Public License v3.0 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #5
Source File: matutils.py    From pynlpini with GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T  # make sure shape[1]=number of docs (needed in len()) 
Example #6
Source File: matutils.py    From topical_word_embeddings with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #7
Source File: matutils.py    From topical_word_embeddings with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #8
Source File: matutils.py    From topical_word_embeddings with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #9
Source File: matutils.py    From xlinkBook with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len()) 
Example #10
Source File: matutils.py    From ohmnet with MIT License 5 votes vote down vote up
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())