Package edu.ucla.sspace.matrix.MatrixEntropy

Examples of edu.ucla.sspace.matrix.MatrixEntropy.EntropyStats


        MultiMap<Double,Integer> entropyToIndex =
            new BoundedSortedMultiMap<Double,Integer>(
                    columns, false, true, true);

        // Compute the entropy of each row and column.
        EntropyStats stats = MatrixEntropy.entropy(cooccurrenceMatrix);

        // Add the entropy values for each column.  Since the rows will be
        // concatenated as columns, they represent currently non-existing
        // columns beyond the number of words.
        for (int col = 0; col < words; ++col)
View Full Code Here


        int words = termToIndex.numDimensions();
        Set<Integer> colsToRetain = new HashSet<Integer>();

        // Compute the entropy of each row and column.
        EntropyStats stats = MatrixEntropy.entropy(cooccurrenceMatrix);

        // Compare the entropy of each column to the threshold and save and
        // indices that pass the threshold. Since the rows will be concatenated
        // as columns, they represent currently non-existing columns beyond the
        // number of words.
View Full Code Here

        Matrix m = new ArrayMatrix(7, 7);
        for (int r = 0; r < rawData.length; ++r)
            for (int c = 0; c < rawData[r].length; ++c)
                m.set(r, c, rawData[r][c]);

        EntropyStats stats = MatrixEntropy.entropy(m);

        // Check the length of each entropy value.
        assertEquals(rawData.length, stats.rowEntropy.length);
        assertEquals(rawData[0].length, stats.colEntropy.length);
View Full Code Here

        SparseMatrix m = new YaleSparseMatrix(7, 7);
        for (int r = 0; r < rawData.length; ++r)
            for (int c = 0; c < rawData[r].length; ++c)
                if (rawData[r][c] != 0d)
                    m.set(r, c, rawData[r][c]);
        EntropyStats stats = MatrixEntropy.entropy(m);

        // Check the length of each entropy value.
        assertEquals(rawData.length, stats.rowEntropy.length);
        assertEquals(rawData[0].length, stats.colEntropy.length);
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.matrix.MatrixEntropy.EntropyStats

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.