From: Robert pisani on
I'd like a measure that passed some simple tests. Here are a few.

The distance should be zero if any of the following are true:
1) Yi = Xi + a
2) Yi = a*Xi
3) ?? -- I don't know what other conditions should be added.

And the distance should be one if the following are true:
1) ??
2) ??

Any ideas?
From: us on
"Robert pisani" <r.pisani(a)mac.com> wrote in message <hr4apk$bar$1(a)fred.mathworks.com>...
> I'd like a measure that passed some simple tests. Here are a few.
>
> The distance should be zero if any of the following are true:
> 1) Yi = Xi + a
> 2) Yi = a*Xi
> 3) ?? -- I don't know what other conditions should be added.
>
> And the distance should be one if the following are true:
> 1) ??
> 2) ??
>
> Any ideas?

what have YOU done so far to solve YOUR particular problem...

us
From: Robert pisani on

One more condition:
> The distance should be zero if any of the following are true:
> 1) Yi = Xi + a
> 2) Yi = a*Xi
> 3) their Fourier transforms are equal
4) I don't know what other conditions should be added.
>
> And the distance should be one if the following are true:
> 1) ??
> 2) ??
>
> Any ideas?
From: us on
"Robert pisani" <r.pisani(a)mac.com> wrote in message <hr4bad$gdq$1(a)fred.mathworks.com>...
>
> One more condition:
> > The distance should be zero if any of the following are true:
> > 1) Yi = Xi + a
> > 2) Yi = a*Xi
> > 3) their Fourier transforms are equal
> 4) I don't know what other conditions should be added.
> >
> > And the distance should be one if the following are true:
> > 1) ??
> > 2) ??
> >
> > Any ideas?

1) do NOT repeat your OP just nine minutes later...
2) did you follow up on what you've been told in the first reply(?)...

us
From: Steven Lord on

"Robert pisani" <r.pisani(a)mac.com> wrote in message
news:hr4bad$gdq$1(a)fred.mathworks.com...
>
> One more condition:
>> The distance should be zero if any of the following are true:
>> 1) Yi = Xi + a
>> 2) Yi = a*Xi
>> 3) their Fourier transforms are equal
> 4) I don't know what other conditions should be added.
>>
>> And the distance should be one if the following are true:
>> 1) ??
>> 2) ??
>>
>> Any ideas?

Yes -- your problem is underspecified. If you don't know the requirements
that you want your distance metric function to satisfy, how can anyone
design the function? It would be like someone saying "I want a car. I want
it to be red. What type of car should I get?" The answer to that question
would depend greatly on how they drive, where they drive (if they drive
mainly on the Autobahn, they probably want a fast car. In downtown New York
City traffic at rush hour? Not so much.), how many people they drive (just
themselves versus them, their spouse, their 3 kids, and the family dog),
etc.

If the conditions listed above are the only conditions you have, then write
your distance metric function like:

function dist = mydistancemetric(x, y)
% error handle the empty x and y case
if all(diff(y-x)==0)
dist = 1;
elseif all(diff(y./x) == y(1)./x(1) || (x==0 & y == 0))
dist = 1;
elseif isequal(fft(x), fft(y))
dist = 1;
else
% make the obvious substitution
dist = someArbitraryConstantChosenByYou;
end

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


 | 
Pages: 1
Prev: fft on matlab
Next: symbolic arrays