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.

136 questions
338
votes
13 answers

Find the similarity metric between two strings

How do I get the probability of a string being similar to another string in Python? I want to get a decimal value like 0.9 (meaning 90%) etc. Preferably with standard Python and library. e.g. similar("Apple","Appel") #would have a high…
tenstar
  • 7,836
  • 8
  • 21
  • 44
24
votes
24 answers

How can you measure your skills as a programmer?

At a previous interview I have been asked the question: 'From 0 to 10, how do you rate yourself as a programmer?' I found it a very hard question to answer as I am not aware of a metric to measure how good my skills are. Moreover, knowing how well…
Marcel
  • 5,739
  • 15
  • 43
  • 52
17
votes
1 answer

log loss output is greater than 1

I prepared several models for binary classification of documents in the fraud field. I calculated the log loss for all models. I thought it was essentially measuring the confidence of the predictions and that log loss should be in the range of…
OAK
  • 2,374
  • 9
  • 26
  • 46
14
votes
2 answers

Finite Metric Embeddings: Good Algorithm?

I have a finite metric space given as a (symmetric) k by k distance matrix. I would like an algorithm to (approximately) isometrically embed this in euclidean space R^(k-1). While it is not always possible to do exactly by solving the system of…
Anthony Bak
  • 1,013
  • 2
  • 9
  • 15
14
votes
4 answers

How to get the user preferred units? (metric (meters) or imperial (miles))?

I would like to know what are the user-preferred units between miles and meters. It seems that the "Locale" class doesn't allow that.
Regis_AG
  • 11,612
  • 18
  • 85
  • 165
13
votes
5 answers

Equal Error Rate in Python

Could anybody tell me how could I compute Equal Error Rate(EER) from ROC Curve in python? In scikit-learn there is method to compute roc curve and auc but could not find the method to compute EER. from sklearn.metrics import roc_curve,…
thetna
  • 6,315
  • 23
  • 74
  • 109
11
votes
2 answers

Getting "People talking about this" metric (PTAT)

I'm using the facebook api to pull some metrics, I want to get the "talking about this" metric, I reviewd the "Stories and People talking about this" from the facebook api and I'm pulling the "page_storytellers" metric, but I see that the number…
11
votes
2 answers

Can I define an EC2 auto scale group with scaling policies without adding alarms to CloudWatch dashboard?

I followed the instructions on http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html in order to have a CPUUtilization based auto scale group. i noticed that the alarms created by mon-put-metric-alarm create…
Jan
  • 2,665
  • 6
  • 33
  • 52
10
votes
4 answers

Image sharpness metric

Is there some robust metric of image sharpness or bluriness? I have various set of images with different parameters of saturation and captured from different optical systems, and i heed to show user something like "quality" of focusing. For getting…
asaenko
  • 215
  • 1
  • 2
  • 11
9
votes
3 answers

Why is the logloss negative?

I just applied the log loss in sklearn for logistic regression: http://scikit-learn.org/stable/modules/generated/sklearn.metrics.log_loss.html My code looks something like this: def perform_cv(clf, X, Y, scoring): kf = KFold(X.shape[0],…
toom
  • 11,026
  • 22
  • 77
  • 119
8
votes
2 answers

Keras - Loss and Metric calculated differently?

I have a model in Keras which I'm optimizing the mean squared error. However, if I use the same code as in losses.py from Keras in the metric, I get a different result. Why is this? As a metric: def MSE_metric(y_true, y_pred): return…
user3126802
  • 287
  • 6
  • 18
6
votes
4 answers

Is there a way to determine the ideal number of threads?

I am doing a webcrawler and using threads to download pages. The first limiting factor to the performance of my program is the bandwidth, I can never download more pages that it can get. The second thing is what I interested. I am using threads to…
Renato Dinhani
  • 30,005
  • 49
  • 125
  • 194
6
votes
1 answer

Visualizing a single string of text in Kibana

In Kibana, I have an index that looks like as follows type (String) value (String) timestamp (Date) I would like to have a visualization that shows the most recent value field where the type is equal to "battery", for example. I would like the…
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.
  • 5,811
  • 4
  • 28
  • 69
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
  • 7,591
  • 1
  • 32
  • 66
1
2 3
9 10