Skip to content

Commit

Permalink
adding 1000 samples to data
Browse files Browse the repository at this point in the history
  • Loading branch information
markolalovic committed Jul 9, 2024
1 parent eb7763e commit dfdc6c4
Show file tree
Hide file tree
Showing 30 changed files with 80 additions and 75 deletions.
Binary file added data/X_1000.npy
Binary file not shown.
Binary file added data/y_1000.npy
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions demo/fix-isssues.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tda-digits-example</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<body>
<div id="chart-window"></div>
<div id="slider">
<p class="text">
<strong>Select threshold value:</strong>
</p>
<input
type="range"
step="1"
min="0"
max="22"
value="0"
id="range-input"
/>
</div>
<div class="alignright">
Read more about this in:
<a href="https://lalovic.io/blog/tda-digits/">blog post</a>
</div>
<script src="./digitGraphData.json"></script>
<script src="./layoutRect.js"></script>
<script src="./appendImages.js"></script>
<script src="./digitGraph.js"></script>
<script src="./bettiBarcodes.js"></script>
<script src="./functions.js"></script>
<script src="./main.js"></script>
</body>
</html>
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
38 changes: 38 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="description" content="Example of extracting topological features"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tda-digits-example</title>
<link rel="stylesheet" href="style.css">
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<body>
<div id="chart-window"></div>
<div id="slider">
<p class="text">
<strong>Select threshold value:</strong>
</p>
<input
type="range"
step="1"
min="0"
max="22"
value="0"
id="range-input"
/>
</div>
<div class="alignright">
Read more about this demo in:
<a href="https://lalovic.io/blog/tda-digits/">blog post</a>
</div>
<script src="./digitGraphData.json"></script>
<script src="./layoutRect.js"></script>
<script src="./appendImages.js"></script>
<script src="./digitGraph.js"></script>
<script src="./bettiBarcodes.js"></script>
<script src="./functions.js"></script>
<script src="./main.js"></script>
</body>
</html>
File renamed without changes.
File renamed without changes.
8 changes: 1 addition & 7 deletions style.css → demo/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
body {
margin-top: 30px;
text-align:center;
font-family: "Computer Modern Sans", sans-serif;
text-align: center;
font-size: 20px;
}

Expand Down Expand Up @@ -30,8 +29,3 @@ input {
font-size: 24px;
padding: 0px 17px 0px 7px;
}

.padding2 {
font-size: 24px;
padding: 0px 17px 0px 7px;
}
Binary file removed favicon.ico
Binary file not shown.
Binary file removed figures/animation/anim-compressed.gif
Binary file not shown.
10 changes: 0 additions & 10 deletions figures/animation/clean-files.sh

This file was deleted.

3 changes: 0 additions & 3 deletions figures/animation/compress-gif.sh

This file was deleted.

6 changes: 0 additions & 6 deletions figures/animation/convert-svg-to-png.sh

This file was deleted.

5 changes: 0 additions & 5 deletions figures/animation/crop_all.sh

This file was deleted.

3 changes: 0 additions & 3 deletions figures/animation/optimize-gif.sh

This file was deleted.

5 changes: 0 additions & 5 deletions figures/animation/pngs-to-gif.sh

This file was deleted.

34 changes: 0 additions & 34 deletions index.html

This file was deleted.

4 changes: 3 additions & 1 deletion scripts/prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
from sklearn.datasets import fetch_openml
import sys

n_samples = 10000
# better use: n_samples = 10000
n_samples = 1000

if len(sys.argv) == 2:
print('Setting n_samples to: %i' % (n_samples))
n_samples = int(sys.argv[1])
Expand Down
3 changes: 2 additions & 1 deletion src/tda_digits.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

from drawing_module import *

n_samples = 10000 # number of loaded MNIST handwritten digits
# better use: n_samples = 10000
n_samples = 1000 # number of loaded MNIST handwritten digits
if len(sys.argv) == 2:
print('Setting n_samples to: %i' % (n_samples))
n_samples = int(sys.argv[1])
Expand Down

0 comments on commit dfdc6c4

Please sign in to comment.