0
$\begingroup$

I'm trying to find the most similar sample between a candidate and a bag of samples.

Consider you have a knowledge corpus as follows:

corpus = data.frame(region = factor(), time = numeric(), observation = numeric())
corpus = rbind(corpus, data.frame(region = 'america', time = 1:20, observation = rnorm(20)))
corpus = rbind(corpus, data.frame(region = 'asia', time = 1:20, observation = rnorm(20)))
corpus = rbind(corpus, data.frame(region = 'europe', time = 1:20, observation = rnorm(20)))

Now I have a new sample and I want to choose from my knowledge base, which of the records is the most similar to my new sample.

I used different metrics with not so much improvements between them:

  • Euclidian
  • Cosine
  • Correlations

But what I really want to see is that the matching is done based on the shape of the curve not in vectorial distance but I have no clues about similarity functions that would metric this type of space.

*Edit: I want to match my new sample with the "closest" element in my knowledge base. But what I want is to have a match using the shape of the curve to compare the samples. If it has positive or negative derivatives in the same intervals, same amount of local maximums, that sort of things.

I tried different approaches and compared the quality of them with a random assign using a KolmogorovSmirnov test.

Fact is that my random assign is not showing to be worse than my super califragilistic detection method .

Any clues? Thoughts?

$\endgroup$
3
  • $\begingroup$ matching is done based on the shape of the curve not in vectorial distance I could not quite understand this. Could there be missing some words? $\endgroup$ – ttnphns Sep 13 '14 at 20:35
  • $\begingroup$ Euclidean distance compares profiles as they are, their gross difference. Cosine compares shapes of the profiles - with "sea level" of these "landscapes" being kept at original zero. Correlation is like cosine, only it sets the "sea level" at the average height of a profile. $\endgroup$ – ttnphns Sep 13 '14 at 20:42
  • $\begingroup$ @ttnphns I edit the question to clarify what I want regarding to the matching on the shape of the curve. $\endgroup$ – Daniel Sep 13 '14 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.