Skip to content

Commit

Permalink
bring up docs for 1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
cjekel committed Oct 7, 2023
1 parent fc31c41 commit 0eba2b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 30 deletions.
49 changes: 20 additions & 29 deletions docs/similaritymeasures.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ <h1 class="title">Module <code>similaritymeasures.similaritymeasures</code></h1>
<pre><code class="python">from __future__ import division
import numpy as np
from scipy.spatial import distance
from scipy.spatial import minkowski_distance
# MIT License
#
# Copyright (c) 2018,2019 Charles Jekel
Expand Down Expand Up @@ -118,16 +117,13 @@ <h1 class="title">Module <code>similaritymeasures.similaritymeasures</code></h1>
temp2 = np.cross(cd, da)
temp3 = np.cross(da, ab)
cross = np.array([temp0, temp1, temp2, temp3])
# See that cross products are greater than or equal to zero
crossTF = cross &gt;= 0
# if the cross products are majority false, re compute the cross products
# Because they don&#39;t necessarily need to lie in the same &#39;Z&#39; direction
if sum(crossTF) &lt;= 1:
# See that majority of cross products is non-positive or non-negative
# They don&#39;t necessarily need to lie in the same &#39;Z&#39; direction
if sum(cross &gt; 0) &lt; sum(cross &lt; 0):
crossTF = cross &lt;= 0
if sum(crossTF) &gt; 2:
return True
else:
return False
crossTF = cross &gt;= 0
return sum(crossTF) &gt; 2


def makeQuad(x, y):
Expand Down Expand Up @@ -524,19 +520,18 @@ <h1 class="title">Module <code>similaritymeasures.similaritymeasures</code></h1>
&#34;&#34;&#34;
n = len(exp_data)
m = len(num_data)
c = distance.cdist(exp_data, num_data, metric=&#39;minkowski&#39;, p=p)
ca = np.ones((n, m))
ca = np.multiply(ca, -1)
ca[0, 0] = minkowski_distance(exp_data[0], num_data[0], p=p)
ca[0, 0] = c[0, 0]
for i in range(1, n):
ca[i, 0] = max(ca[i-1, 0], minkowski_distance(exp_data[i], num_data[0],
p=p))
ca[i, 0] = max(ca[i-1, 0], c[i, 0])
for j in range(1, m):
ca[0, j] = max(ca[0, j-1], minkowski_distance(exp_data[0], num_data[j],
p=p))
ca[0, j] = max(ca[0, j-1], c[0, j])
for i in range(1, n):
for j in range(1, m):
ca[i, j] = max(min(ca[i-1, j], ca[i, j-1], ca[i-1, j-1]),
minkowski_distance(exp_data[i], num_data[j], p=p))
c[i, j])
return ca[n-1, m-1]


Expand Down Expand Up @@ -1710,19 +1705,18 @@ <h2 id="examples">Examples</h2>
&#34;&#34;&#34;
n = len(exp_data)
m = len(num_data)
c = distance.cdist(exp_data, num_data, metric=&#39;minkowski&#39;, p=p)
ca = np.ones((n, m))
ca = np.multiply(ca, -1)
ca[0, 0] = minkowski_distance(exp_data[0], num_data[0], p=p)
ca[0, 0] = c[0, 0]
for i in range(1, n):
ca[i, 0] = max(ca[i-1, 0], minkowski_distance(exp_data[i], num_data[0],
p=p))
ca[i, 0] = max(ca[i-1, 0], c[i, 0])
for j in range(1, m):
ca[0, j] = max(ca[0, j-1], minkowski_distance(exp_data[0], num_data[j],
p=p))
ca[0, j] = max(ca[0, j-1], c[0, j])
for i in range(1, n):
for j in range(1, m):
ca[i, j] = max(min(ca[i-1, j], ca[i, j-1], ca[i-1, j-1]),
minkowski_distance(exp_data[i], num_data[j], p=p))
c[i, j])
return ca[n-1, m-1]</code></pre>
</details>
</dd>
Expand Down Expand Up @@ -1943,16 +1937,13 @@ <h2 id="returns">Returns</h2>
temp2 = np.cross(cd, da)
temp3 = np.cross(da, ab)
cross = np.array([temp0, temp1, temp2, temp3])
# See that cross products are greater than or equal to zero
crossTF = cross &gt;= 0
# if the cross products are majority false, re compute the cross products
# Because they don&#39;t necessarily need to lie in the same &#39;Z&#39; direction
if sum(crossTF) &lt;= 1:
# See that majority of cross products is non-positive or non-negative
# They don&#39;t necessarily need to lie in the same &#39;Z&#39; direction
if sum(cross &gt; 0) &lt; sum(cross &lt; 0):
crossTF = cross &lt;= 0
if sum(crossTF) &gt; 2:
return True
else:
return False</code></pre>
crossTF = cross &gt;= 0
return sum(crossTF) &gt; 2</code></pre>
</details>
</dd>
<dt id="similaritymeasures.similaritymeasures.mae"><code class="name flex">
Expand Down
2 changes: 1 addition & 1 deletion docs/version.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>similaritymeasures.version</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">__version__ = &#34;0.7.0&#34;</code></pre>
<pre><code class="python">__version__ = &#34;1.0.0&#34;</code></pre>
</details>
</section>
<section>
Expand Down

0 comments on commit 0eba2b0

Please sign in to comment.