radnn 0.0.5__tar.gz → 0.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {radnn-0.0.5/src/radnn.egg-info → radnn-0.0.6}/PKG-INFO +1 -1
  2. {radnn-0.0.5 → radnn-0.0.6}/pyproject.toml +1 -1
  3. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/__init__.py +2 -1
  4. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/plots/__init__.py +2 -1
  5. radnn-0.0.6/src/radnn/plots/plot_multi_scatter.py +117 -0
  6. {radnn-0.0.5 → radnn-0.0.6/src/radnn.egg-info}/PKG-INFO +1 -1
  7. {radnn-0.0.5 → radnn-0.0.6}/src/radnn.egg-info/SOURCES.txt +7 -5
  8. radnn-0.0.6/test/test_sort.py +0 -0
  9. {radnn-0.0.5 → radnn-0.0.6}/LICENSE.txt +0 -0
  10. {radnn-0.0.5 → radnn-0.0.6}/README.md +0 -0
  11. {radnn-0.0.5 → radnn-0.0.6}/setup.cfg +0 -0
  12. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/core.py +0 -0
  13. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/evaluation/__init__.py +0 -0
  14. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/evaluation/evaluate_classification.py +0 -0
  15. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/experiment/__init__.py +0 -0
  16. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/experiment/ml_experiment_config.py +0 -0
  17. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/experiment/ml_experiment_env.py +0 -0
  18. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/plots/plot_confusion_matrix.py +0 -0
  19. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/plots/plot_learning_curve.py +0 -0
  20. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/plots/plot_roc.py +0 -0
  21. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/plots/plot_voronoi_2d.py +0 -0
  22. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/__init__.py +0 -0
  23. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/__init__.py +0 -0
  24. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/csvfile.py +0 -0
  25. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/fileobject.py +0 -0
  26. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/imgfile.py +0 -0
  27. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/jsonfile.py +0 -0
  28. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/picklefile.py +0 -0
  29. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/files/textfile.py +0 -0
  30. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/filestore.py +0 -0
  31. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/filesystem.py +0 -0
  32. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/hosts/__init__.py +0 -0
  33. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/hosts/colab_host.py +0 -0
  34. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/hosts/linux_host.py +0 -0
  35. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/hosts/windows_host.py +0 -0
  36. {radnn-0.0.5 → radnn-0.0.6}/src/radnn/system/tee_logger.py +0 -0
  37. {radnn-0.0.5 → radnn-0.0.6}/src/radnn.egg-info/dependency_links.txt +0 -0
  38. {radnn-0.0.5 → radnn-0.0.6}/src/radnn.egg-info/requires.txt +0 -0
  39. {radnn-0.0.5 → radnn-0.0.6}/src/radnn.egg-info/top_level.txt +0 -0
  40. {radnn-0.0.5/tests → radnn-0.0.6/test}/test_config.py +0 -0
  41. {radnn-0.0.5/tests → radnn-0.0.6/test}/test_experiment_env.py +0 -0
  42. {radnn-0.0.5/tests → radnn-0.0.6/test}/test_filestore.py +0 -0
  43. {radnn-0.0.5/tests → radnn-0.0.6/test}/test_filesystem.py +0 -0
  44. {radnn-0.0.5/tests → radnn-0.0.6/test}/test_hosts.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: radnn
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: Rapid Deep Neural Networks
5
5
  Author-email: "Pantelis I. Kaplanoglou" <pikaplanoglou@ihu.gr>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "radnn"
3
- version = "0.0.5"
3
+ version = "0.0.6"
4
4
  description = "Rapid Deep Neural Networks"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,6 +1,7 @@
1
1
  # Version 0.0.3 [2025-01-25]
2
2
  # Version 0.0.5 [2025-01-26]
3
- __version__ = "0.0.5"
3
+ # Version 0.0.6 [2025-02-04]
4
+ __version__ = "0.0.6"
4
5
 
5
6
 
6
7
  from .system import FileStore, FileSystem
@@ -1,4 +1,5 @@
1
1
  from .plot_confusion_matrix import PlotConfusionMatrix
2
2
  from .plot_learning_curve import PlotLearningCurve
3
3
  from .plot_roc import PlotROC
