Permalink
Browse files

initial import into git

  • Loading branch information...
0 parents commit 5336d49079abd593123e85a0b26b665342aee580 @rspeer rspeer committed Apr 2, 2010
Showing with 35,443 additions and 0 deletions.
  1. +9 −0 .gitignore
  2. +27 −0 AUTHORS.txt
  3. +674 −0 COPYING.txt
  4. +112 −0 Changelog
  5. +13 −0 INSTALL.txt
  6. +1 −0 MANIFEST.in
  7. +13 −0 README.txt
  8. +1 −0 TODO.txt
  9. +2 −0 csc/__init__.py
  10. BIN csc/divisi2/.reconstruct.py.swp
  11. +16 −0 csc/divisi2/__init__.py
  12. BIN csc/divisi2/_svdlib.so
  13. +202 −0 csc/divisi2/dense.py
  14. +9 −0 csc/divisi2/exceptions.py
  15. +119 −0 csc/divisi2/export_svdview.py
  16. +36 −0 csc/divisi2/fileIO.py
  17. +102 −0 csc/divisi2/labels.py
  18. +138 −0 csc/divisi2/operators.py
  19. +403 −0 csc/divisi2/ordered_set.py
  20. +77 −0 csc/divisi2/priodict.py
  21. +146 −0 csc/divisi2/reconstruct.py
  22. +107 −0 csc/divisi2/recycling_set.py
  23. +1,485 −0 csc/divisi2/sparse.column_switch
  24. +1,577 −0 csc/divisi2/sparse.py
  25. BIN csc/divisi2/test/.DS_Store
  26. 0 csc/divisi2/test/__init__.py
  27. BIN csc/divisi2/test/eval/U_pre.pickle
  28. BIN csc/divisi2/test/eval/aspace2.coords
  29. +12,527 −0 csc/divisi2/test/eval/aspace2.names
  30. +6 −0 csc/divisi2/test/eval/aspace_all_norm.py
  31. +6 −0 csc/divisi2/test/eval/aspace_col_norm.py
  32. +6 −0 csc/divisi2/test/eval/aspace_no_norm.py
  33. +6 −0 csc/divisi2/test/eval/aspace_row_norm.py
  34. +6 −0 csc/divisi2/test/eval/aspace_setup.py
  35. BIN csc/divisi2/test/eval/concept_concept.pickle
  36. +6 −0 csc/divisi2/test/eval/identity_weight.txt
  37. +13 −0 csc/divisi2/test/eval/k_scores_norm_all.py
  38. +59 −0 csc/divisi2/test/eval/k_scores_norm_all.txt
  39. BIN csc/divisi2/test/eval/usertest_data.pickle
  40. +4,497 −0 csc/divisi2/test/eval/usertest_data.txt
  41. +17 −0 csc/divisi2/test/eval/usertest_reader.py
  42. +14 −0 csc/divisi2/test/eval/wtf.txt
  43. +19 −0 csc/divisi2/test/ordercompare.py
  44. +12 −0 csc/divisi2/test/test_dense.py
  45. +16 −0 csc/divisi2/test/test_memory_leak.py
  46. +60 −0 csc/divisi2/test/test_orderedset.py
  47. +14 −0 csc/divisi2/test/test_priodict.py
  48. +83 −0 csc/divisi2/test/test_recycling.py
  49. +108 −0 csc/divisi2/test/test_sparse.py
  50. +38 −0 csc/divisi2/test/test_svd.py
  51. +3 −0 requirements.txt
  52. +4 −0 setup.cfg
  53. +107 −0 setup.py
  54. +5 −0 svdlib/README
  55. 0 svdlib/__init__.py
  56. +9,354 −0 svdlib/_svdlib.c
  57. +324 −0 svdlib/_svdlib.pyx
  58. +1,763 −0 svdlib/las2.c
  59. +41 −0 svdlib/ll_mat.h
  60. +216 −0 svdlib/svdlib.c
  61. +112 −0 svdlib/svdlib.h
  62. +485 −0 svdlib/svdutil.c
  63. +121 −0 svdlib/svdutil.h
  64. +115 −0 svdlib/svdwrapper.c
  65. +11 −0 svdlib/svdwrapper.h
