:py:mod:`src.wsi.cluster_wsbm`
==============================

.. py:module:: src.wsi.cluster_wsbm


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   src.wsi.cluster_wsbm.ClusterWSBM



Functions
~~~~~~~~~

.. autoapisummary::

   src.wsi.cluster_wsbm._nxgraph_to_graphtoolgraph
   src.wsi.cluster_wsbm._minimize



.. py:function:: _nxgraph_to_graphtoolgraph(graph: networkx.Graph)

   Convert a networkx graph to a graphtool graph.

   :param graph: The graph to convert
   :type graph: nx.Graph
   :return: The converted graph
   :rtype: graphtool.Graph
           


.. py:function:: _minimize(graph: graph_tool.Graph, distribution: str) -> graph_tool.inference.blockmodel.BlockState

   Minimize the graph using the given distribution as described by graph-tool.

   :param graph: The graph to minimize
   :type graph: graph_tool.Graph
   :param distribution: The distribution to use for the WSBM algorithm.
   :type distribution: str
   :return: The minimized graph as BlockState object.
   :rtype: BlockState
           


.. py:class:: ClusterWSBM


   Bases: :py:obj:`src.wsi.model.WSIModel`

   .. py:attribute:: distribution
      :type: Literal[real-exponential, discrete-poisson, discrete-geometric, discrete-binomial, real-normal]

      

   .. py:method:: predict(uses: list[src.use.Use]) -> list[int]



