baseconstituyenteestudiantesgeneralplan_patriasala
Last change
on this file since bf37088 was
0ff122b,
checked in by rudmanmrrod <rudman22@…>, 7 años ago
|
Agregado módulo de gestión de perfiles de procesamiento, incorporado el módulo de visualización de modelado de tópicos
|
-
Propiedad mode establecida a
100644
|
File size:
671 octetos
|
Ver. | Línea | |
---|
[0ff122b] | 1 | import unittest2 as unittest |
---|
| 2 | import numpy as np |
---|
| 3 | |
---|
| 4 | from vsm.model.lsa import Lsa |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | class TestLsa(unittest.TestCase): |
---|
| 8 | |
---|
| 9 | def setUp(self): |
---|
| 10 | |
---|
| 11 | self.tfidf_mat = np.array(\ |
---|
| 12 | [[2.0794415, 1.3862944, 0], |
---|
| 13 | [0.86304623, 0.28768209, 0.28768209], |
---|
| 14 | [np.inf, np.inf, np.inf], |
---|
| 15 | [0, 0, 0]]) |
---|
| 16 | self.eigenvalues = np.array(\ |
---|
| 17 | [ 0.35270742, 2.65176495]) |
---|
| 18 | self.doc_matrix = np.array([0.314334, 0.023485]) |
---|
| 19 | |
---|
| 20 | #TODO: Write some actual unit tests for this module |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | #Define and run test suite |
---|
| 24 | suite = unittest.TestLoader().loadTestsFromTestCase(TestLsa) |
---|
| 25 | unittest.TextTestRunner(verbosity=2).run(suite) |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.