Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
lcg-bioinfoI-bionlp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Carlos-Francisco Méndez-Cruz
2018-09-12 21:46:20 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
76b0e598aae062f3b1e2fd0ceb35b675d7f9ad5a
76b0e598
1 parent
25e10853
Feature extraction and vectorizer three sentences
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
representaciones-vectoriales/extraccion-caracteristicas-vectorizacion.py
representaciones-vectoriales/extraccion-caracteristicas-vectorizacion.py
View file @
76b0e59
...
...
@@ -76,7 +76,7 @@ if __name__ == "__main__":
vectorizer
=
CountVectorizer
(
ngram_range
=
(
1
,
1
))
else
:
# Binary vectorizer
vectorizer
=
TfidfVectorizer
(
ngram_range
=
(
1
,
1
))
vectorizer
=
TfidfVectorizer
(
ngram_range
=
(
1
,
1
)
,
smooth_idf
=
False
)
matrix
=
csr_matrix
(
vectorizer
.
fit_transform
(
documents
),
dtype
=
'double'
)
print
(
' matrix.shape: '
,
matrix
.
shape
)
...
...
Please
register
or
login
to post a comment