Questions tagged [metric]

Quoting Wikipedia:

In mathematics, a metric or distance function is a function that defines a distance between each pair of elements of a set. A set with a metric is called a metric space. A metric induces a topology on a set, but not all topologies can be generated by a metric. A topological space whose topology can be described by a metric is called metrizable.

is used in any kind of question related to compute, define, choose a metric, and such.

134 questions
6
votes
1 answer

Simple metric for difference of color in OpenCV?

I have two cv::Scalar objects and I want to calculate the color difference. I came up with this code: cv::Scalar a(255, 128, 255); // color 1 cv::Scalar b(100, 100, 100); // color 2 cv::Scalar d = b - a; double distance = sqrtl(d[0]*d[0] +…
Daniel S.
  • 6,458
  • 4
  • 35
  • 78
6
votes
8 answers

fast similarity detection

I have a large collection of objects and I need to figure out the similarities between them. To be exact: given two objects I can compute their dissimilarity as a number, a metric - higher values mean less similarity and 0 means the objects have…
reinierpost
  • 8,425
  • 1
  • 38
  • 70
5
votes
2 answers

Why do we use metric learning when we can classify

So far, I have read some highly cited metric learning papers. The general idea of such papers is to learn a mapping such that mapped data points with same label lie close to each other and far from samples of other classes. To evaluate such…
Sepehr
  • 51
  • 2
4
votes
1 answer

Mean Average Precision for Multi-Label Multi-Class Data

I am trying to write a code for computing the Mean Average Precision (MAP) for multi-label data. To give a more intuitive understanding kindly please look below I have written the code for the MAP computation in MATLAB but it is quite slow.…
roni
  • 1,443
  • 3
  • 28
  • 49
4
votes
1 answer

pheatmap default distance metric R

I need to make a heatmap with the function 'pheatmap', using UPGMA and 1-pearson correlation as distance metric. My professor claims this is the default distance metric, although in my case it uses 'Euclidian' as distance metric. Is euclidian and 1…
Sam Vanbergen
  • 145
  • 3
  • 11
4
votes
2 answers

Stackdriver Dashboard - Cannot save a dashboard with a custom log-based metric

I have created a log-based metric for some log messages generated by a Dataflow Job. The filter on which this metric is based is behaving correctly (the expected data is displayed in the logs viewer when using this filter). I am trying to create a…
4
votes
1 answer

Jmeter Body of PUT request Bytes throughput Over Time

My goal is to get Bytes throughput Over Time metric more accurate. General sense of my load test: Load files with a GET HTTP request from localhost, save content of files as different variables like ContentVar. Start PUT loop. Place ${ContentVar}…
3
votes
2 answers

Keras predict gives different error than evaluate, loss different from metrics

I have the following problem: I have an autoencoder in Keras, and train it for a few epochs. The training overview shows a validation MAE of 0.0422 and an MSE of 0.0024. However, if I then call network.predict and manually calculate the validation…
JJ Willems
  • 81
  • 6
3
votes
0 answers

How to create a custom metric in TfLearn or TensorFlow?

TensorFlow offers many common evaluation metrics, but I don't know how to create my own metric. I'm building a CNN model based on AlexNet for grasp detection and I want to use the rectangle metric when evaluating the data (like in this paper:…
3
votes
0 answers

Memory usage metric identifier Google Compute Engine

I have installed the monitoring agent in my instance group disk. I need to autoscale instances based on memory usage, however when I am going to configure the target metric in GCE web console I miss the memory usage metric identifier. Which is the…
lmove
  • 317
  • 3
  • 11
3
votes
3 answers

what is the fastest way to get performance metrics of all spring services?

what is the fastest way to get performance metrics of all spring services?
egervari
  • 22,372
  • 32
  • 121
  • 175
3
votes
1 answer

How to use user defined metric in KernelDensity from scikit-learn (python)

I'm using scikit-learn (0.14) and trying to implement a user defined metric for my KernelDensity estimation. Following code is an example how my code is structured: def myDistance(x,y): return np.sqrt(sum((x -…
user4720834
3
votes
0 answers

Dropwizard/Jersey custom method annotation for Metric purpose

Does anyone knows how to create a custom annotation, what measures for example the amount of incoming String array parameters? Something like this: @POST @Timed @ExceptionMetered @MeasureArray public Response postJob(String[] array) { …
user3280180
  • 1,393
  • 1
  • 11
  • 27
3
votes
0 answers

Fast rdist replacement in R accepting custom distance metric

I have to calculate the pairwise distances of two-dimensional points. These points are stored in a matrix, the first column containing the x values, the second column the y values. The distance function I need is not the euclidean metric though, but…
z80crew
  • 1,150
  • 1
  • 11
  • 20
3
votes
0 answers

Lévy distance between two empirical CDFs using R

I'm trying to measure the distance between two empirical CDFs generated by the same random variable but with different parameters. In order to do this, I would like to use the Lévy distance given by: Latex: $L(F,G):=\inf\{\varepsilon…
1
2
3
8 9