% [ confident-clustering-standalone/README.m ]
%
% Examples of Maximum Likelihood short-term clustering,
% and confident short-term clustering.
% The goal of the confident s.t.c. is to detect crossing points,
% and to split trajectories at those crossing points.
% (the detection at least, could be useful for vehicle tracking)
%
% The core function is "do_stc.m".
% 
% Please refer to either Lathoud's NIST RT04 paper (2004) 
% or Lathoud's PhD thesis (2006).
% --> check the PDF documents right in this directory.
%
% by Guillaume Lathoud, 2006 - lathoud@idiap.ch


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ( 1 ) Create synthetic data

build_synth;
show_synth;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ( 2 ) Run ML clustering on the synthetic data

T_short  = 6;
N_future = 6;

do_ml( T_short, N_future );  % This calls "do_stc"
show_ml( T_short, N_future );

%%%

T_short  = 6;
N_future = 1;  % <<< changed

do_ml( T_short, N_future );  % This calls "do_stc"
show_ml( T_short, N_future );

%%% -> almost the same result, whether N_future = 1 or 6

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ( 3 ) Run confident clustering on the synthetic data

T_short  = 6;
N_future = 6;

do_conf( T_short, N_future );  % This calls "do_stc"
show_conf( T_short, N_future );

%%%

T_short  = 6;
N_future = 1;  % <<< changed

do_conf( T_short, N_future );  % This calls "do_stc"
show_conf( T_short, N_future );

%%% -> very different results, depending whether N_future = 1 or 6

%%% -> confident clustering requires N_future > 1
