input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void clear data list clear
|
clears the table
|
public boolean has next if max number 1 lines read max number return false if line read return eof try eof read line if eof in attributes close if in labels null in labels close catch ioexception e throw new runtime exception e get message e line read true return eof
|
checks if futher examples exist
|
public data row get data row int index try this result set absolute index 1 database data row data row new database data row result set return data row catch sqlexception e log service get global log cannot retrieve data row with absolute row index e get message log service warning return null
|
returns the data row with the desired row index
|
public data row next if eof true return null if line read if has next return null lines read line read false return current data row
|
returns the next example
|
private void set operator operator root boolean new process main editor process changed root
|
sets the root operator for all editors
|
public object clone return new numerical attribute this
|
clones this attribute
|
public int map string string str if str null return 1 lookup string int index get index str if index 0 if string is not found set it if first value null first value str return first value index else if second value null second value str return second value index else throw new attribute type exception cannot map another string for binary attribute already mapped two strings else return index
|
returns the index for the nominal attribute value code str code
|
public string map index int index switch index case first value index return first value case second value index return second value default throw new attribute type exception cannot map index of binary attribute to nominal value index index is out of bounds
|
returns the attribute value that is associated with this index
|
public string get as string double value int number of digits boolean quote nominal if double is na n value return else switch number of digits case unlimited number of digits return double to string value case default number of digits return com rapidminer tools tools format integer if possible value 1 default return com rapidminer tools tools format integer if possible value number of digits
|
returns a string representation of value
|
private void write attribute meta data attribute role attribute role int sourcecol print writer aout boolean sparse string tag attribute if attribute role is special tag attribute role get special name attribute attribute attribute role get attribute write attribute meta data tag attribute sourcecol aout sparse
|
writes the data of this attribute in the given stream
|
public void set mapping string nominal value int index if index first value index first value nominal value else if index second value index second value nominal value else throw new attribute type exception cannot set mapping of binary attribute to index index
|
sets the given mapping
|
public int get negative index return first value index
|
returns the index of the first value if this attribute is a
|
protected double get int index double default value double value data get index if value null return value double value else return default value
|
returns the desired data for the given index
|
public int get positive index return second value index
|
returns the index of the second value if this attribute is a
|
protected void set int index double value double default value if tools is default default value value data remove index else data put index value
|
sets the given data for the given index
|
public int size if first value null return 0 else if second value null return 1 else return 2
|
returns the number of different nominal values
|
public void sort mappings if size 2 if first value compare to second value 0 string dummy second value second value first value first value dummy
|
this method rearranges the string to number mappings such that they are
|
protected void set int index double value double default value data index byte value
|
sets the value for the given index
|
public void clear first value null second value null
|
clears all mappings for nominal values
|
protected void set int index double value double default value data index long value
|
sets the given data for the given index
|
public int map string string str if str null return 1 lookup string in hashtable int index get index str if string is not yet in the map add it if index 0 new string insert index to symbol map add str index index to symbol map size 1 symbol to index map put str index return index
|
returns the index for the nominal attribute value code str code
|
public void process changed if no actual change boolean old value this changed this changed true add to undo list if old value set title synchronized process if this process get process file null tutorial mode this save action 24 set enabled true this save action 32 set enabled true changes the xml text after each process change main editor get xmleditor process changed this process get root operator
|
must be called when the process changed such that is different from
|
protected void swap values int a int b byte tt values a values a values b values b tt
|
swaps x a with x b
|
public string map index int index if index 0 index index to symbol map size throw new attribute type exception cannot map index of nominal attribute to nominal value index index is out of bounds return index to symbol map get index
|
returns the attribute value that is associated with this index
|
public void set mapping string nominal value int index string old value index to symbol map get index index to symbol map set index nominal value symbol to index map remove old value symbol to index map put nominal value index
|
sets the given mapping
|
public int get negative index ensure classification if map index 0 null throw new attribute type exception attribute cannot use first class index for negative class return 0
|
returns the index of the first value if this attribute is a
|
public void set value int index double v values index byte v
|
sets the given data for the given attribute
|
public int get positive index ensure classification if map index 0 null throw new attribute type exception attribute cannot use first class index for negative class iterator integer i symbol to index map values iterator while i has next int index i next if index 0 return index throw new attribute type exception attribute no other class than first class index found
|
returns the index of the second value if this attribute is a
|
public void remove throw new unsupported operation exception the method remove is not supported by data row readers
|
will throw a new
|
public int size return index to symbol map size
|
returns the number of different nominal values
|
public boolean equals object o if o instanceof example set return false example set es example set o return get attributes equals es get attributes
|
returns true if all attributes including labels and other special
|
public void sort mappings list string all strings new linked list string symbol to index map key set collections sort all strings symbol to index map clear index to symbol map clear iterator string i all strings iterator while i has next map string i next
|
this method rearranges the string to number mappings such that they are
|
public void clear symbol to index map clear index to symbol map clear
|
clears all mappings for nominal values
|
private void ensure classification if size 2 throw new attribute type exception attribute this to string is not a classification attribute
|
throws a runtime exception if this attribute is not a classification
|
public double get attribute attribute if attribute null return double na n else try return attribute get value this catch array index out of bounds exception e throw new array index out of bounds exception data row table index attribute get table index of attribute attribute get name is out of bounds
|
returns the value stored at the given
|
public void set attribute attribute double value attribute set value this value
|
sets the value of the
|
protected void swap values int a int b long tt values a values a values b values b tt
|
swaps x a with x b
|
public int hash code return get attributes hash code
|
returns the hash code of all attributes
|
protected void swap values int a int b short tt values a values a values b values b tt
|
swaps x a with x b
|
public void remove throw new unsupported operation exception the method remove is not supported by data row readers on databases
|
will throw a new
|
protected void swap values int a int b boolean tt values a values a values b values b tt
|
swaps x a with x b
|
public double get value int index return values index 1 0d 0 0d
|
returns the desired data for the given attribute
|
public void set value int index double v values index v 0 0d false true
|
sets the given data for the given attribute
|
public string get name return this attribute description get name
|
returns the name of the attribute
|
public attribute get attribute int i return attributes get i
|
returns the attribute of the column number i i i
|
public void set name string v if v equals this attribute description get name return for attributes attributes owners attributes rename this v this attribute description attribute description this attribute description clone this attribute description set name v
|
sets the name of the attribute
|
public attribute find attribute string name throws operator exception if name null return null iterator attribute i attributes iterator while i has next attribute att i next if att null if att get name equals name return att throw new user error null 111 name
|
returns the attribute with the given name
|
public int get table index return this attribute description get table index
|
returns the index in the example table
|
public void set table index int i this attribute description attribute description this attribute description clone this attribute description set table index i
|
sets the index in the example table
|
public int add attribute attribute a int index 1 if unused column list size 0 if seems to be something free synchronize and check again synchronized unused column list if unused column list size 0 index unused column list remove 0 attributes set index a else index attributes size attributes add a else index attributes size attributes add a if a null a set table index index return index
|
adds the attribute to the list of attributes assigning it a free column
|
public void recalculate all attribute statistics list attribute all attributes new array list attribute iterator attribute a get attributes all attributes while a has next all attributes add a next recalculate attribute statistics all attributes
|
recalculates the attribute statistics for all attributes
|
public void notify editors of change operator currently selected main editor set current operator currently selected
|
notifies the main editor of the change of the currently selected operator
|
public int get block type return this attribute description get block type
|
returns the block type of this attribute
|
public void remove attribute attribute attribute remove attribute attribute get table index
|
equivalent to calling
|
public void set block type int b this attribute description attribute description this attribute description clone this attribute description set block type b
|
sets the block type of this attribute
|
public int get number of attributes return attributes size
|
returns the number of attributes
|
public int get value type return this attribute description get value type
|
returns the value type of this attribute
|
public int get attribute count return attributes size unused column list size
|
returns the number of non null attributes
|
public example set create example set attribute label attribute return create example set label attribute null null
|
returns a new example set with all attributes switched on
|
public void recalculate attribute statistics attribute attribute list attribute all attributes new array list attribute all attributes add attribute recalculate attribute statistics all attributes
|
recalculate the attribute statistics of the given attribute
|
public example set create example set attribute label attribute attribute weight attribute attribute id attribute map attribute string special attributes new hash map attribute string if label attribute null special attributes put label attribute attributes label name if weight attribute null special attributes put weight attribute attributes weight name if id attribute null special attributes put id attribute attributes id name return new simple example set this special attributes
|
returns a new example set with all attributes switched on
|
public example set create example set iterator attribute role new special attributes map attribute string special attributes new hash map attribute string while new special attributes has next attribute role role new special attributes next special attributes put role get attribute role get special name return new simple example set this special attributes
|
returns a new example set with all attributes switched on
|
public string get construction return this construction description
|
returns the construction description
|
public example set create example set attribute set attribute set map attribute string special attributes new hash map attribute string iterator string i attribute set get special names iterator while i has next string name i next special attributes put attribute set get special attribute name name return create example set special attributes
|
returns a new example set with all attributes of the given attribute set
|
public void set construction string description this construction description description
|
returns the construction description
|
public example set create example set return create example set new hash map attribute string
|
returns a new example set with all attributes switched on
|
public example set create example set map attribute string special attributes return new simple example set this special attributes
|
returns a new example set with all attributes switched on
|
protected void set int index double value double default value data index value
|
sets the given data for the given index
|
public double get statistics attribute attribute string statistics name return get statistics attribute statistics name null
|
returns the desired statistic for the given attribute
|
public void set value int index double v values index v
|
sets the given data for the given attribute
|
public void skip line try read line catch exception e log service get global log problem during skipping of line e get message log service warning
|
skips the next line if present
|
private boolean read line throws ioexception boolean eof reached false boolean ok false while ok for int i 0 i file reader length i current data i rapid miner line reader read line file reader i expected number of columns i if current data i null eof reached true break if eof reached max number 1 sample ratio 1 0d random next double sample ratio ok true if eof reached for int i 0 i file reader length i file reader i close return false else return true
|
reads a line of data from all file readers
|
public double get statistics attribute attribute string statistics name string statistics parameter list statistics statistics list statistics map get attribute get name if statistics list null return double na n for statistics statistics statistics list if statistics handle statistics statistics name return statistics get statistics attribute statistics name statistics parameter return double na n
|
returns the desired statistic for the given attribute
|
public boolean has next if max number 1 lines read max number return false if line read return eof try eof read line catch ioexception e log service get global log e get message log service error return false line read true return eof
|
checks if another line exists and reads
|
public void set value int index double v values index float v
|
sets the given data for the given attribute
|
public data row next if eof true return null if line read if has next return null string data new string attributes length for int i 0 i attributes length i if data source index i 1 1 data i null else data i current data data source index i 0 data source index i 1 data row data row get factory create data attributes lines read line read false return data row
|
returns the next example
|
private void vecswap int a int b int n for int i 0 i n i a b swap a b
|
swaps the next n elements from a and b
|
protected void set int index double value double default value data index int value
|
sets the given data for the given index
|
protected double get int index double default value if data index return 1 0d else return 0 0d
|
returns the value for the desired index
|
protected void set int index double value double default value data index value 0 0d false true
|
sets the value for the given index
|
protected void set int index double value double default value data index float value
|
sets the given data for the given index
|
protected void swap int a int b int t x a x a x b x b t swap values a b
|
swaps x a with x b
|
protected double get int val double default value int index java util arrays binary search x val if index 0 return default value else return get value index
|
returns the desired data for the given attribute
|
public object clone return new binominal attribute this
|
clones this attribute
|
public void trim if counter x length int y new int counter system arraycopy x 0 y 0 counter x y resize values counter
|
trims the data row to the number of actually used elements
|
public object clone return new nominal statistics this
|
returns a clone of this statistics object
|
public string to string string buffer result new string buffer for int i 0 i x length i if i 0 result append result append x i get value i result append counter counter return result to string
|
returns a string representation of the data row
|
protected void add owner attributes attributes this owners add attributes
|
this method must not be called except by the
|
public int compare string o1 string o2 double w1 weight map get o1 get weight double w2 weight map get o2 get weight if comparator weight type absolute weights w1 math abs w1 w2 math abs w2 return double compare w2 w1 direction
|
creates two attribute weights
|
public string get name return attribute weights
|
returns the name of this average vector
|
public void set weight string name double weight attribute weight old weight weight map get name if double is na n weight weight map remove name super remove averagable old weight else if old weight null attribute weight att weight new attribute weight this name weight super add averagable att weight weight map put name att weight else old weight set weight weight
|
sets the weight for the attribute with the given name
|
public double get weight string name attribute weight weight weight map get name if weight null return double na n else return weight get weight
|
returns the weight for the attribute with the given name
|
public int get weight type return weight type
|
returns the currently used weight type
|
public int get sorting type return sort type
|
returns the currently used sorting type
|
public string transform new value string value return decrypt password value
|
this method will be invoked by the parameters after a parameter was set
|
public void set sorting type int sorting type this sort type sorting type
|
sets the currently used sorting type
|
public int size return weight map size
|
returns the number of features in this map
|
public boolean equals object o if o instanceof attribute weights return false else attribute weights other attribute weights o return this weight map equals other weight map
|
returns true if both objects have the same weight map
|
public int hash code return this weight map hash code
|
returns the hash code of the weight map
|
public void sort by weight string attribute names int direction int comparator type arrays sort attribute names new weight comparator direction comparator type
|
sorts the given array of attribute names according to their weight
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.