mirror of
https://github.com/clearml/clearml
synced 2025-03-03 02:32:11 +00:00
Add missing x/y/z axis titles to various logger report
Changed report_surface arguments
This commit is contained in:
parent
1e15b3c3fa
commit
00e66b5d63
@ -694,7 +694,7 @@ First [get the current logger](#get-the-current-logger) and then use it (see an
|
||||
**Method**:
|
||||
|
||||
```python
|
||||
def report_surface(self, title, series, matrix, iteration, xlabels=None, ylabels=None, xtitle=None, ytitle=None, camera=None, comment=None)
|
||||
def report_surface(self, title, series, matrix, iteration, xlabels=None, ylabels=None, xaxis=None, yaxis=None, camera=None, comment=None)
|
||||
```
|
||||
|
||||
**Arguments**:
|
||||
@ -784,7 +784,7 @@ def report_surface(self, title, series, matrix, iteration, xlabels=None, ylabels
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>xtitle
|
||||
<td>xaxis
|
||||
</td>
|
||||
<td>string
|
||||
</td>
|
||||
@ -804,7 +804,7 @@ def report_surface(self, title, series, matrix, iteration, xlabels=None, ylabels
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ytitle
|
||||
<td>yaxis
|
||||
</td>
|
||||
<td>string
|
||||
</td>
|
||||
|
@ -36,11 +36,11 @@ logger.report_histogram("example_histogram", "random histogram", iteration=1, va
|
||||
|
||||
# report confusion matrix
|
||||
confusion = np.random.randint(10, size=(10, 10))
|
||||
logger.report_matrix("example_confusion", "ignored", iteration=1, matrix=confusion)
|
||||
logger.report_matrix("example_confusion", "ignored", iteration=1, matrix=confusion, xaxis="title X", yaxis="title Y")
|
||||
|
||||
# report 3d surface
|
||||
logger.report_surface("example_surface", "series1", iteration=1, matrix=confusion,
|
||||
xtitle="title X", ytitle="title Y", ztitle="title Z")
|
||||
xaxis="title X", yaxis="title Y", zaxis="title Z")
|
||||
|
||||
# report 2d scatter plot
|
||||
scatter2d = np.hstack((np.atleast_2d(np.arange(0, 10)).T, np.random.randint(10, size=(10, 1))))
|
||||
|
@ -407,7 +407,7 @@ class Reporter(InterfaceBase, AbstractContextManager, SetupUploadMixin, AsyncMan
|
||||
iter=iter,
|
||||
)
|
||||
|
||||
def report_value_matrix(self, title, series, data, iter, xlabels=None, ylabels=None, comment=None):
|
||||
def report_value_matrix(self, title, series, data, iter, xtitle=None, ytitle=None, xlabels=None, ylabels=None, comment=None):
|
||||
"""
|
||||
Report a heat-map matrix
|
||||
|
||||
@ -419,6 +419,8 @@ class Reporter(InterfaceBase, AbstractContextManager, SetupUploadMixin, AsyncMan
|
||||
:type data: ndarray
|
||||
:param iter: Iteration number
|
||||
:type iter: int
|
||||
:param str xtitle: optional x-axis title
|
||||
:param str ytitle: optional y-axis title
|
||||
:param xlabels: optional label per column of the matrix
|
||||
:param ylabels: optional label per row of the matrix
|
||||
:param comment: comment underneath the title
|
||||
@ -431,6 +433,8 @@ class Reporter(InterfaceBase, AbstractContextManager, SetupUploadMixin, AsyncMan
|
||||
ylabels=ylabels,
|
||||
series=series,
|
||||
comment=comment,
|
||||
xtitle=xtitle,
|
||||
ytitle=ytitle,
|
||||
)
|
||||
|
||||
return self.report_plot(
|
||||
|
@ -262,7 +262,8 @@ class Logger(object):
|
||||
ztitle=zaxis,
|
||||
)
|
||||
|
||||
def report_confusion_matrix(self, title, series, matrix, iteration, xlabels=None, ylabels=None, comment=None):
|
||||
def report_confusion_matrix(self, title, series, matrix, iteration, xaxis=None, yaxis=None,
|
||||
xlabels=None, ylabels=None, comment=None):
|
||||
"""
|
||||
Report a heat-map matrix
|
||||
|
||||
@ -270,6 +271,8 @@ class Logger(object):
|
||||
:param str series: Series (AKA variant)
|
||||
:param np.ndarray matrix: A heat-map matrix (example: confusion matrix)
|
||||
:param int iteration: Iteration number
|
||||
:param str xaxis: optional x-axis title
|
||||
:param str yaxis: optional y-axis title
|
||||
:param list(str) xlabels: optional label per column of the matrix
|
||||
:param list(str) ylabels: optional label per row of the matrix
|
||||
:param str comment: comment underneath the title
|
||||
@ -286,12 +289,14 @@ class Logger(object):
|
||||
series=series,
|
||||
data=matrix.astype(np.float32),
|
||||
iter=iteration,
|
||||
xtitle=xaxis,
|
||||
ytitle=yaxis,
|
||||
xlabels=xlabels,
|
||||
ylabels=ylabels,
|
||||
comment=comment,
|
||||
)
|
||||
|
||||
def report_matrix(self, title, series, matrix, iteration, xlabels=None, ylabels=None):
|
||||
def report_matrix(self, title, series, matrix, iteration, xaxis=None, yaxis=None, xlabels=None, ylabels=None):
|
||||
"""
|
||||
Same as report_confusion_matrix
|
||||
Report a heat-map matrix
|
||||
@ -300,14 +305,17 @@ class Logger(object):
|
||||
:param str series: Series (AKA variant)
|
||||
:param np.ndarray matrix: A heat-map matrix (example: confusion matrix)
|
||||
:param int iteration: Iteration number
|
||||
:param str xaxis: optional x-axis title
|
||||
:param str yaxis: optional y-axis title
|
||||
:param list(str) xlabels: optional label per column of the matrix
|
||||
:param list(str) ylabels: optional label per row of the matrix
|
||||
"""
|
||||
self._touch_title_series(title, series)
|
||||
return self.report_confusion_matrix(title, series, matrix, iteration, xlabels=xlabels, ylabels=ylabels)
|
||||
return self.report_confusion_matrix(title, series, matrix, iteration,
|
||||
xaxis=xaxis, yaxis=yaxis, xlabels=xlabels, ylabels=ylabels)
|
||||
|
||||
def report_surface(self, title, series, matrix, iteration, xlabels=None, ylabels=None,
|
||||
xtitle=None, ytitle=None, ztitle=None, camera=None, comment=None):
|
||||
def report_surface(self, title, series, matrix, iteration, xaxis=None, yaxis=None, zaxis=None,
|
||||
xlabels=None, ylabels=None, camera=None, comment=None):
|
||||
"""
|
||||
Report a 3d surface (same data as heat-map matrix, only presented differently)
|
||||
|
||||
@ -315,11 +323,11 @@ class Logger(object):
|
||||
:param str series: Series (AKA variant)
|
||||
:param np.ndarray matrix: A heat-map matrix (example: confusion matrix)
|
||||
:param int iteration: Iteration number
|
||||
:param str xaxis: optional x-axis title
|
||||
:param str yaxis: optional y-axis title
|
||||
:param str zaxis: optional z-axis title
|
||||
:param list(str) xlabels: optional label per column of the matrix
|
||||
:param list(str) ylabels: optional label per row of the matrix
|
||||
:param str xtitle: optional x-axis title
|
||||
:param str ytitle: optional y-axis title
|
||||
:param str ztitle: optional z-axis title
|
||||
:param list(float) camera: X,Y,Z camera position. def: (1,1,1)
|
||||
:param str comment: comment underneath the title
|
||||
"""
|
||||
@ -337,9 +345,9 @@ class Logger(object):
|
||||
iter=iteration,
|
||||
xlabels=xlabels,
|
||||
ylabels=ylabels,
|
||||
xtitle=xtitle,
|
||||
ytitle=ytitle,
|
||||
ztitle=ztitle,
|
||||
xtitle=xaxis,
|
||||
ytitle=yaxis,
|
||||
ztitle=zaxis,
|
||||
camera=camera,
|
||||
comment=comment,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user