Is it possible to change the legend of the plot chart in mlflow metrics? - mlflow

Thanks for the development of mlflow. I love it very much.
I want to compare several runs with different hyper parameters, but I found that it is very difficult to differenciate these runs from the legend (some random numbers as the run ID) as shown in the screenshot.
I hope the legend could be set to the hyper parameters in which these runs have different values. For instance, the legend could be set to different patch size, or different learning rate, etc.
So is it possible for the current mlflow? If not, do you have the plan to develop this feature?
This question is similar with this issue. But the issue proposed to use the customed name as the legend, while I think it is better to set it as the different hyperparemeters. Or it is best to let users to choose how to set the legend.

Related

Overlapping/crowded labels on y-axis python [duplicate]

This question already has answers here:
How to change spacing between ticks
(4 answers)
Closed 5 months ago.
I'am kind of in a rush to finish this for tomorrows presentation towards the project owner. We are a small group of economic students in germany trying to figure out machine learning with python. We set up a Random Forest Classifier and are desperate to show the estimators important features in a neat plot. By applying google search we came up with the following solution that kind of does the trick, but leaves us unsatisfied due to the overlapping of the labels on the y-axis. The code we used looks like this:
feature_importances = clf.best_estimator_.feature_importances_
feature_importances = 100 * (feature_importances / feature_importances.max())
sorted_idx = np.argsort(feature_importances)
pos = np.arange(sorted_idx.shape[0])
plt.barh(pos, feature_importances[sorted_idx], align='center', height=0.8)
plt.yticks(pos, df_year_four.columns[sorted_idx])
plt.show()
Due to privacy let me say this: The feature names on the y-axis are overlapping (there are about 30 of them). I was looking into the documentation of matplotlib in order to get an understanding of how to do this by myself, unfortunately I couldn't find anything helpful. Seems like training and testing models is easier than understanding matplotlib and creating plots :D
Thank you so much for helping out and taking the time, I appreciate it.
I see your solution, and I want to just add this link here to explain why: How to change spacing between ticks in matplotlib?
The spacing between ticklabels is exclusively determined by the space between ticks on the axes. Therefore the only way to obtain more space between given ticklabels is to make the axes larger.
The question I linked shows that by making the graph large enough, your axis labels would naturally be spaced better.
You are using np.argsort that will return a numpy array with many indices. And you are using that array as labels for your Y-Axis thus there is overlapping of labels.
My suggestion will be to use an index for sorted_idx like,
plt.yticks(pos, df_year_four.columns[sorted_idx[0]])
This will plot only for 1 label.
Got it guys!
'Geistesblitz' as we say in germany! (spiritual lightening)
See the variable feature_importances in the third top row? Add feature_importnaces[:-15]
to view only the top half of the features and loosen up the y-axis. Yes!!! This does well because there are way less important features.

matplotlib.sankey: Is it possible to change/set the individual *gap* between branches for a sankey diagram

Does anyone know if it is possible in matplotlib.sankey to have individual gap sizes (matplotlib.sankey.gap) between different arrows for a subplot? i.e. difference values for gap within a single matplotlib.sankey.add instance?
Website for reference:
https://matplotlib.org/3.1.1/api/sankey_api.html?highlight=sankey%20finish#matplotlib.sankey.Sankey.add
Thanks

Using tensorflow object detection for either or detection

I have used Tensorflow object detection for quite awhile now. I am more of a user, I dont really know how it works. I am wondering is it possible to train it to recognize an object is something and not something? For example, I want to detect cracks on the tiles. Can i use object detection to do so where i show an image of a tile and it can tell me if there is a crack (and also show the location), or it will tell me if there is no crack on the tile?
I have tried to train using pictures with and without defect, using 2 classes (1 for defect and 1 for no defect). But the results keep showing both (if the picture have defect) in 1 picture. Is there a way to show only the one with defect?
Basically i would like to do defect checking. This is a simplistic case of 1 defect. but the actual case will have a few defects.
Thank you.
In case you're only expecting input images of tiles, either with defects or not, you don't need a class for no defect.
The API adds a background class for everything which is not the other classes.
So you simply need to state one class - defect, and tiles which are not detected as such are not defected.
So in your training set - simply give bounding boxes of defects, and no bounding box in case of no defect, and then your model should learn to detect the defects as mentioned above.

3D interactive graph with labels for individual points

I'm trying to graph data similarly to this, except using an actual 3rd dimension instead of color. Vis.js would have been exactly what I want, except it doesn't seem to support labels for individual points. Where can I get interactive, preferably in-browser, 3D graph visualization for this type of data?
The Graph3d of vis.js doesn't support setting labels for individual data points, but you can set tooltips, see: http://visjs.org/examples/graph3d/11_tooltips.html. Maybe that's a workable solution for you? If not, you could open a feature request for this: https://github.com/almende/vis/issues

Gnuplot fine grained ranges(grid)

I have this graph created with gnuplot
However the red line at the bottom seems like very straight due to the y-axis range although it is not (it should look like the blue one). How can make the range of the y-axis very fine grained (lots of ticks) so very small values of the red graph can be visible ? Hope I was clear thanks.
I can think of two possible solutions to your question.
Use a logarithmic scale with set logscale y. This would change the look of your plot quite a bit but you would still have all the data related to a single scale and it would most probably introduce a "higher resolution" to your red line.
Introduce a second y-axis like in this example.
As far as I know, it is not possible to increase the resolution only on a specific part of an axis. I think, this would lead to more confusion than it would do any good.

Resources