You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<td><p>Create a <codeclass="docutils literal notranslate"><spanclass="pre">pandas.DataFrame</span></code> from this <codeclass="docutils literal notranslate"><spanclass="pre">PairwiseMatrix</span></code>.</p></td>
930
+
<td><p>Create a pandasDataFrame from this matrix.</p></td>
Copy file name to clipboardExpand all lines: docs/dev/generated/skbio.stats.distance.DistanceMatrix.condensed_form.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -703,7 +703,7 @@
703
703
<h1>skbio.stats.distance.DistanceMatrix.condensed_form<aclass="headerlink" href="#skbio-stats-distance-distancematrix-condensed-form" title="Link to this heading">#</a></h1>
<spanclass="sig-prename descclassname"><spanclass="pre">DistanceMatrix.</span></span><spanclass="sig-name descname"><spanclass="pre">condensed_form</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/scikit-bio/scikit-bio/blob/main/skbio/stats/distance/_base.py#L1826"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#skbio.stats.distance.DistanceMatrix.condensed_form" title="Link to this definition">#</a></dt>
706
+
<spanclass="sig-prename descclassname"><spanclass="pre">DistanceMatrix.</span></span><spanclass="sig-name descname"><spanclass="pre">condensed_form</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference external" href="https://github.com/scikit-bio/scikit-bio/blob/main/skbio/stats/distance/_base.py#L1803"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#skbio.stats.distance.DistanceMatrix.condensed_form" title="Link to this definition">#</a></dt>
707
707
<dd><p>Return an array of distances in condensed format.</p>
<p>A <codeclass="docutils literal notranslate"><spanclass="pre">DistanceMatrix</span></code> is a <codeclass="docutils literal notranslate"><spanclass="pre">SymmetricMatrix</span></code> with the additional requirement that
706
+
the matrix data is hollow (i.e., diagonal is zero). There are additional methods
707
+
made available that take advantage of this hollowness.</p>
<dt><strong>data</strong><spanclass="classifier">array_like or PairwiseMatrix</span></dt><dd><p>Square, hollow, two-dimensional <codeclass="docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code> of distances
714
-
(floats), or a structure that can be converted to a <codeclass="docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code>
715
-
using <codeclass="docutils literal notranslate"><spanclass="pre">numpy.asarray</span></code> or a one-dimensional vector of distances
716
-
(floats), as defined by <aclass="reference external" href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.squareform.html">scipy.spatial.distance.squareform</a>.
717
-
Can instead be a <cite>PairwiseMatrix</cite> (or <cite>DistanceMatrix</cite>) instance, in which case
718
-
the instance’s data will be used. Data will be converted to a float <codeclass="docutils literal notranslate"><spanclass="pre">dtype</span></code>
719
-
if necessary. A copy will <em>not</em> be made if already a <codeclass="docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code> with a
<dt><strong>data</strong><spanclass="classifier">1-D or 2-D array_like, or PairwiseMatrix</span></dt><dd><p>A square 2-D array of pairwise distances between objects, or a 1-D array
712
+
representing its condensed form. Can instead be an instance of
713
+
<codeclass="docutils literal notranslate"><spanclass="pre">PairwiseMatrix</span></code> or its subclass, in which case its data and IDs will be
714
+
directly used.</p>
721
715
</dd>
722
-
<dt><strong>ids</strong><spanclass="classifier">sequence of str, optional</span></dt><dd><p>Sequence of strings to be used as object IDs. Must match the number of
723
-
rows/cols in <cite>data</cite>. If <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>(the default), IDs will be
724
-
monotonically-increasing integers cast as strings, with numbering
725
-
starting from zero, e.g., <codeclass="docutils literal notranslate"><spanclass="pre">('0',</span><spanclass="pre">'1',</span><spanclass="pre">'2',</span><spanclass="pre">'3',</span><spanclass="pre">...)</span></code>.</p>
716
+
<dt><strong>ids</strong><spanclass="classifier">sequence of str, optional</span></dt><dd><p>IDs of the objects. Must match the number of rows/columns in <codeclass="docutils literal notranslate"><spanclass="pre">data</span></code>. If None
717
+
(default) and <codeclass="docutils literal notranslate"><spanclass="pre">data</span></code>does not contain IDs, IDs will be
718
+
monotonically-increasing integers cast as strings, starting from zero (i.e.,
719
+
‘0’, ‘1’, ‘2’, ‘3’, …).</p>
726
720
</dd>
727
-
<dt><strong>validate</strong><spanclass="classifier">bool, optional</span></dt><dd><p>If <cite>validate</cite> is <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code> (the default) and data is not a
728
-
DistanceMatrix object, the input data will be validated.</p>
721
+
<dt><strong>validate</strong><spanclass="classifier">bool, optional</span></dt><dd><p>If True (default) and <codeclass="docutils literal notranslate"><spanclass="pre">data</span></code> is not a <codeclass="docutils literal notranslate"><spanclass="pre">DistanceMatrix</span></code> object, the input
722
+
data will be validated.</p>
723
+
</dd>
724
+
<dt><strong>condensed</strong><spanclass="classifier">bool, optional</span></dt><dd><p>Store the data in a 2-D redundant form (False, default) or a 1-D condensed form
725
+
(True).</p>
726
+
</dd>
727
+
<dt><strong>diagonal</strong><spanclass="classifier">1-D array_like or float, optional</span></dt><dd><p>Values along the diagonal of the matrix. Must be zero. This parameter is a
728
+
placeholder for interface compatibility with <codeclass="docutils literal notranslate"><spanclass="pre">SymmetricMatrix</span></code>.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">DistanceMatrix</span></code> only requires that the distances it stores are symmetric and
746
746
hollow. Checks are <em>not</em> performed to ensure the other three metric properties
747
747
hold (non-negativity, identity of indiscernibles, and triangle inequality)
748
-
<aclass="reference internal" href="#r8212bb0c75ea-2" id="id2">[2]</a>. Thus, a <cite>DistanceMatrix</cite> instance can store distances that are not
748
+
<aclass="reference internal" href="#r8212bb0c75ea-2" id="id2">[2]</a>. Thus, a <codeclass="docutils literal notranslate"><spanclass="pre">DistanceMatrix</span></code> instance can store distances that are not
<td><p>Create a <codeclass="docutils literal notranslate"><spanclass="pre">pandas.Series</span></code> from this <codeclass="docutils literal notranslate"><spanclass="pre">DistanceMatrix</span></code>.</p></td>
798
+
<td><p>Create a pandasSeries from this <codeclass="docutils literal notranslate"><spanclass="pre">DistanceMatrix</span></code>.</p></td>
<td><p>Create a <codeclass="docutils literal notranslate"><spanclass="pre">pandas.DataFrame</span></code> from this <codeclass="docutils literal notranslate"><spanclass="pre">PairwiseMatrix</span></code>.</p></td>
837
+
<td><p>Create a pandasDataFrame from this matrix.</p></td>
0 commit comments