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
3
votes
0 answers

Lévy metric implementation

I would like to implement (in R) the evaluation of the Lévy distance between two curves. Given two cumulative distributions, the formal definition is the following (see also Wikipedia): Essentially one is trying to find the largest square that can…
Mitch76
  • 89
  • 1
  • 8
3
votes
1 answer

R implementation of sorting by reversals

I was wondering if there is an implementation in R where it sorts a permutation of n numbers into the original 1...n sequence and provides the number of reversals needed. Eg an implementation of the "sorting by reversals" or "sorting by…
user1357015
  • 11,168
  • 22
  • 66
  • 111
2
votes
6 answers

Does anyone know a library for working with quantity/unit of measure pairs?

I would like to be able to do such things as var m1 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Pounds); var m2 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Liters); m1.ToKilograms(); m2.ToPounds(new Density(7.0,…
George Mauer
  • 117,483
  • 131
  • 382
  • 612
2
votes
2 answers

Implementation of Jaccard Distance metric in nltk.metrics.distance not consistent with the mathematical definition?

I was trying to complete an NLP assignment using the Jaccard Distance metric function jaccard_distance() built into nltk.metrics.distance, when I noticed that the results from it did not make sense in the context I would expect. When I examined the…
AKKA
  • 165
  • 4
  • 15
2
votes
0 answers

python xgboost DMatrix - get feature values or convert to np.array

I'm trying to create custom evaluation metric (feval) function for xgboost.cv. It should process some of the training features, however I can't find a way to extract features from xgboost.DMatrix() object (only labels).. Or maybe it's possible…
eyeballpaul
  • 163
  • 1
  • 10
2
votes
0 answers

ElasticSearch - Metric aggregation for any exist field

How I can find min value for any exist field? This is docs { "price": 15, "size": 14, "weight": 10 } { "price": 19, "size": 10 } { "price": 17, "size": 2 } I want find min value for any exist field. Result should be like…
Serhii Shliakhov
  • 2,631
  • 3
  • 19
  • 37
2
votes
1 answer

Unable to use MetricManager in ApplicationInsights

According to the Microsoft documentation (found here: https://learn.microsoft.com/en-us/azure/application-insights/app-insights-api-custom-events-metrics), the MetricManager class can be used in the following way: // Initially: var manager =…
TheDude
  • 1,421
  • 4
  • 29
  • 54
2
votes
0 answers

I am getting a different font height from DirectWrite font text metric than I requested as the height parameter

Can anyone explain this? Code below: // - change font size to specified point(pt) size. // - returns false if there is an error, or true otherwise. bool GraphicsDirect2D::TextSetFontSize(int size) { if (size <= 0) { assert(0 && "Error:…
Andy Good
  • 37
  • 3
2
votes
1 answer

Metric 'it_lines_cover' should not be computed by a Sensor

I've got an error during phpunit coverage report parsing with SonarQube Scanner 2.8 with following message : Metric 'it_lines_to_cover' should not be computed by a Sensor Thanks in advance, Versions : 10:42:57.262 INFO: SonarQube Scanner…
vhamon
  • 637
  • 4
  • 12
2
votes
1 answer

Metric for "similar enough" objects

Let's say we have two signal spaces S1 and S2, each containing hundreds, perhaps thousands of signals. S1 are all signals that are send or received by a given system (plane, car etc.), S2 are all signals that are send or received by software modules…
JonBlumfeld
  • 299
  • 2
  • 5
  • 20
2
votes
0 answers

CIE Delta-E 1994 Algorithm - Input Order

I have implemented the CIE Delta-E 1994 Algorithm and noticed that changing the order of the input colors changed the output. For the input colors #ff0000 and #ffffff I got ~50.2339 and ~114.5089, depending on the input order. I have checked online…
mistercake
  • 692
  • 5
  • 14
2
votes
0 answers

Collecting performance and runtime metrics in cpp

I am aware that go language has an excellent support for collecting metric data. We can visualize the data in any manner we want using handy tools like go-metrics and influxDB. I have a CPP application (similar to bitcoin) and looking for an easy…
visweshn92
  • 301
  • 1
  • 3
  • 13
2
votes
0 answers

wvdial, pppd and default route metric

I have this in wvdial.conf: [Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 Modem Type = USB Modem Phone = *99# New PPD = yes ISDN = 0 Username = foo Init1 = ATZ Password = foo Modem = /dev/ttyUSB1 Baud = 9600 Stupid Mode = 0 #Init2 = ATQ0 V1…
McKanty
  • 21
  • 5
2
votes
1 answer

Sonarqube: Is it possible to adapt duplication metric for javascript code?

At the moment the duplication metric for JavaScript Code in SonarQube code is defined as followed: “There should be at least 100 successive and duplicated tokens. Those tokens should be spread at least on 10 lines of code.” Is there a way to…
Stelos10
  • 451
  • 2
  • 6
  • 15
2
votes
2 answers

Percentage with used memory in Bosun

I've got a problem with doing a specific graph in Bosun. This graph should contain hosts with the highest memory usage in percentage, but I can't find any usable metric to do that. Of course I have os.mem.used just like os.mem.percent_free, but for…
autobus
  • 45
  • 4
1 2
3
8 9