Make mnist downsizing easily configurable
This commit is contained in:
parent
e11750d54b
commit
8da828c817
|
@ -16,6 +16,10 @@ from sklearn.model_selection import GridSearchCV, train_test_split
|
|||
from sklearn.neighbors import KNeighborsClassifier
|
||||
from sklearn.utils import Bunch
|
||||
|
||||
|
||||
# Set to -1 to disable downsizing
|
||||
DOWNSIZE_MNIST: int = 8000
|
||||
|
||||
# pyqt6 only bundles Windows & Fusion styles, which means that if you use a
|
||||
# different preferred qt style, a warning would be produced. This gets rid
|
||||
# of that warning and removes the env-var override.
|
||||
|
@ -132,7 +136,10 @@ def main() -> None:
|
|||
# Working with the entire dataset would be way too computationally expensive
|
||||
# (TSNE would take hours, if not more), instead, downsize the dataset and work
|
||||
# with a smaller sample
|
||||
mnist = load_data().downsize(8000)
|
||||
if DOWNSIZE_MNIST != -1:
|
||||
mnist = load_data().downsize(DOWNSIZE_MNIST)
|
||||
else:
|
||||
mnist = load_data()
|
||||
|
||||
print()
|
||||
|
||||
|
|
Loading…
Reference in a new issue