コード例 #1
0
 def mmGetPlotUnionSDRDutyCycle(self, title="Union SDR Duty Cycle"):
   """
   @return (Plot) Plot of union SDR duty cycle.
   """
   plot = Plot(self, title)
   unionSDRDutyCycle = self.mmGetDataUnionSDRDutyCycle()
   plot.addGraph(sorted(unionSDRDutyCycle, reverse=True),
                 position=211,
                 xlabel="Union SDR Bit", ylabel="Duty Cycle")
   plot.addHistogram(unionSDRDutyCycle,
                     position=212,
                     bins=len(unionSDRDutyCycle) / 10,
                     xlabel="Duty Cycle", ylabel="# Union SDR Bits")
   return plot
コード例 #2
0
  def mmGetPlotConnectionsPerColumn(self, title=None):
    """
    Returns plot of # connections per column.

    @return (Plot) plot
    """
    plot = Plot(self, title)
    plot.addGraph(sorted(self._connectedCounts.tolist(), reverse=True),
                  position=211,
                  xlabel="column", ylabel="# connections")
    plot.addHistogram(self._connectedCounts.tolist(),
                      position=212,
                      bins=len(self._connectedCounts) / 10,
                      xlabel="# connections", ylabel="# columns")
    return plot
コード例 #3
0
  def mmGetPlotConnectionsPerColumn(self, title=None):
    """
    Returns plot of # connections per column.

    @return (Plot) plot
    """
    plot = Plot(self, title)
    plot.addGraph(sorted(self._connectedCounts.tolist(), reverse=True),
                  position=211,
                  xlabel="column", ylabel="# connections")
    plot.addHistogram(self._connectedCounts.tolist(),
                      position=212,
                      bins=len(self._connectedCounts) / 10,
                      xlabel="# connections", ylabel="# columns")
    return plot
コード例 #4
0
 def mmGetPlotBitlife(self, title="Bitlife Statistics"):
   """
   @return (Plot) Plot of bitlife statistics.
   """
   plot = Plot(self, title)
   bitlife = self.mmGetDataBitlife()
   print bitlife
   plot.addGraph(sorted(bitlife, reverse=True),
                 position=211,
                 xlabel="Union SDR Bit", ylabel="Bitlife")
   plot.addHistogram(bitlife,
                     position=212,
                     bins=max(len(bitlife) / 10, 3),
                     xlabel="Bitlife", ylabel="# Union SDR Bits")
   return plot
コード例 #5
0
 def mmGetPlotDistinctness(self, title="Distinctiness", showReset=False,
                           resetShading=0.25):
   """
   Returns plot of the overlap metric between union SDRs between sequences.
   @param title an optional title for the figure
   @return (Plot) plot
   """
   plot = Plot(self, title)
   self._mmComputeSequenceRepresentationData()
   data = self._mmData["distinctnessConfusion"]
   plot.addGraph(sorted(data, reverse=True),
                 position=211,
                 xlabel="Time steps", ylabel="Overlap")
   plot.addHistogram(data,
                     position=212,
                     bins=100,
                     xlabel="Overlap", ylabel="# time steps")
   return plot
コード例 #6
0
  def mmGetPlotConnectionsPerColumn(self, title="Connections per Columns"):
    """
    Returns plot of # connections per column.

    @return (Plot) plot
    """
    plot = Plot(self, title)
    connectedCounts = numpy.ndarray(self.getNumColumns(), dtype=uintType)
    self.getConnectedCounts(connectedCounts)

    plot.addGraph(sorted(connectedCounts.tolist(), reverse=True),
                  position=211,
                  xlabel="column", ylabel="# connections")

    plot.addHistogram(connectedCounts.tolist(),
                      position=212,
                      bins=len(connectedCounts) / 10,
                      xlabel="# connections", ylabel="# columns")
    return plot