@@ -0,0 +1,9 @@
+*.pyc
+build
+Divisi2.egg-info/
+dist
+pip-log.txt
+.achievements
+.coverage
+.bzr
+.bzrignore
@@ -0,0 +1,27 @@
+Core development:
+
+ Kenneth Arnold <kcarnold@mit.edu>
+ Rob Speer <rspeer@mit.edu>
+ Jason Alonso <jbalonso@mit.edu>
+ Jesse Moeller <jmoeller@mit.edu>
+
+Theoretical work and research prototypes:
+
+ Catherine Havasi <havasi@mit.edu>
+
+CrossBridge (a structure mapping algorithm) and bug fixes:
+
+ Jayant Krishnamurthy <jayantkrishnamurthy@gmail.com>
+
+Packaging and distribution:
+
+ Andrew Farrell <afarrell@mit.edu>
+
+New features for sparse tensors:
+
+ Michael Axiak <mike@axiak.net>
+
+Also includes a priority queue implementation (priodict.py) by David Eppstein,
+UC Irvine.
+
+Please send questions to <conceptnet@media.mit.edu>.
Oops, something went wrong.
112 Changelog
@@ -0,0 +1,112 @@
+Here's a pruned version of the history; the full history, including all
+of our false starts and oops fixes, can be viewed through Bazaar or on
+Launchpad.
+
+295: Kenneth Arnold 2009-06-01 Normalized copy.
+294: Kenneth Arnold 2009-06-01 FIX tensor .magnitude function. It previously returned the square of the magnitude.
+293: Kenneth Arnold 2009-06-01 Skip the failing tensordot test; this needs an overhaul anyway.
+292: Kenneth Arnold 2009-06-01 Eventually tensors should be constructable from nested lists, not just in the test harness. This is one step in that direction.
+291: Kenneth Arnold 2009-06-01 Some test cleanups and improvements in documentation.
+290: Kenneth Arnold 2009-06-01 Document and fix a corner case (empty DenseTensors).
+289: Kenneth Arnold 2009-06-01 Use numpy's reliable scalar checks.
+288: Kenneth Arnold 2009-06-01 Fix key parameter to top_items.
+286: Kenneth Arnold 2009-05-30 Improve summarization display.
+283: Jayant Krishnamurthy 2009-05-28 renamed Graph to SemanticNetwork
+280: Jayant Krishnamurthy 2009-05-27 moved the method to build a graph out of conceptnet into CrossBridge
+279: Jayant Krishnamurthy 2009-05-27 fixed k_edge_subgraphs
+278: Jayant Krishnamurthy 2009-05-27 changed some comments
+277: Jayant Krishnamurthy 2009-05-27 created the CrossBridge class for analogies
+276: Jayant Krishnamurthy 2009-05-05 better docstrings
+275: Jayant Krishnamurthy 2009-05-05 analogy code
+272: Jayant Krishnamurthy 2009-04-12 some changes from long ago that make a view with a zero mean
+270: Kenneth Arnold 2009-04-12 Utility function to determine sparsity.
+266: Kenneth Arnold 2009-04-10 Push in some of Andrew's changes to setup.py. Still not perfect.
+265: Andrew Farrell 2009-04-01 added pyPI-compatable setup.py
+263: Ken Arnold 2009-03-19 Fix broken __contains__ across the board. Phew...
+262: Ken Arnold 2009-03-18 Clarify the last change.
+261: Ken Arnold 2009-03-18 Fix __contains__ for labeled views.
+260: Ken Arnold 2009-03-18 Test __contains__, somewhat.
+259: Kenneth Arnold 2009-03-18 Fail sensibly if the tensor is empty
+258: Kenneth Arnold 2009-03-18 Fix repr() of empty orderedset
+251: Kenneth Arnold 2009-03-17 Add selfblend example.
+249: Kenneth Arnold 2009-03-17 Fix blending factors (weight by _inverse_ variance).
+248: Kenneth Arnold 2009-03-11 Add a packed-binary file format for svdview.
+247: Kenneth Arnold 2009-03-11 Make the export_svdview method work.
+246: Kenneth Arnold 2009-03-11 New Blend class.
+241: Kenneth Arnold 2009-03-10 Make tensor repr and example_key not fail on an empty tensor
+236: Ken Arnold 2009-03-04 Add API docs (apydia on new-caledonia = hacked to work).
+235: Andrew Farrell 2009-02-27 make easy_install understand that numpy is a dependency
+234: Ken Arnold 2009-02-27 new-caledonia set up us the apidoc
+231: Kenneth Arnold 2009-02-27 Add release info.
+230: Kenneth Arnold 2009-02-27 Making Sphinx work (part 1)
+226: Kenneth Arnold 2009-02-26 You should now be able to run './setup.py apydia'. Should.
+225: Kenneth Arnold 2009-02-26 Make test_tensor_dl importable
+221: Kenneth Arnold 2009-02-26 Unify examples (temporarily out of the docs)
+218: Kenneth Arnold 2009-02-26 Clue setuptools in on the new layout, and bump the version number (we'll actually do numbered releases now).
+217: Kenneth Arnold 2009-02-26 BREAKAGE: Move the divisi package into its own subdir.
+216: Robert Speer 2009-02-26 re-ran Apydia
+213: rspeer 2009-02-24 autoblend
+212: rspeer 2009-02-10 add sampling
+
+
+Old SVN revision numbers:
+r603 | kcarnold | A hopefully robust __setstate__ for DictTensors.
+r598 | kcarnold | Move divisi.cnet to conceptnet.analogyspace. *REQUIRES NEW CSAMOA*.
+r591 | jayant | Incremental SVD
+r587 | kcarnold | Rewrite layering logic so it's less brittle.
+r567 | kcarnold | Add cmul for dense tensors, finally.
+r566 | rspeer | added export_svdview
+r545 | kcarnold | Improve adding tensors. Scalar addition now works.
+r538 | kcarnold | tf-idf view.
+r533 | kcarnold | Comprehensive Cython build and distribution fix.
+r517 | jayant | Correction to the (u,v)_angles_to methods on the SVD object
+r515 | rspeer | loads of documentation
+r509 | kcarnold | Switch from epydoc to apydia. Thanks, Rob.
+r504 | kcarnold | A reconstructed tensor that re-multiplies by the norms.
+r472 | kcarnold | Reconstructed 2D tensor.
+r469 | kcarnold | Deprecate the old SparseLabeledTensor classes in favor of constructor methods. This kills some functionality that should have been ported to the real tensor stack long ago.
+r468 | kcarnold | An iterated version of outer_tuples; should be better for memory.
+r447 | kcarnold | Common exceptions for Divisi.
+r431 | kcarnold | Don't include zero entries in the sum.
+r430 | kcarnold | Support adding tensors
+r429 | kcarnold | Remove the unnecessary indexable_set
+r422 | jayant | DictTensor slice optimization for slicing an entire row
+r421 | jayant | Modified DictTensor to store its items in nested dictionaries instead of one big dictionary with tuple keys. The change causes inserts to be 8% slower, but DictTensors use 40% less memory.
+r420 | kcarnold | Fix SVD results when we got fewer singular values than asked for.
+r412 | jayant | Fixed a bug with DictTensor's tensordot function where it would not return a scalar
+r411 | kcarnold | Make the Tensor getattr fallback more robust.
+r410 | kcarnold | Low-hanging fruit for optimization.
+r409 | kcarnold | Kill an ill-advised Abstract layer that is only slowing things down.
+r408 | kcarnold | Separate Wikipedia stuff.
+r407 | kcarnold | Update docs
+r406 | kcarnold | Remove some legacy stuff
+r404 | kcarnold | Remove unused PerspectiveSpace code.
+r403 | kcarnold | _svdlib -> divisi._svdlib.
+r399 | jayant | Made DictTensor slicing preserve the shape of the parent
+r396 | jayant | added the combine_by_element method that allows you to combine two tensors element by element
+r394 | kcarnold | Fix a serious long-standing normalization bug.
+r392 | kcarnold | Default the identities to sqrt(5) for the ConceptNet tensor, so that the norms come out as expected.
+r370 | jalonso | Repackage svdlibc using setuptools instead of autoconf.
+r356 | kcarnold | Improve test framework.
+r353 | kcarnold | Fix naming in ConceptNet: s/stem/concept/g
+r352 | jayant | Added a method for iterating over the keys along one dimension of a tensor
+r351 | jayant | Added a method to find the concepts near a specified feature
+r350 | jmoeller | Changed slicing to be the exceptional case in DictTensor
+r343 | kcarnold | rename ut to u in the SVD wrapper code.
+r339 | rspeer | major fix: made normalized SVD actually work
+r338 | rspeer | added demos
+r337 | rspeer | Make getting an unknown element of a sparse tensor not fail.
+r334 | kcarnold | Add methods for computing angles.
+r333 | kcarnold | Provide a rudimentary division support in the base Tensor class. Subclasses can do better.
+r332 | kcarnold | cnet: Handle polarity, and switch cutoff from a >= to a >
+r321 | kcarnold | Take advantage of new queryset_refactor features to let Django make the query for us.
+r317 | kcarnold | Support negating tensors.
+r314 | kcarnold | Naming fixes in cnet
+r301 | kcarnold | Make 2D explicit in the load functions.
+r300 | kcarnold | Remove obsolete load/store functions. Use pickle/cPickle instead.
+r299 | kcarnold | Remove ConceptNet2DTensor; everything is a bare function now. This incidentally removes load_cross_validation; maybe we'll restore that later.
+r298 | kcarnold | Make normalization methods use separate classes
+r297 | kcarnold | Generalize layering.
+r296 | kcarnold | Add an "averaging" normalization
+r295 | kcarnold | Make one csamoa dep optional.
+r285 | | Inital public release
@@ -0,0 +1,13 @@
+On a Debian system, the following commands should suffice to install Divisi:
+
+ sudo aptitude install python-dev python-numpy
+ ./setup.py build
+ sudo ./setup.py install
+
+Older Debian systems may require the 'python-numpy-dev' package also.
+
+We support Python 2.5 and 2.6.
+
+For a local installation (i.e., not system-wide), do instead:
+
+ ./setup.py develop
@@ -0,0 +1 @@
+include *.txt
@@ -0,0 +1,13 @@
+Divisi: a library for reasoning by analogy over semantic networks
+using the sparse singular-value decomposition.
+
+by MIT:Media Lab:Software Agents:Common Sense Computing Initiative. See
+AUTHORS.txt for a list of authors.
+
+This version of Divisi is available under the GNU General Public License,
+version 3.0. See COPYING.txt.
+
+Contact: conceptnet@media.mit.edu
+
+Website: http://divisi.media.mit.edu/
+Documentation: http://csc.media.mit.edu/docs/
@@ -0,0 +1 @@
+apparently normalize_rows is buggy
@@ -0,0 +1,2 @@
+# The following line MUST be the only line in this file, according to the setuptools docs:
+__import__('pkg_resources').declare_namespace(__name__)
Binary file not shown.
@@ -0,0 +1,16 @@
+"""
+This is the top level of the Divisi2 package, which imports some commonly-used
+functions and classes.
+"""
+
+from csc.divisi2.exceptions import Error, DimensionMismatch
+from csc.divisi2.fileIO import load, save
+from csc.divisi2.sparse import SparseMatrix, SparseVector, LabelError
+from csc.divisi2.operators import *
+from csc.divisi2.reconstruct import reconstruct, reconstruct_symmetric, reconstruct_similarity
+
+from_named_entries = SparseMatrix.from_named_entries
+from_named_lists = SparseMatrix.from_named_lists
+from_entries = SparseMatrix.from_entries
+from_lists = SparseMatrix.from_lists
+make_sparse = from_named_entries
Binary file not shown.
Oops, something went wrong.

0 comments on commit 5336d49

Please sign in to comment.