input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void save file file throws ioexception write attribute weights file tools get default encoding
|
saves the attribute weights into an xml file
|
private void set title if hostname null try hostname inet address get local host get host name catch unknown host exception e hostname file file null if this process null synchronized process file this process get process file if file null set title title hostname file get name changed else set title title hostname
|
sets the window title rapid miner filename an asterisk if process was
|
public string to string return attribute weights containing weights for weight map size attributes
|
returns a string representation of this object
|
public object clone return new attribute weights this
|
returns a deep clone of the attribute weights which provides the same
|
public void normalize double weight min double positive infinity double weight max double negative infinity for string name get attribute names double weight math abs get weight name weight min math min weight min weight weight max math max weight max weight iterator attribute weight w weight map values iterator double diff weight max weight min while w has next attribute weight attribute weight w next double new weight 1 0d if diff 0 0d new weight math abs attribute weight get weight weight min diff attribute weight set weight new weight
|
this method normalizes all weights to the range 0 to 1
|
public component get visualization component iocontainer container data table data table create data table return new data table viewer data table plotter panel weight plotter selection
|
returns a visualisation component which allows sorting of the attribute
|
public string transform new value string value return value
|
this method will be invoked by the parameters after a parameter was set
|
public boolean is expert return is optional expert
|
returns true if this parameter can only be seen in expert mode
|
public void register dependency condition parameter condition condition this conditions add condition
|
registers the given dependency condition
|
public boolean is optional boolean become mandatory false for parameter condition condition conditions if condition dependency met become mandatory condition become mandatory else become mandatory false break return become mandatory
|
returns true if this parameter is optional
|
public string to string object value if value null return else return value to string
|
returns a string representation of this value
|
public void illegal value object illegal object corrected log service get global log illegal value illegal for parameter key has been corrected to corrected to string log service warning
|
can be called in order to report an illegal parameter value which is
|
public int compare to object o if o instanceof parameter type return 0 else return this key compare to parameter type o key
|
parameter types are compared by key
|
public configuration wizard creator get wizard creator configuration wizard creator creator null try creator wizard creator class new instance creator set parameters parameters catch instantiation exception e log service get global log problem during creation of wizard e get message log service warning catch illegal access exception e log service get global log problem during creation of wizard e get message log service warning return creator
|
returns a new instance of the wizard creator
|
public preview creator get preview creator preview creator creator null try creator preview creator class new instance catch instantiation exception e log service get global log problem during creation of previewer e get message log service warning catch illegal access exception e log service get global log problem during creation of previewer e get message log service warning return creator
|
returns a new instance of the wizard creator
|
public object clone parameters clone new parameters iterator string i key to value map key set iterator while i has next string key i next string value key to value map get key parameter type type key to type map get key if type null clone key to value map put key value i key to type map key set iterator while i has next string key i next clone key to type map put key key to type map get key clone keys clear for string key this keys clone keys add key return clone
|
performs a deep clone on this parameters object
|
public boolean set parameter string key string value boolean known type true if value null key to value map remove key else parameter type type key to type map get key if type null value type transform new value value known type true key to value map put key value return known type
|
sets the parameter for the given key after performing a range check
|
public void update recent file list recent files menu remove all list recent files rapid miner gui get recent files iterator i recent files iterator int j 1 while i has next final file recent file file i next jmenu item menu item new jmenu item j recent file get path menu item set mnemonic 0 j menu item add action listener new action listener public void action performed action event e open recent file recent files menu add menu item j
|
updates the list of recently used files
|
private void parse arguments string argv process file null for int i 0 i argv length i if argv i equals l show logo true else process file argv i if process file null print usage
|
parses the commandline arguments
|
public string get xml string indent boolean hide default string buffer result new string buffer iterator string i keys iterator while i has next string key i next string value key to value map get key parameter type type key to type map get key if type null result append type get xml indent key value hide default else result append indent parameter key key tvalue value to string tools get line separator return result to string
|
writes a portion of the xml configuration file specifying the parameters
|
public void write char bytes int offset int length throws ioexception for int i 0 i writer length i writer i write bytes offset length
|
implements the abstract method of the superclass
|
public void close throws ioexception for int i 0 i writer length i writer i close
|
closes all writers
|
public void add double value double weight if value map contains key value value map put value value map get value weight else value map put value weight
|
add a value with a weight to the set
|
public void flush throws ioexception for int i 0 i writer length i writer i flush
|
flushes all writers
|
public void add double value add value 1 0d
|
add a value to the set
|
public boolean contains double value return value map contains key value
|
returns whether the set contains the given value
|
public e get int index return array index
|
returns the array element at the specified single dimension
|
public int size return value map size
|
returns the number of values in the set
|
public double get mode double mode double na n double max weight double negative infinity for entry double double entry value map entry set double weight entry get value if weight max weight max weight weight mode entry get key return mode
|
returns the most common of the values in the set
|
public e get int indices return array get index indices
|
returns the array element at the position specified by the
|
public void set int index e e array index e
|
sets the array element at the specified single dimension
|
public void set int indices e e array get index indices e
|
sets the array element at the position specified by the given
|
public int get index int indices return sum product indices combinations
|
computes the single dimension array index from the given
|
public void write int b throws ioexception for int i 0 i out length i out i write b
|
implements the abstract method of the superclass
|
public void close throws ioexception for int i 0 i out length i if system out equals out i system err equals out i out i close
|
closes all writers
|
private int sum product int first indices int second indices int first length first indices length int second length second indices length int length second length first length first length second length int product 0 for int i 0 i length i product first indices i second indices i return product
|
calculates the sum product of two int arrays
|
public void flush throws ioexception for int i 0 i out length i out i flush
|
flushes all writers
|
public boolean is a int child int parent while child parent child parent id child if child 1 return false return true
|
returns true if child is a parent
|
public int map name string name for int i 0 i names length i if names i equals name return i return 1
|
maps the name of a class to its index or 1 if unknown
|
public string map index int index if index 0 index names length return names index else return null
|
maps an index to its name
|
public boolean is distance return true
|
this method returns a boolean wheter this measure is a distance measure
|
public double calculate distance example first example example second example attributes attributes first example get attributes double first values new double attributes size double second values new double attributes size int i 0 for attribute attribute attributes first values i first example get value attribute second values i second example get value attribute i return calculate distance first values second values
|
this is a convinient method for calculating the distance between examples
|
public double calculate similarity example first example example second example attributes attributes first example get attributes double first values new double attributes size double second values new double attributes size int i 0 for attribute attribute attributes first values i first example get value attribute second values i second example get value attribute i return calculate similarity first values second values
|
this is a convinient method for calculating the similarity between examples
|
public boolean accept element probability double not required elements counter double population counter if probability random value population counter not required elements counter return false else population counter probability 1 random value 1 random generator next double return true
|
include element in the sample
|
public void add vector average vector av vector list add av
|
adds a new average vector
|
public average vector get vector int index return vector list get index
|
returns the average vector with index i
|
public int size return averages list size
|
returns the number of averages in the list
|
public array list get vector list return vector list
|
returns all average vectors as list
|
public int size return vector list size
|
returns the number of average vectors
|
public average vector average try average vector output average vector get vector 0 clone for int i 1 i size i average vector av get vector i for int j 0 j av size j output get averagable j build average av get averagable j return output catch clone not supported exception e throw new runtime exception clone of average vector is not supported e get message
|
calculates the mean value of the averagables of the average vectors and
|
public averagable get averagable int index return averages list get index
|
returns the averagable by index
|
public double calculate distance double x1 double x2 return inner product x1 x2
|
subclasses must implement this method
|
public averagable get averagable string name iterator averagable i averages list iterator while i has next averagable a i next if a get name equals name return a return null
|
returns the averagable by name
|
public int get size return averages list size
|
returns the number of averagables in this vector
|
public double calculate distance double x1 double x2 k tanh a x y b double prod a inner product x1 x2 b double e1 math exp prod double e2 math exp prod return e1 e2 e1 e2
|
subclasses must implement this method
|
public double calculate distance double x1 double x2 return math exp this gamma norm2 x1 x2 gamma params gamma
|
calculates kernel value of vectors x and y
|
public double calculate distance double x1 double x2 double expression norm2 x1 x2 sigma if expression 1 return 0 0d else double minus 1 0d expression return math pow minus degree
|
calculates kernel value of vectors x and y
|
public void set polynomial parameters double degree double shift this degree degree this shift shift
|
sets the used polynomial parameters
|
public double calculate distance double x1 double x2 double prod inner product x1 x2 shift double result prod for int i 1 i degree i result prod return result
|
subclasses must implement this method
|
public void init example set example set this example set example set int example set size example set size if example set size 8000 this cache new full cache example set this else this cache new map based cache example set size
|
calculates all distances and store them in a matrix to speed up
|
public double get distance int x1 int x2 double result cache get x1 x2 if double is na n result result calculate distance get attribute values x1 get attribute values x2 cache store x1 x2 result return result
|
returns the distance between the examples with the given indices
|
public double calculate distance double x1 double x2 double norm2 norm2 x1 x2 double exp1 sigma1 0 0d 0 0d math exp 1 norm2 sigma1 double exp2 sigma2 0 0d 0 0d math exp 1 norm2 sigma2 double exp3 sigma3 0 0d 0 0d math exp 1 norm2 sigma3 return exp1 exp2 exp3
|
calculates kernel value of vectors x and y
|
public double calculate distance double x1 double x2 return math sqrt norm2 x1 x2 sigma shift shift
|
calculates kernel value of vectors x and y
|
public double inner product double x1 double x2 double result 0 0d for int i 0 i x1 length i result x1 i x2 i return result
|
calculates the inner product of the given vectors
|
public double norm2 double x1 double x2 double result 0 for int i 0 i x1 length i double factor x1 i x2 i result factor factor return result
|
calculates the l2 norm i
|
public double get sum collection support vectors double current x double sum 0 0d iterator i support vectors iterator while i has next support vector sv support vector i next sum sv get y sv get alpha calculate distance sv get x current x return sum
|
calculates w x from the given support vectors using this kernel function
|
public double get false positives return false positives
|
returns the number of false positives not the rate
|
public double get true positives return true positives
|
returns the number of true positives not the rate
|
public double get magnitude int n return 2 0d math sqrt real real imaginary imaginary n
|
normalizes the amplitude to the correct value
|
public void add all collection individual new individuals individuals add all new individuals
|
adds all individuals from the given collection
|
public void next iteration throws operator exception
|
this method is invoked after each evaluation
|
public void sort comparator individual comparator collections sort individuals comparator
|
sorts the individuals in ascending order according to their performance
|
protected population create initial population int pop size int individual size population init pop new population pop size individual size for int i 0 i pop size i double values new double individual size for int j 0 j values length j values j random next double in range min value max value init pop set values i values return init pop
|
creates the initial population
|
private void evaluate population population throws operator exception performance vector fitness values new performance vector population get number of individuals for int i 0 i fitness values length i double individual population get values i fitness values i evaluate individual individual population set fitness vector fitness values
|
calculates the fitness for all individuals and gives the fitness values
|
public int get generation return population get generation
|
returns the current generation
|
public double get best fitness in generation return population get best fitness in generation
|
returns the best fitness in the current generation
|
public double get best fitness ever return population get best fitness ever
|
returns the best fitness ever
|
public void enable actions if swing utilities is event dispatch thread enable actions now else swing utilities invoke later new runnable public void run enable actions now
|
enables and disables all actions according to the current state
|
public performance vector get best performance ever return population get best performance ever
|
returns the best performance vector ever
|
public double calculate double values reset for int i 0 i values length i update values i return get value
|
resets the counters and computes the aggregation function
|
public double calculate double values double weights reset if values length weights length return double na n for int i 0 i values length i update values i weights i return get value
|
resets the counters and computes the aggregation function
|
public double get best fitness in generation individual individual population get current best if individual null return individual get fitness values 0 else return double na n
|
returns the best fitness in the current generation
|
public double get best fitness ever individual individual population get best ever if individual null return individual get fitness values 0 else return double na n
|
returns the best fitness ever
|
public big integer get number of combinations left return num left
|
return number of combinations not yet generated
|
public performance vector get best performance ever individual individual population get best ever if individual null return individual get fitness else return null
|
returns the best performance vector ever
|
private population create min start population population population new population for int p 0 p this population size p double alphas new double this individual size for int j 0 j alphas length j alphas j this min j population add new individual alphas return population
|
randomly creates the initial population
|
private population create max start population population population new population for int p 0 p this population size p double alphas new double this individual size for int j 0 j alphas length j alphas j this max j population add new individual alphas return population
|
randomly creates the initial population
|
private population create fixed start population double fixed value population population new population for int p 0 p this population size p double alphas new double this individual size for int j 0 j alphas length j alphas j fixed value population add new individual alphas return population
|
randomly creates the initial population
|
public void remove menu int index menu bar remove menu bar get menu index
|
this methods provide plugins the possibility to modify the menus
|
public double get distance int point1 int point2 int dimensions double distance 0 for int i 0 i point1 length i int coord1 point1 i 0 dimensions i point1 i point1 i wrapping around if incoming coordinate is negative int coord2 point2 i 0 dimensions i point2 i point2 i double diff math min math abs coord1 coord2 coord1 dimensions i coord2 dimensions i distance diff diff distance math sqrt distance return distance
|
integer distance calculation regards the wrap around of the net hypertorus
|
private boolean is ok peak series int current int index if series current get magnitude series index get magnitude return false else return true
|
in the minimum case this method returns true if the current value is
|
public int get average count return this average count
|
returns the number of averagables used to create this averagable
|
public double get best threshold return best threshold
|
the best threshold will automatically be determined during the calculation of the
|
public component get visualization component iocontainer io container jpanel info panel new jpanel new flow layout flow layout left jtext pane info text new jtext pane info text set editable false info text set background info panel get background info text set font info text get font derive font font bold info text set text to result string info panel add info text info panel set border border factory create etched border return info panel
|
this default implementation returns a framed text pane containing the string
|
public boolean format percent return false
|
indicates wether or not percentage format should be used in the
|
public object clone return new group tree this
|
returns a deep clone of this tree
|
public string get main group name if get parent null return root else if get parent get parent null return get name else return get parent get main group name
|
returns the main group name i
|
private void set parent group tree parent this parent parent
|
sets the parent of this group
|
private group tree get parent return parent
|
returns the parent of this group
|
public double next double in range double lower bound double upper bound if upper bound lower bound throw new illegal argument exception random generator next double in range the upper bound of the random number range should be greater than the lower bound return next double upper bound lower bound lower bound
|
returns the next pseudorandom uniformly distributed code double code
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.