partition.Partition = class Partition
    Partition
 
  Methods defined here:
__getitem__(self, i)
Return Segment i (x.__getitem__(i) <==> x[i]).
__iadd__(self, s)
Append Segment $1 at the end of the Partition
(x.__iadd__(s) <==> x+=s).
__init__(self, **kw)
Keyword argument:
fic -- Build from filename fic.
__len__(self)
Return the number of Segments (x.__len__() <==> len(x)).
__str__(self)
(x.__str__()<==> str(x)).
abr(self)
Return the string without the descriptors.
build_random(self, lg, np, **kw)
Build a random (uniform distribution) np-partition on
data-length lg.
 
Keyword argument:
ec - minimum length of the segments, at most lg/(np+1) (default: 1).
copy(self)
Return a NEW copy of the Partition.
draw_nf(self, nf, **kw)
Draw with postscript language in file of name nf.
 
Keyword arguments:
seg -- draw only the segments which descriptors have their number in
       the list seg;
num -- if equals 1, numbers of the descriptors are written;
func -- the height of each arc is proportional to value of function
        func computed on each Segment s.
group(self, lst)
Return a Partition by clustering Segments using the numbers
of their descriptors. These numbers are in the list of lists lst. For
example, if l=[[1,2],[3,4]], numbers 1 and 2 are grouped, as well 3
and 4. Other Segments are not changed. Descriptors are lost.
len_don(self)
Return the data-length.
mpp(self, g, l, i)
Compute a maximal predictive i-partition on data g, with
Lexique l.
name(self)
Return the name
num(self)
Return the list of descriptors' numbers.
prediction(self, g, l)
Compute the prediction on data g of Lexique l with one best
descriptor per segment.
pts_comm(self, p)
Return the number of predictions similar with Partition p.
Returns -1 if data-lengths are different. Predictors' numbers are only
taken into account.
read_Matrice(self, m, **kw)
Build from Matrice m, keeping at each position the
descriptor number that is selected by a function. A segment is made
for each run of identical descriptors numbers.
The value of the each segment is the prediction of its descriptor.
 
Keyword argument:
func -- function func has two arguments, a Matrice and a position, and
        returns a tuple descriptor number, floating point value
        (default: returns the tuple best descriptor,best value  (the first
           of the bests descriptors is returned if there are several bests)).
read_nf(self, nf)
Build from filename nf.
read_str(self, st)
Build from  string st. Return True iff ok.
s_name(self, s)
Set its name to string of s
val(self)
Return the value.
viterbi(self, g, l, **kw)
Compute the Partition with Lexique l, using Viterbi
algorithm, on sequence g.
 
Keyword argument:
maxseg - limits the maximum number of segments allowed in the partition to
maxseg (default: 10000). If equals 0, there is no limit to this number.