input
stringlengths
10
828
output
stringlengths
5
107
public void sort comparator frequent binary item set comp collections sort m sets comp
sort the item sets according to the supplied comparator
public int size return m sets size
get the number of item sets
public string to string int num sets if m sets size 0 return no frequent items sets found string buffer result new string buffer result append m sets size frequent item sets found if num sets 0 result append displaying num sets result append n n int count 0 for frequent binary item set i m sets if num sets 0 count num sets break result append i to string n count return result to string
get a textual description of this list of item sets
public int get count int recursion level if recursion level m counts size return 0 else return m counts get recursion level
get the count at the specified recursion depth
public void increase count int recursion level int incr basically treat the list like a stack where we can add a new element or increment the element at the top if recursion level m counts size new element m counts add incr else if recursion level m counts size 1 otherwise increment the top int n m counts get recursion level int value m counts set recursion level n incr
increase the count at a given recursion level
public void remove count int recursion level if recursion level m counts size m counts remove recursion level
remove the count at the given recursion level
public void increase projected count int recursion level int incr m projected counts increase count recursion level incr
increase the projected count at the given recursion level at this
public void remove projected count int recursion level m projected counts remove count recursion level
remove the projected count at the given recursion level for this
public int get projected count int recursion level return m projected counts get count recursion level
get the projected count at the given recursion level for this node
public fptree node get parent return m parent
get the parent node
public boolean combine positem positem posit if word equals ignore case posit word if posit null items null posit items null if header equals ignore case posit header items contains all posit items posit items contains all items freq posit freq return true return false
combine the pos data
public int cmp positem positem posit if word equals ignore case posit word if posit null items null posit items null if header equals ignore case posit header items contains all posit items posit items contains all items return freq posit freq return 0
compare the pos data
public binary item get item return m item
get the item at this node
public string to string int recursion level return to string recursion level
return a textual description of this node for a given recursion
public string to string string prefix int recursion level string buffer buffer new string buffer buffer append prefix buffer append buffer append m item to string buffer append buffer append m projected counts get count recursion level buffer append n for fptree node node m children values buffer append node to string prefix recursion level return buffer to string
return a textual description of this node for a given recursion
public void graph fptree string buffer text if m children null collection fptree node kids m children values for fptree node n kids text append n n m id text append label text append n get item to string n get projected count 0 n text append n n graph fptree text text append n m id n n m id n
generate a dot graph description string for the tree
public void add to list fptree node to add m header list add to add
add a tree node into the list for this header entry
public shadow counts get projected counts return m projected header counts
get the projected counts for this header entry
public void add item set collection binary item item set int incr super add item set item set m header table incr
insert an item set into the tree
public string to string string pad int recursion level string buffer result new string buffer result append pad result append root n for fptree node node m children values result append node to string pad recursion level return result to string
get a textual description of the tree at a given recursion
public capabilities get capabilities capabilities result super get capabilities result disable all enable what we can handle attributes result enable capability unary attributes result enable capability binary attributes result enable capability missing values result enable capability no class return result
returns default capabilities of the classifier
public string global info return class implementing the fp growth algorithm for finding large item sets without candidate generation iteratively reduces the minimum support until it finds the required number of rules with the given minimum metric for more information see n n get technical information to string
returns a string describing this associator
public technical information get technical information technical information result result new technical information type inproceedings result set value field author j han and j pei and y yin result set value field title mining frequent patterns without candidate generation result set value field booktitle proceedings of the 2000 acm sigmid international conference on management of data result set value field year 2000 result set value field pages 1 12 return result
returns an instance of a technical information object containing
public string print header table int recursion level string buffer buffer new string buffer for binary item item m header table key set buffer append item to string buffer append buffer append m header table get item get projected counts get count recursion level buffer append n return buffer to string
get a textual description of the header table for this tree
public void reset options m delta 0 05 m metric threshold 0 9 m num rules to find 10 m lower bound min support 0 1 m upper bound min support 1 0 m min support 1 m positive index 2 m transactions must contain m rules must contain m must contain or false
reset all options to their default values
public string positive index tip text return set the index of binary valued attributes that is to be considered the positive index has no effect for sparse data in this case the first index i e non zero values is always treated as positive also has no effect for unary valued attributes i e when using the weka apriori style format for market basket data which uses missing value to indicate absence of an item
tip text for this property suitable for displaying
public void set positive index int index m positive index index
set the index of the attribute value to consider as positive
public int get positive index return m positive index
get the index of the attribute value to consider as positive
public void set num rules to find int num r m num rules to find num r
set the desired number of rules to find
public int get num rules to find return m num rules to find
get the number of rules to find
public string num rules to find tip text return the number of rules to output
tip text for this property suitable for displaying
public void set metric type selected tag d int ordinal d get selected tag get id for default association rule metric type m default association rule metric type values if m ordinal ordinal m metric m break
set the metric type to use
public int get max number of items return m max items
gets the maximum number of items to be included in large item sets
public string max number of items tip text return the maximum number of items to include in frequent item sets 1 means no limit
tip text for this property suitable for displaying
public selected tag get metric type return new selected tag m metric ordinal default association rule tags selection
get the metric type to use
public double get min metric return m metric threshold
get the value of min confidence
public void set min metric double v m metric threshold v
set the value of min confidence
public string transactions must contain tip text return limit input to fpgrowth to those transactions instances that contain these items provide a comma separated list of attribute names
returns the tip text for this property
public void set transactions must contain string list m transactions must contain list
set the comma separated list of items that transactions
public void set max number of items int max m max items max
set the maximum number of items to include in large items sets
public string get transactions must contain return m transactions must contain
gets the comma separated list of items that
public string rules must contain tip text return only print rules that contain these items provide a comma separated list of attribute names
returns the tip text for this property
public void set rules must contain string list m rules must contain list
set the comma separated list of items that rules
public string get rules must contain return m rules must contain
get the comma separated list of items that
public string use orfor must contain list tip text return use or instead of and for transactions rules must contain lists
returns the tip text for this property
public void set use orfor must contain list boolean b m must contain or b
set whether to use or rather than and when considering
public boolean get use orfor must contain list return m must contain or
gets whether or is to be used rather than and when
public string lower bound min support tip text return lower bound for minimum support as a fraction or number of instances
returns the tip text for this property
public double get all confidence return m all confidence
get the value of the all confidence threshold
public void set all confidence double v m all confidence v
set the value of the all confidence threshold
public string upper bound min support tip text return upper bound for minimum support as a fraction or number of instances start iteratively decreasing minimum support from this value
returns the tip text for this property
public string find all rules for support level tip text return find all rules that meet the lower bound on minimum support and the minimum metric constraint turning this mode on will disable the iterative support reduction procedure to find the specified number of rules
tip text for this property suitable for displaying
public void set find all rules for support level boolean s m find all rules for support level s
if true then turn off the iterative support reduction method
public boolean get find all rules for support level return m find all rules for support level
get whether all rules meeting the lower bound on min support
public void set off disk reporting frequency int freq m off disk reporting frequency freq
set how often to report some progress when the data is
public association rules get association rules list association rule rules to return new array list association rule int count 0 for association rule r m rules rules to return add r count if m find all rules for support level count m num rules to find break return new association rules rules to return this
gets the list of mined association rules
public boolean can produce rules return true
returns true if this association rules producer can actually
public void build associations instances data throws exception build associations object data return
method that generates all large item sets with a minimum support and from
public string graph fptree root tree int max id tree assign ids 1 string buffer text new string buffer text append digraph fptree n text append n0 label root n tree graph fptree text tree graph header table text max id 1 text append n return text to string
assemble a dot graph representation of the fp tree
public string get revision return revision utils extract revision 6599
returns the revision string
private void list pricing types pricing type list new array list select item pricing type daointerface pricing type dao pricing type daointerface context helper get instance get application context get bean pricing type dao list pricing type pricing types pricing type dao find by active y for pricing type pt pricing types select item si new select item si set value pt get pricing code si set label pt get pricing desc pricing type list add si
list all pricing types available from db
public void print for int k 0 k this vertices k system out print system out print xvertices k system out print system out print yvertices k system out print system out print system out print alpha system out print system out print redvalue system out print system out print greenvalue system out print system out print bluevalue system out println
print polygon attributes
public object clone try polygon temp polygon super clone temp xvertices xvertices clone temp yvertices yvertices clone return temp catch clone not supported exception ex logger get logger polygon class get name log level severe null ex return null
override clone method for polygon object to clone the vercices array
public void set cross rate double r genop set cross rate r
set crossover rate
public double fitness problem problem double distance problem verify this this fitness distance return fitness
compute fitness of the individual
public buffered image get image buffered image imagetotest new buffered image width height buffered image type int argb graphics2 d localgraphics graphics2 d imagetotest get graphics localgraphics fill rect 0 0 width height for int i 0 i polygons length i color c new color polygons i redvalue polygons i greenvalue polygons i bluevalue polygons i alpha localgraphics set color c localgraphics fill polygon polygons i xvertices polygons i yvertices vertices return imagetotest
return a buffered image generated by chromosome of the individual
public void mutate random r new random int i r next int howmanypoly switch r next int 5 vertices case 1 polygons i alpha r next int 255 break case 2 polygons i redvalue r next int 255 break case 3 polygons i greenvalue r next int 255 break case 4 polygons i bluevalue r next int 255 break case 5 polygon temp polygons i polygons i polygons howmanypoly 1 polygons howmanypoly 1 temp break default int j r next int vertices polygons i xvertices j r next int width polygons i yvertices j r next int height break
mutate an attribute of the individual
public object clone try individual temp individual super clone temp polygons polygons clone for int i 0 i howmanypoly i temp polygons i polygon polygons i clone return temp catch clone not supported exception ex logger get logger individual class get name log level severe null ex return null
override the clone method to colne the polygon array
public void run this initialize population boolean sol false sol this checkfitness this population this problem while sol done sol this next generation
main thread method initialize population and
public void load image string ref throws exception buffered image bimg null bimg image io read new file ref width bimg get width height bimg get height targetimage bimg done true target pixels new int bimg get width bimg get height pixel grabber pg new pixel grabber bimg 0 0 bimg get width bimg get height target pixels 0 bimg get width pg grab pixels
load image to try to represent
public void initialize population done false genop new genetic op mutrate cross type crossrate for int i 0 i popsize i individual u new individual howmanypoly numvertices maxx maxy population add u
initialize population with random individue
public individual select best vector individual population return population last element
select best individial based on his fitness
private individual select rank vector individual population int totfit 1 population size population size 2 int r int math random totfit int elem to remove int math sqrt r 8 1 1 2 return population element at elem to remove
select individual based on rank selection
public boolean checkfitness vector individual population problem problem double f max 0 double f min double max value double f mean 0 for int i 0 i population size i double fit population get i fitness problem f mean fit if fit f max f max fit if fit f min f min fit max fitness f max min fitness f min mean fitness f mean population size return solved
check fitness of population individuals
public string encode xmlvalue string s if s null return null string buffer stringbuffer new string buffer s length char ac s to char array for int i 0 i ac length i if ac i stringbuffer append amp else if ac i stringbuffer append lt else if ac i stringbuffer append gt else if ac i stringbuffer append apos else if ac i stringbuffer append quot else stringbuffer append ac i return stringbuffer to string
encode as string to a valid xml string
public string escape html string s if s null return null string buffer stringbuffer new string buffer s length char ac s to char array for int i 0 i ac length i if ac i stringbuffer append amp else if ac i stringbuffer append lt else if ac i stringbuffer append gt else if ac i stringbuffer append apos else if ac i stringbuffer append quot else stringbuffer append ac i return stringbuffer to string
escape html characters to prevent html rendering in the view
public prototype model get current prototype model return current prototype model
gets the prototype model that is currently open in the editor
public editor ui get editor return editor
gets the prototype editor main window
public void set current prototype model prototype model prototype model this current prototype model prototype model this filename null operation history clear if prototype model null this file library new file library prototype model get data path this image cache new image cache file library prototype model add observer this refresh scripting environment set changed notify observers prototype model switched event
sets the prototype model as the one which is currently open in the
public timer and sound layer get timer and sound layer return timer and sound layer
gets the layer which shows the timer representations
public editor screen panel get screen panel return screen panel
gets the layer which shows the components
public void refresh remove all map string screen element factory factories edit area get editor get editor model get current prototype model get current screen get screen element factories for each component factory or timer factory of the current screen for string factory id factories key set screen element factory factory factories get factory id in fact only for timer factories if factory instanceof timer factory create a representation timer representation representation new timer representation factory id add representation else if factory instanceof sound player factory sound representation representation new sound representation factory id add representation do layout
this method should be called whenever the prototype model has changed
public screen element selection layer get selection layer return selection layer
gets the layer which shows the outlines and grid and which allows the
protected void add button editor actions id action id jbutton button new editor toolbar button editor get action action id add button
adds a button for the given action to this toolbar
public recently opened history get recently opened history return recently opened history
gets the history which saves the filenames of the recently opened
protected void fill add button editor actions id file new add button editor actions id file open add button editor actions id file save add web export button editor actions id file web export add new jtool bar separator add button editor actions id edit undo add button editor actions id edit redo add new jtool bar separator add button editor actions id prototype run add new jtool bar separator add button editor actions id edit change properties add button editor actions id edit change transitions
fills the toolbar with buttons
private void refresh timer and sound layer the timer and sound layer must be exactly as large as the screen panel timer and sound layer set bounds screen panel get bounds timer and sound layer refresh timer and sound layer repaint
refreshes and repaints the layer which contains sound player and timer
private void show no screen set all to invisible if screen panel null remove screen panel screen panel null timer and sound layer remove all selection layer get selection clear
clears the edit area so that you can see the diagonal background grid
public swing scripting environment get scripting environment return scripting environment
gets the scripting environment which is responsible for syntax checking
public editor clipboard get clipboard return clipboard
gets the clipboard which is responsible for copying and pasting of
public boolean can undo return undo stack is empty
checks whether or not this history contains an operation that can be
public void undo if can undo undoable operation operation to undo undo stack pop redo stack push operation to undo operation to undo undo decrease changes since last change
undoes the operation that was last performed and puts it onto the redo
private void refresh scripting environment if scripting environment null current prototype model get scripting language equals scripting environment get scripting language name scripting environment swing scripting environment create instance current prototype model get scripting language current prototype model get required permissions set changed notify observers
makes sure that the scripting environment which is responsible for syntax
public string get undo description if can undo return undo stack last element get description return null
gets the description of the operation that would changebe undone when the
private void refresh recently opened file submenu recently opened file submenu remove all for string file path editor get editor model get recently opened history get recently opened file paths action action new file open specific file action editor new file file path recently opened file submenu add new jmenu item action
refreshes the submenu which makes it possible to re open recently opened
public boolean can redo return redo stack is empty
checks whether or not this history contains an operation that can be
public void redo if can redo undoable operation operation to redo redo stack pop perform operation to redo false
performs the operation that was last undone and puts it onto the undo
public string get redo description if can redo return redo stack last element get description return null
gets the description of the operation that would be redone when the
public void clear undo stack clear redo stack clear changes since last save 0 set changed notify observers
clears this history i
public boolean is changed since last save return changes since last save 0
checks whether or not there were any structural modifications to the