Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-1729

Straighten out behavior of Matrix.iterator() and iterateNonEmpty()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10.2
    • None
    • None

    Description

      SparseMatrix in particular does iterateNonEmpty() instead of iterating over all rows in default iterator. This creates contract inconsistency leading to computational errors.

      so... this fixes to guarantee that

      for (row <- mxA)

      visits ALL rows in the mxA (even if they are totally empty).

      If it is ok not to process completely 0ed rows, then the following form should be used:

      for (row <- mxA.iterateNonEmpty) ...

      PR https://github.com/apache/mahout/pull/135

      Attachments

        Activity

          People

            dlyubimov Dmitriy Lyubimov
            dlyubimov Dmitriy Lyubimov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: