<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>structify_net.zoo.sort_core_distance &mdash; structify_net 2 documentation</title>
      <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
      <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script src="../_static/jquery.js"></script>
        <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/sphinx_highlight.js"></script>
    <script src="../_static/js/theme.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="structify_net.zoo.sort_spatial_WS" href="structify_net.zoo.sort_spatial_WS.html" />
    <link rel="prev" title="structify_net.zoo.sort_stars" href="structify_net.zoo.sort_stars.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="../index.html" class="icon icon-home">
            structify_net
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to Structify_net’s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Tutorial/Tutorial.html">Introduction to Structify_Net</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Classes.html">Classes</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../Zoo.html">Structure Zoo</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../Zoo.html#individual-models">Individual models</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_ER.html">structify_net.zoo.sort_ER</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_distances.html">structify_net.zoo.sort_distances</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_blocks_assortative.html">structify_net.zoo.sort_blocks_assortative</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_overlap_communities.html">structify_net.zoo.sort_overlap_communities</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_largest_disconnected_cliques.html">structify_net.zoo.sort_largest_disconnected_cliques</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_stars.html">structify_net.zoo.sort_stars</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">structify_net.zoo.sort_core_distance</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#structify_net.zoo.sort_core_distance"><code class="docutils literal notranslate"><span class="pre">sort_core_distance()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_spatial_WS.html">structify_net.zoo.sort_spatial_WS</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_fractal_leaves.html">structify_net.zoo.sort_fractal_leaves</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_fractal_root.html">structify_net.zoo.sort_fractal_root</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_nestedness.html">structify_net.zoo.sort_nestedness</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_fractal_hierarchical.html">structify_net.zoo.sort_fractal_hierarchical</a></li>
<li class="toctree-l3"><a class="reference internal" href="structify_net.zoo.sort_fractal_star.html">structify_net.zoo.sort_fractal_star</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../Zoo.html#function-to-get-instanciated-model-collections">function to get instanciated model collections</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Visualization.html">Visualization</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Scoring.html">Scoring</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">structify_net</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../Zoo.html">Structure Zoo</a></li>
      <li class="breadcrumb-item active">structify_net.zoo.sort_core_distance</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../_sources/generated/structify_net.zoo.sort_core_distance.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="structify-net-zoo-sort-core-distance">
<h1>structify_net.zoo.sort_core_distance<a class="headerlink" href="#structify-net-zoo-sort-core-distance" title="Permalink to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="structify_net.zoo.sort_core_distance">
<span class="sig-prename descclassname"><span class="pre">structify_net.zoo.</span></span><span class="sig-name descname"><span class="pre">sort_core_distance</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nodes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dimensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">distance</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'euclidean'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#structify_net.zoo.sort_core_distance" title="Permalink to this definition"></a></dt>
<dd><p>Rank model based on the sum of the distance of their nodes to the center of the space.</p>
<p>Core periphery structure is another well-known type of organization for complex systems. This organization is often modeled using blocks, one block being the dense core, another block, internally sparse, represent the periphery, and the density between the two blocks is set at an intermediate value. To illustrate the flexibility of the Rank approach, we propose a soft-core alternative, the coreness dissolving progressively into a periphery. To do so, we consider nodes embedded into a space, as for the spatial structure –random 1d positions by default. The node-pair rank score is computed as the inverse of the product of 3 distances: the distances from both nodes to the center, and the distance between the two nodes. As a consequence, when two nodes belong to the center, they are very likely to be connected; two nodes far from the center are unlikely to be connected, unless if they are extremely close from each other. 
[
R’(u,v)=d(W_u,W_v)d(W_u,mathbf{0})d(W_v,mathbf{0})
]
With $mathbf{0}$ the vector corresponding to the center of the location considered as the core of the space.</p>
<dl class="simple">
<dt>Args:</dt><dd><p>nodes (_type_): Describe nodes. Can be either a networkx graph (node names and node attributes are preserved) or an integer (number of nodes)
dimensions (int, optional): Number of dimensions. Defaults to 1.
distance (_type_, optional): Distance function. Defaults to euclidean.</p>
</dd>
<dt>Returns:</dt><dd><p><a class="reference internal" href="../Classes.html#structify_net.Rank_model" title="structify_net.Rank_model"><code class="xref py py-class docutils literal notranslate"><span class="pre">structify_net.Rank_model</span></code></a>:: The rank model</p>
</dd>
</dl>
</dd></dl>

</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="structify_net.zoo.sort_stars.html" class="btn btn-neutral float-left" title="structify_net.zoo.sort_stars" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="structify_net.zoo.sort_spatial_WS.html" class="btn btn-neutral float-right" title="structify_net.zoo.sort_spatial_WS" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2023, Rémy Cazabet.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>