4
- from .plot_voronoi_2d import PlotVoronoi2D
4
+ from .plot_voronoi_2d import PlotVoronoi2D
5
+ from .plot_multi_scatter import MultiScatterPlot
@@ -0,0 +1,117 @@
1
+ # ......................................................................................
2
+ # MIT License
3
+
4
+ # Copyright (c) 2022-2025 Pantelis I. Kaplanoglou
5
+
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+
24
+ # ......................................................................................
25
+
26
+ import numpy as np
27
+ import matplotlib.pyplot as plt
28
+ from matplotlib import cm
29
+
30
+ class MultiScatterPlot(object):
31
+ # --------------------------------------------------------------------------------------
32
+ # Constructor
33
+ def __init__(self, title, data=None, class_count=10, class_names=None):
34
+ # ................................................................
35
+ # // Fields \\
36
+ self.Title = title
37
+ self.Data = data
38
+
39
+ self.ClassCount = class_count
40
+ if class_names is not None:
41
+ self.ClassNames = class_names
42
+ self.ClassCount = len(self.ClassNames)
43
+
44
+ if (self.ClassCount <= 10):
45
+ self.ColorMap = cm.get_cmap("tab10")
46
+ elif (self.ClassCount <= 20):
47
+ self.ColorMap = cm.get_cmap("tab20")
48
+ else:
49
+ self.ColorMap = cm.get_cmap("prism")
50
+ # self.ColorMap = colors.ListedColormap(["darkorange","darkseagreen"])
51
+
52
+ self.PlotDimensions = [14, 8]
53
+ self.PointSize = 48
54
+
55
+ self.PanesPerRow = 2
56
+ if self.Data is not None:
57
+ self.Panes = len(self.Data)
58
+
59
+ self.__fig = None
60
+ self.__ax = None
61
+ # ................................................................
62
+
63
+ # --------------------------------------------------------------------------------------
64
+ def add_data(self, dataset_name, samples, labels=None):
65
+ if self.Data is None:
66
+ self.Data = []
67
+
68
+ if labels is None:
69
+ labels = np.zeros((samples.shape[0]), np.int32)
70
+ self.Data.append([dataset_name, samples, labels])
71
+ self.Panes = len(self.Data)
72
+
73
+ # --------------------------------------------------------------------------------------
74
+ def prepare(self, index, x_axis_caption, y_axis_caption):
75
+ # The 2D data for the scatter plot
76
+ sDataName, nSamples, nLabels = self.Data[index]
77
+ nXValues = nSamples[:, 0]
78
+ nYValues = nSamples[:, 1]
79
+ nLabels = nLabels
80
+
81
+ if self.__fig is None:
82
+ if self.Panes == 1:
83
+ self.__fig, self.__ax = plt.subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=False,
84
+ figsize=self.PlotDimensions)
85
+ else:
86
+ nRows = self.Panes // self.PanesPerRow
87
+ if (self.Panes % self.PanesPerRow != 0):
88
+ nRows += 1
89
+ self.__fig, self.__ax = plt.subplots(nrows=nRows, ncols=self.PanesPerRow, sharex=False, sharey=False,
90
+ squeeze=False, figsize=self.PlotDimensions)
91
+
92
+ nRow = index // self.PanesPerRow
93
+ nCol = index - (nRow * self.PanesPerRow)
94
+ oPlot = self.__ax[nCol, nRow]
95
+ oPlot.set_xlabel(x_axis_caption)
96
+ oPlot.set_ylabel(y_axis_caption)
97
+ oPlot.set_title(sDataName)
98
+
99
+ oScatter = oPlot.scatter(nXValues, nYValues, s=self.PointSize, c=nLabels, cmap=self.ColorMap)
100
+
101
+ oLegend = oPlot.legend(*oScatter.legend_elements(), loc="lower right", title="Classes", framealpha=0.4,
102
+ labelspacing=0.1)
103
+ oPlot.add_artist(oLegend)
104
+
105
+ if index == self.Panes - 1:
106
+ plt.title(self.Title)
107
+ plt.tight_layout(pad=1.01)
108
+
109
+ return self
110
+ # --------------------------------------------------------------------------------------
111
+ def save(self, filename):
112
+ plt.savefig(filename, bbox_inches='tight')
113
+ return self
114
+ # --------------------------------------------------------------------------------------
115
+ def show(self):
116
+ plt.show()
117
+ # --------------------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: radnn
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: Rapid Deep Neural Networks
5
5
  Author-email: "Pantelis I. Kaplanoglou" <pikaplanoglou@ihu.gr>
6
6
  License: MIT License
@@ -17,6 +17,7 @@ src/radnn/experiment/ml_experiment_env.py
17
17
  src/radnn/plots/__init__.py
18
18
  src/radnn/plots/plot_confusion_matrix.py
19
19
  src/radnn/plots/plot_learning_curve.py
20
+ src/radnn/plots/plot_multi_scatter.py
20
21
  src/radnn/plots/plot_roc.py
21
22
  src/radnn/plots/plot_voronoi_2d.py
22
23
  src/radnn/system/__init__.py
@@ -34,8 +35,9 @@ src/radnn/system/hosts/__init__.py
34
35
  src/radnn/system/hosts/colab_host.py
35
36
  src/radnn/system/hosts/linux_host.py
36
37
  src/radnn/system/hosts/windows_host.py
37
- tests/test_config.py
38
- tests/test_experiment_env.py
39
- tests/test_filestore.py
40
- tests/test_filesystem.py
41
- tests/test_hosts.py
38
+ test/test_config.py
39
+ test/test_experiment_env.py
40
+ test/test_filestore.py
41
+ test/test_filesystem.py
42
+ test/test_hosts.py
43
+ test/test_sort.py
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes