I am trying to create a panel that shows a value on the map. The value should show the resulting value of an accuracy assessment(for instance: ConfusionMatrix.accuracy()
). I am using the following piece of code:
var acc_val= ee.String(trainAccuracy.accuracy())
var legendTitle = ui.Label({
value: 'Overall Accuracy:'+ acc_val ,
style: {
fontSize: '18px',
margin: '0 0 4px 0',
padding: '0'
}
});
Map.add(panel);
panel.add(legendTitle);
where acc_val
should be a number or string, but it shows a long list of characters.
This is what I get:
This is what I expect:
The code is here.