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:55:49 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
27174a6e17474fe742ad4ae5d8811ae880ccced1
27174a6e
1 parent
92d9c1f7
Feature extraction and vectorizer three sentences
Hide 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 @
27174a6
...
...
@@ -76,7 +76,7 @@ if __name__ == "__main__":
vectorizer
=
CountVectorizer
(
ngram_range
=
(
1
,
1
))
else
:
# Binary vectorizer
vectorizer
=
TfidfVectorizer
(
ngram_range
=
(
1
,
1
)
,
norm
=
None
)
vectorizer
=
TfidfVectorizer
(
ngram_range
=
(
1
,
1
))
matrix
=
csr_matrix
(
vectorizer
.
fit_transform
(
documents
),
dtype
=
'double'
)
print
(
' matrix.shape: '
,
matrix
.
shape
)
...
...
Please
register
or
login
to post a comment