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
471
votes
16 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
  • 9,816
  • 9
  • 24
  • 45
24
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,994
  • 9
  • 36
  • 49
18
votes
6 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,903
  • 26
  • 79
  • 113
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,123
  • 3
  • 10
  • 16
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.
toto_tata
  • 14,526
  • 27
  • 108
  • 198
12
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
  • 12,864
  • 27
  • 89
  • 128
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
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
  • 235
  • 1
  • 2
  • 11
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,803
  • 6
  • 36
  • 57
9
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
  • 419
  • 8
  • 19
7
votes
0 answers

Sklearn KNeighborsRegressor custom distance metrics

I am using KNeighborsRegressor, but I would like to use it with custom distance function. My training set is pandas DataFrame which looks like: week_day hour minute temp humidity 0 1 9 0 1 1 1 9 0 …
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
  • 35,057
  • 55
  • 139
  • 199
6
votes
1 answer

PAPI: what does Clock reference cycles mean?

i am using PAPI liberary to tune and profile my application. I want to know what (PAPI_REF_CYC : Reference clock cycles ) means actually? Thanks in advance,
abdul
  • 75
  • 5
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
2 answers

Shrew Soft VPN Client: Route Metric

After connecting to the business network I have no internet access. route print shows: IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway …
discipulus
  • 311
  • 4
  • 12
1
2 3
8 9