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:54:36 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
92d9c1f7b7b76943c329d9045c9e213c3a83fdca
92d9c1f7
1 parent
ab9db30a
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 @
92d9c1f
...
...
@@ -76,7 +76,7 @@ if __name__ == "__main__":
vectorizer
=
CountVectorizer
(
ngram_range
=
(
1
,
1
))
else
:
# Binary vectorizer
vectorizer
=
TfidfVectorizer
(
ngram_range
=
(
1
,
1
),
smooth_idf
=
False
,
norm
=
None
)
vectorizer
=
TfidfVectorizer
(
ngram_range
=
(
1
,
1
),
norm
=
None
)
matrix
=
csr_matrix
(
vectorizer
.
fit_transform
(
documents
),
dtype
=
'double'
)
print
(
' matrix.shape: '
,
matrix
.
shape
)
...
...
Please
register
or
login
to post a comment