fldhisto | Compute a histogram for a field |
-f <field> | source field |
-max <pins> | number of the pins |
-dout <trgdata> | target data for a histogram |
[-cum] | cumulative histogram |
[-bounds] | save bounds of each pin into fields |
This operation computes a histogram for a field. The range of the field is divided into the specified number (<pins>) of uniform pins. Then the amount of hits is computed. The result will be a frame with two fields: x containing the centroids of the pins and N including the number of hits in pins. If -bounds is specified, two additional fields are inserted into the frame: low and up, which contain the lower and upper limits for each pin.
Example (ex4.8): This simple example shows, how a histogram can be computed for fuzzy coding. See also command hst (section 7.4.7) and the graphics part of this guide.
NDA> load boston.dat NDA> mkfz fz NDA> fldhisto -f boston.age -max 50 -dout hst NDA> hst fz.grp -inx 0 -d hst.N -co red NDA> addfzs fz -fs s1 -t 8 NDA> addfzs fz -fs s2 -t 8 NDA> initfz fz -lock NDA> func1 fz.grp -f fz.sets.s1 -co blue NDA> func1 fz.grp -f fz.sets.s2 -co blue NDA> viewp fz.grp -dz 120 NDA> wrps -n fz.grp -o fzhst.ps -w 500 -h 200