This class represents maximal predictive
partitionings [Gué00, Gué01], ie a list of
Partition of increasing number of
segments, computed on a data
using a Lexique.
A partitioning in n segments, or n-partitioning, is a list of
partitions from 1 up to n segments classes.
the value of the maximum
prediction from a
Lexique on a
data; if this value is not
defined, default value is 0;
the miminum number of classes necessary to get the maximum
prediction; if this maximum
prediction value is not defined,
default value is 0.
Construction
__init__
Optional keyword fic allows
construction by reading from a filename
in specific format;
read_nf
builds from a filename
in specific format; if a
Partition in the file has no name, its new name is the
string of its index in the list;
build_random
builds a random partitioning in a given
number of classes on a given data-length, using
build_random;
mpp
computes the maximal predictive
partitioning of a given number of classes with
Lexique on a
data; the names of the
Partitions are their numbers of segments;
Handling
len_don
returns the length of the data of the first
Partition;
returns a Parti_simp made
of the selected partitions;
__delslice__
removes the Partition
of indexes between given numbers;
append
appends a
Partition to the end of self.
Data length of this Partition must be equal to the one of self; if
this new Partition has no name, it gets the length of the
Parti_simp as name, using method
s_name.
insert
inserts a
Partition before given index.
Data length of this Partition must be equal to the one of self; if
this new Partition has no name, it gets the length of the
Parti_simp as name, using method
s_name.
filter
returns a Parti_simp made of the
partitions on which a given function returns True;
group
returns a new Parti_simp by
clustering the Segment of its
Partition given their descriptors numbers, using
group.
ls_val
returns the list of the values of the
Partition, using
val;
outputs in specific format, without the
descriptors patterns (see
abr).
Graphical output
Horizontal axis represents the data. On each line is the number of
segments and the graphical output of the corresponding
Partition, where each segment is
drawn by an arc. The height of each arc is optionaly computed by a
given function on the segments (here their lengths).
Here, only the segments which descriptors numbers are between 30 and
44 are drawn, and their descriptors numbers are written above them.
draw_nf
draws in postscript language in file of given
name;
Optional keywords:
seg=l
draws only segments which numbers are in list
l;
num=n
if equals 1, the numbers of the descriptors are
written;
func=f
the height of each arc is proportional to
value of function f computed on the corresponding
Segment.