input
stringlengths
10
828
output
stringlengths
5
107
public void set state boolean state model set state state
set the new state to either selected not selected or dont care
public boolean get state return model get state
return the current state which is determined by the selection status of
public int get date format int row int column return no date format
subclasses might overwrite this method which by default simply returns no date
private boolean get state if is selected is armed normal black tick return boolean true else if is selected is armed don t care grey tick return null else normal deselected return boolean false
the current state is embedded in the selection armed state of the
private void next state boolean current get state if current boolean false set state boolean true else if current boolean true set state null else if current null set state boolean false
we rotate between not selected selected and dont care
public void set cell color provider cell color provider cell color provider this cell color provider cell color provider
the given color provider will be used for the cell renderer
public cell color provider get cell color provider return this cell color provider
the returned color provider will be used for the cell renderer
public void column moved table column model event e if is editing cell editor stop cell editing super column moved e
necessary to properly stopping the editing when a column is moved dragged
public void column margin changed change event e if is editing cell editor stop cell editing super column margin changed e
necessary to properly stopping the editing when a column is resized
public void set overwrite mode boolean overwrite this overwrite overwrite
indicates if values which are merged with the current weights should
public int get edge shape return edge shape quad curve
returns the shape of the edges
public int get label offset return 0
returns 0 for other values the edge label painting will not work
public int get label offset return 1
returns the label offset
public int get edge shape return edge shape line
returns the shape of the edges
public boolean is rotate edge labels return graph creator is rotating edge labels
let the graph model decide
public void paste if editable clipboard clipboard get toolkit get system clipboard try the mac os mrj doesn t convert r to n so do it here string selection string clipboard get contents this get transfer data data flavor string flavor replace r tools get line separator int repeat count input handler get repeat count string buffer buf new string buffer for int i 0 i repeat count i buf append selection selection buf to string set selected text selection catch exception e get toolkit beep system err println clipboard does not contain a string
inserts the clipboard contents into the text
private void set default label position vv get renderer get vertex label renderer set position renderer vertex label position cntr
vertex label is not parameterized in jung
public data row get data row return this data
returns the data row which backs up the example in the example table
public attributes get attributes return this parent example set get attributes
delivers the attributes
public double get value attribute a return data get a
returns the value of attribute a
public string get nominal value attribute a if a is nominal throw new attribute type exception extraction of nominal example value for non nominal attribute a get name is not possible double value get value a if double is na n value return attribute missing nominal value else return a get mapping map index int value
returns the nominal value for the given attribute
public double get numerical value attribute a if a is numerical throw new attribute type exception extraction of numerical example value for non numerical attribute a get name is not possible return get value a
returns the numerical value for the given attribute
public date get date value attribute a if ontology attribute value type is a a get value type ontology date time throw new attribute type exception extraction of date example value for non date attribute a get name is not possible return new date long get value a
returns the date value for the given attribute
public void set value attribute a double value data set a value
sets the value of attribute a
public void set value attribute a string str if a is nominal throw new attribute type exception set value attribute string only supported for nominal values if str null set value a a get mapping map string str else set value a double na n
sets the value of attribute a which must be a nominal attribute
public boolean equal value attribute first attribute second if first is nominal second is nominal return get value as string first equals get value as string second else if first is nominal second is nominal return com rapidminer tools tools is equal get value first get value second else return false
returns true if both nominal values are the same if both attributes
public string format example example string buffer str new string buffer for int i 0 i format commands length i str append format commands i format example return str to string
formats a single example
public double get weight return weight counter
returns the weight of the attribute
public double get mikro variance return get makro variance
returns the makro variance since no other micro variance can be
public double get mikro average return get weight counter
returns the current weight
public int compare to attribute weight o double w1 weight double w2 o weight assert weights o weights if weights get weight type attribute weights absolute weights w1 math abs w1 w2 math abs w2 return double compare w1 w2 weights get sorting type
compares the weight of this object with the weight of another
public boolean equals object o if o instanceof attribute weight return false attribute weight w attribute weight o return this name equals w name this weight w weight
returns true if both objects have the same name and the same weight
public void build single average averagable avg attribute weight other attribute weight avg this weight other weight this counter other counter
builds the sum of weights and counters
public string get value as string attribute attribute return get value as string attribute numerical attribute unlimited number of digits false
p returns the value of this attribute as string representation i
public attribute weighted example set create clean clone attribute weighted example set clone attribute weighted example set clone iterator attribute a clone get attributes iterator while a has next attribute attribute a next double weight this attribute weights get weight attribute get name if tools is zero weight a remove return clone
returns a clone where the zero weighted attributes are not delivered
public string get value as string attribute attribute int fraction digits boolean quote nominal double value get value attribute return attribute get as string value fraction digits quote nominal
p returns the value of this attribute as string representation i
public double get weight attribute attribute if this attribute weights null return 1 0d else return this attribute weights get weight attribute get name
returns the weight of the attribute
public void set weight attribute attribute double weight value this attribute weights set weight attribute get name weight value
sets the weight of the attribute
public string to string return to dense string numerical attribute unlimited number of digits true
returns a dense string representation with all possible fraction digits
public int get number of used attributes int counter 0 for attribute attribute get attributes if tools is equal get weight attribute 0 0d counter return counter
returns the number of selected attributes
public void select all set all 1 0d
sets the weights of all attributes to 1
public string to dense string int fraction digits boolean quote nominal string buffer result new string buffer iterator attribute a get attributes all attributes boolean first true while a has next if first first false else result append separator result append get value as string a next fraction digits quote nominal return result to string
this method returns a dense string representation of the example
public void deselect all set all 0 0d
sets the weights of all attributes to 0
private void set all double weight for attribute attribute get attributes set weight attribute weight
sets all flags to the given value
public boolean is attribute used attribute attribute return get weight attribute 0 0d
returns the selection state of the attribute
public void set attribute used attribute attribute boolean selected set weight attribute selected 1 0d 0 0d
sets the selection state of the attribute
public void flip attribute used attribute attribute set weight attribute is attribute used attribute 0 0d 1 0d
flips the selection state of the attribute with the given index
public void select random subset int n random random double ratio double n double get attributes size for attribute attribute get attributes if random next double ratio set weight attribute 1 0d else set weight attribute 0 0d if get number of used attributes 0 double prob delta 1 0d get attributes size double prob random next double double current max prob delta for attribute attribute get attributes if prob current max set weight attribute 1 0d break current max prob delta
randomly selects approximately the given number of attributes
public example get example int index if index 0 index this mapping length throw new runtime exception given index index does not fit the mapped example set else return parent get example this mapping index
returns the i th example in the mapping
public int size return mapping length
counts the number of examples
public void new process if close stop process result display clear set process new process true add to undo list change mode edit mode
creates a new process
public boolean has next return data row reader has next
returns true if there are more data rows
public example next if has next return null data row data data row reader next if data null return null return new example data example set
returns a new example based on the current data row
public boolean has next return this parent has next
returns true if there are more data rows
public example next if has next return null example example this parent next if example null return null return new example example get data row example set
returns a new example based on the current data row
public boolean condition ok example e iterator attribute value filter single condition i conditions iterator while i has next attribute value filter single condition condition i next if combination mode and if condition condition ok e return false else if condition condition ok e return true if combination mode and return true else return false
returns true if all conditions are fulfilled for the given example
public example get example int index if index 0 index this mapping length throw new runtime exception given index index does not fit the mapped example set else return this parent get example this mapping index
returns the i th example in the mapping
public void stop process if get process state process process state stopped get process get log log process stopped completing current operator log service init status bar set special text process stopped completing current operator if process thread null if process thread is alive process thread set priority thread min priority process thread stop process status bar process ended this process set process process main frame this process clone false enable actions
can be used to stop the currently running process
public attributes get attributes return this parent get attributes
returns the attribute container
public string get name return example set
this method overrides the implementation of result object adapter and returns example set
public boolean condition ok example example if double is na n example get value example get attributes get label return false else return true
returns true if the label was defined
public boolean condition ok example example if double is na n example get value example get attributes get label return true else return false
returns true if the label was not defined
public boolean condition ok example example return example equal value example get attributes get label example get attributes get predicted label
returns true if the example is correctly predicted
private void init double ratio int size partition builder builder log service get global log create new partition using a builder get class get name log service status elements builder create partition ratio size init elements ratio length
creates a partition from the given ratios
private void init int new elements int no of partitions log service get global log create new partition with new elements length elements and no of partitions partitions log service status partition sizes new int no of partitions last element index new int no of partitions elements new elements for int i 0 i elements length i if elements i 0 partition sizes elements i last element index elements i i select all partitions mask new boolean no of partitions for int i 0 i mask length i mask i true recalculate table indices
private initialization method used by constructors
public data table create data table iocontainer container attribute weights weights null if container null try weights container get attribute weights class for attribute attribute get attributes double weight weights get weight attribute get name if double is na n weight not compatible weights null break catch missing ioobject exception e return new data table example set adapter this weights
this method is used to create a
public component get visualization component iocontainer container return get visualization component container true
returns component with several views controlled by radio buttons
public void clear selection this mask new boolean mask length recalculate table indices
clears the selection i
public example get example int index if index 0 index this mapping length throw new runtime exception given index index does not fit the filtered example set else return parent get example this mapping index
returns the i th example fulfilling the condition
public void select subset int i this mask i true recalculate table indices
marks the given subset as selected
public void deselect subset int i this mask i false recalculate table indices
marks the given subset as deselected
public int get number of subsets return partition sizes length
returns the number of subsets
public int get selection size int s 0 for int i 0 i partition sizes length i if mask i s partition sizes i return s
returns the number of selected elements
public int get total size return elements length
returns the total number of examples
public boolean condition ok example example for attribute attribute example get attributes if double is na n example get value attribute return true return false
returns true if the example does not contain missing values
public boolean condition ok example example boolean is ok true for attribute attribute checked attributes is ok double is na n example get value attribute return is ok
returns true if the example does not contain missing values within regarded attributes
public boolean is selected int index return mask elements index
returns true iff the example with the given index is selected according
private void recalculate table indices list integer indices new linked list integer for int i 0 i elements length i if mask elements i indices add i table index map new int indices size iterator integer i indices iterator int counter 0 while i has next table index map counter i next
recalculates the example table indices of the currently selected
public int map index int index return table index map index
returns the actual example table index of the i th example of the
protected void swap values int a int b int tt values a values a values b values b tt
swaps x a with x b
protected double get int index double default value return data index
returns the desired data for the given index
protected void set int index double value double default value data index short value
sets the given data for the given attribute
public void set value int index double v values index short v
sets the given data for the given attribute
public string to string string buffer result new string buffer for int i 0 i data length i result append i 0 data i return result to string
returns a string representation of the data row
public data row create string strings attribute attributes data row data row create strings length for int i 0 i strings length i if strings i null strings i strings i trim if strings i null strings i length 0 strings i equals if attributes i is nominal string unescaped tools unescape strings i data row set attributes i attributes i get mapping map string unescaped else data row set attributes i string2 double strings i this decimal point character else data row set attributes i double na n data row trim return data row
creates a data row from an array of strings
public data row create object data attribute attributes data row data row create data length for int i 0 i data length i if data i null if attributes i is nominal data row set attributes i attributes i get mapping map string string data i trim else data row set attributes i number data i double value else data row set attributes i double na n data row trim return data row
creates a data row from an object array
public void read examples data row reader i read examples i false
reads the examples into memory in the order they are delivered by the
public data row create double data attribute attributes data row data row create data length for int i 0 i data length i if data i null if attributes i is nominal data row set attributes i attributes i get mapping map string string value of data i trim else data row set attributes i number data i double value else data row set attributes i double na n data row trim return data row
creates a data row from an object array
public void read examples data row reader i boolean permutate read examples i false null
reads the examples into memory and permutates the order
public void read examples data row reader i boolean permutate random random data list clear while i has next if permutate int index random next int data list size 1 data list add index i next else data list add i next
reads the examples into memory and permutates the order
public data row reader get data row reader return new list data row reader data list iterator
returns a new data row reader
private void ensure row correct throws sqlexception if row result set get row throw new runtime exception database data row result set was modified since creation of row
ensures that the current row is the current row of the result set
public double get attribute attribute try ensure row correct catch sqlexception e throw new runtime exception cannot read data e this last attribute attribute double value attribute get value this this last attribute null return value
returns the desired data for the given attribute
public data row get data row int index return data list get index
returns the data row with the given index
public void set attribute attribute double value try ensure row correct catch sqlexception e throw new runtime exception cannot update data e e this last attribute attribute attribute set value this value this last attribute null
sets the given data for the given attribute
public int size return data list size
returns the size of this example table i
public void add data row data row data row data list add data row
convenience method allowing the adding of data rows without a data row
public boolean remove data row data row data row return data list remove data row
convenience method for removing data rows
public object clone return new polynominal attribute this
clones this attribute
public data row remove data row int index return data list remove index
convenience method for removing data rows