input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public double get vektor int dim return this vector dim
|
returns the value of the objects vektor with dimension integer i dim i
|
public string get name return min max normalization model
|
returns a nicer name
|
public string to string return normalize between this min and this max
|
returns a string representation of this model
|
public example set apply on data example set example set throws operator exception attributes attributes example set get attributes for example example example set for attribute attribute attributes if attribute mean variance map contains key attribute get name tupel double double mean variance tupel attribute mean variance map get attribute get name if mean variance tupel get second double value 0 example set value attribute 0 else double new value example get value attribute mean variance tupel get first double value math sqrt mean variance tupel get second double value example set value attribute new value return example set
|
performs the transformation
|
public string get name return z transformation
|
returns a nicer name
|
public string to string string buffer result new string buffer result append normalize attribute mean variance map size attributes to mean 0 and variance 1 tools get line separator using int counter 0 for string name attribute mean variance map key set if counter 4 result append tools get line separator attribute mean variance map size 5 more attributes break tupel double double mean variance attribute mean variance map get name result append tools get line separator name mean mean variance get first double value variance mean variance get second double value counter return result to string
|
returns a string representation of this model
|
public void set outlier factor double factor this outlier factor factor
|
sets a double outlier i factor i to store smooth outlier status information
|
public example set apply on data example set example set throws operator exception for example example example set for attribute attribute example set get attributes string attribute name attribute get name if attribute sums contains key attribute name double sum attribute sums get attribute name double value example get value attribute example set value attribute value sum return example set
|
performs the transformation
|
public string get name return proportional normalization model
|
returns a nicer name
|
public string to string string buffer buffer new string buffer buffer append normalizes all attributes proportional to their respective total sum attributes sums n for entry string double entry attribute sums entry set buffer append entry get key entry get value double value n return buffer to string
|
returns a string representation of this model
|
public double get outlier factor return this outlier factor
|
returns the outlier factor of an object
|
public double get distance euclidian search object to object double distance 0 int dim of to object to object get dimensions int minimum dimensions 0 minimum dimensions math min this dimensions dim of to object if both are equal we can take the equal min for int i 0 i minimum dimensions i distance distance math pow this get vektor i to object get vektor i 2 return math sqrt distance
|
p returns the euclidian metric distance between two search objects by looking
|
public void set parameters parameters parameters this parameters parameters
|
sets all parameters of this operator
|
public boolean contains attribute list attribute attribute list attribute attribute iterator attribute i attribute list iterator while i has next if i next get name equals attribute get name return true return false
|
returns true if the list already contains an attribute with the given name
|
public enumeration get objects return this list of objects elements
|
this method returns an enumeration of all search objects from a search space
|
public void add kd container int index kdistance container kd this list ofk dcontainers add index kd
|
adds an existing kd container to the container list at position index
|
protected iodescription get iodescription boolean merge all true try merge all get parameter as int parameter merge type merge type all catch undefined parameter error e do nothing return new merge iodescription merge all
|
if you find the tt get input classes tt and
|
public void set parameter string key string value parameters set parameter key value
|
sets the given single parameter to the parameters object of this
|
public list iterator get kd container list iterator list iterator li this list ofk dcontainers list iterator return li
|
returns a list iterator for the list of containes in the search object
|
public void set kdistance int k double dist this k distance k dist
|
sets the k distance for the search object for k to dist
|
public void set list parameter string key list string list parameters set parameter key parameters transform list2 string list
|
sets the given parameter list to the parameters object of this operator
|
public double get kdistance int k return this k distance k
|
returns the k distance for the search object for k
|
public double get lrd int k return this lrd k
|
returns the local reachability density for k for a search object
|
public double get maximum outlier factor double max outlier factor 0 for int i 0 i this get number of objects i search object so this get object i if max outlier factor so get outlier factor max outlier factor so get outlier factor return max outlier factor
|
this method returns the maximum outlier factor of all search objects in the
|
public string get parameter string key throws undefined parameter error try return expand string replace macros parameters get parameter key catch undefined parameter error e e set operator this throw e
|
returns a single parameter retrieved from the
|
public void set lof int k double lof this local outlier factor k lof
|
sets the k lof for a search object to lof for k
|
public double get lof int k return this local outlier factor k
|
returns the k lof for a search object for k
|
public boolean is parameter set string key throws undefined parameter error return get parameter key null
|
returns true iff the parameter with the given name is set
|
public string get parameter as string string key throws undefined parameter error return get parameter key
|
returns a single named parameter and casts it to string
|
public boolean switch off feature attribute role role throws operator exception attribute feature role get attribute first type most general was omitted in parameters int type get parameter as int parameter skip features of type 1 int exception type get parameter as int parameter except features of type if exception type 0 return ontology attribute value type is a feature get value type type else return ontology attribute value type is a feature get value type type ontology attribute value type is a feature get value type exception type
|
implements the method required by the superclass
|
public int get parameter as int string key throws undefined parameter error parameter type type this parameters get parameter type key if type null if type instanceof parameter type category string parameter value get parameter key try return integer value of parameter value catch number format exception e parameter type category category type parameter type category type return category type get index parameter value else return integer value of get parameter key else return integer value of get parameter key
|
returns a single named parameter and casts it to int
|
public scan result before scan check attribute attribute throws user error return scan result unchecked
|
dont remove any attribute without checking values
|
public boolean switch off feature attribute role role throws operator exception attribute feature role get attribute first type most general was omitted in parameters int type get parameter as int parameter skip features of type 1 int exception type get parameter as int parameter except features of type if exception type 0 return ontology attribute block type is a feature get block type type else return ontology attribute block type is a feature get block type type ontology attribute block type is a feature get block type exception type
|
implements the method required by the superclass
|
public void init throws operator exception
|
will be invoked before the set value method is invoked for each example
|
public void clean up throws operator exception
|
will be invoked after the set value method was invoked for each example
|
public double get parameter as double string key throws undefined parameter error return double value of get parameter key
|
returns a single named parameter and casts it to double
|
public double get replenishment value int function index example set example set attribute attribute double current value string value string switch function index case none return current value case zero return 0 0 case max byte return current value 0 byte max value byte min value case max int return current value 0 integer max value integer min value case max double return current value 0 double max value double max value case missing return double na n case value return double parse double value string default throw new runtime exception illegal value function index function index
|
replaces the values
|
public boolean get parameter as boolean string key try return boolean value of get parameter key catch undefined parameter error e return false cannot happen
|
returns a single named parameter and casts it to boolean
|
public void set source string source name this source source name
|
sets the source of this ioobject
|
public logging handler get log if this logging handler null return this logging handler else return log service get global
|
gets the logging associated with the operator currently working on this
|
public void prepend model model model models add 0 model
|
adds the given model to the container
|
public void set logging handler logging handler logging handler this logging handler logging handler
|
sets the current working operator i
|
public void add model model model models add model
|
adds the given model to the container
|
public ioobject copy return this
|
returns not a copy but the very same object
|
public void remove model model model models remove model
|
removes the given model from the container
|
protected void init writing
|
initializes the writing of this object
|
public int get number of models return models size
|
returns the total number of models
|
public model get model int index return models get index
|
returns the i th model
|
public void set parameter string key object value throws operator exception boolean ok false iterator model i models iterator while i has next try i next set parameter key value ok true catch operator exception e if ok throw new user error null 204 get name key
|
invokes the method for all models
|
public boolean is documented return documented
|
returns true if this value should be documented
|
public component get visualization component iocontainer container if get number of models 0 return new jlabel html h1 empty model container h1 html else if get number of models 1 return get model 0 get visualization component container else return new extended jscroll pane new container model viewer this container
|
returns a visualization component with a model selector
|
public input stream get parameter as input stream string key throws undefined parameter error ioexception string url string get parameter key if url string null return null try url url new url url string input stream stream url open stream return stream catch malformed urlexception e url did not work try as file file file get parameter as file key if file null return new file input stream file else return null
|
returns a single named parameter and tries to handle it as url
|
private classifier get weka classifier string parameters throws operator exception string classifier name get weka class path classifier classifier null try classifier classifier for name classifier name parameters class clazz class for name classifier name classifier classifier clazz new instance if parameters null if classifier instanceof option handler option handler classifier set options parameters catch exception e throw new user error this e 904 new object classifier name e return classifier
|
returns the weka classifier based on the subtype of this operator
|
public string get weka class path string prefix name get operator class name string actual name prefix name substring weka tools weka operator prefix length for int i 0 i weka classifiers length i if weka classifiers i ends with actual name return weka classifiers i return null
|
this method is used by the
|
public list get weka parameter list return weka parameters
|
this method is used by the
|
public boolean is updatable return classifier instanceof updateable classifier
|
returns true if the weka classifier is updatable
|
public void update model example set update example set throws operator exception if classifier instanceof updateable classifier updateable classifier updateable classifier updateable classifier classifier update classifier updateable classifier update example set else throw new user error null 135 get class get name classifier get class
|
updates the model if the classifier is updatable
|
public boolean should estimate performance return false
|
returns true if the user wants to estimate the performance depending on
|
public boolean should calculate weights return false
|
returns true if the user wants to calculate feature weights depending on
|
public attribute weights get weights example set example set throws operator exception throw new user error this 916 get name calculation of weights not supported
|
returns the calculated weight vectors
|
public inner operator condition get inner operator condition return new last inner operator condition new class example set class new class model class
|
returns a simple chain condition
|
public parameter type get parameter type string name iterator parameter type i get parameter types iterator while i has next parameter type current i next if current get key equals name return current return null
|
returns the parameter type with the given name
|
public inner operator condition get inner operator condition return new all inner operator condition new class example set class new class model class
|
returns a simple chain condition
|
public void write xml print writer out string indent boolean hide default throws ioexception out println get xml indent hide default
|
writes the xml representation of this operator
|
public string get name return kernel model
|
the default implementation returns the classname without package
|
public string to string return linear
|
output as string
|
public double calculate k int x index double x att int y index double y att return innerproduct x index x att y index y att
|
calculates kernel value of vectors x and y
|
public string to string return poly degree
|
output as string
|
public string to string return gaussian combination s1 sigma1 s2 sigma2 s3 sigma3
|
output as string
|
public double calculate k int x index double x att int y index double y att double prod innerproduct x index x att y index y att double result prod for int i 1 i degree i result prod return result
|
calculates kernel value of vectors x and y
|
public double calculate k int x index double x att int y index double y att double norm2 norm2 x index x att y index y att 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 string to string return neural a b
|
output as string
|
public string to string return anova s sigma d degree
|
output as string
|
public double calculate k int x index double x att int y index double y att k tanh a x y b double prod a innerproduct x index x att y index y att b double e1 math exp prod double e2 math exp prod return e1 e2 e1 e2
|
calculates kernel value of vectors x and y
|
public string to string return epanechnikov s sigma d degree
|
output as string
|
public double calculate k int x index double x att int y index double y att double expression norm2 x index x att y index y att 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 string to string return rbf gamma
|
output as string
|
public string to string return abstract kernel class
|
output as string
|
public double calculate k int x index double x att int y index double y att return math exp gamma norm2 x index x att y index y att gamma params gamma
|
calculates kernel value of vectors x and y
|
public void init svmexamples examples int cache size mb the examples examples examples total the examples count examples dim the examples get dim init kernel cache cache size mb
|
init the kernel
|
public string to string return multiquadric sigma sigma shift shift
|
output as string
|
protected string get inner operators xml string indent boolean hide default return
|
writes the xml representation of the inner operators
|
public double calculate k int x index double x att int y index double y att return math sqrt norm2 x index x att y index y att sigma shift shift
|
calculates kernel value of vectors x and y
|
public void init kernel cache int size cache mb size array of train size doubles kernel cache size size 1048576 4 examples total if kernel cache size 1 kernel cache size 1 if kernel cache size the examples count examples kernel cache size the examples count examples kernel cache new cache kernel cache size examples total
|
inits the kernel cache
|
public void swap int pos1 int pos2 called after container swap kernel cache swap pos1 pos2
|
swap two training examples
|
public void init int size clean cache cache size size check if reserved memory big enough if cache size 1 cache size 1 elements new object cache size last used new long cache size index new int cache size 1 for int i 0 i cache size i elements i null last used i 0 index i integer max value index cache size integer max value
|
initialises the cache
|
protected void clean cache for int i 0 i cache size i elements i null elements null last used null index null
|
cleans the cache
|
public object get element int i int pos 0 object result null binary search for i in low high pos lookup i if pos cache size pos if index pos i last used pos 0 cache hit result elements pos counter last used pos counter return result
|
get element from cache
|
public boolean cached int i boolean ok int pos lookup i if index pos i if last used pos 0 ok true else ok false else ok false return ok
|
is element at this position cached
|
public int count examples return train size
|
counts the training examples
|
public void renew int i int pos lookup i if index pos i if last used pos 0 counter last used pos counter
|
mark element as recently used
|
public int count pos examples int result 0 for int i 0 i train size i if ys i 0 result return result
|
counts the positive training examples
|
public int get dim return dim
|
gets the dimension of the examples
|
public svmexample get example int pos x att atts pos x index index pos return x
|
gets an example
|
public double get y int pos return ys pos
|
gets an y value
|
public void set y int pos double y ys pos y
|
sets the label value for the specified example
|
public double eval double x return kernel eval x y
|
evaluate kernel basis function
|
public double get alpha int pos return alphas pos
|
gets an alpha value
|
public double get b return the examples get b
|
returns the value of b
|
public void swap int pos1 int pos2 double dummy a atts pos1 atts pos1 atts pos2 atts pos2 dummy a int dummy i index pos1 index pos1 index pos2 index pos2 dummy i double dummyd alphas pos1 alphas pos1 alphas pos2 alphas pos2 dummyd dummyd ys pos1 ys pos1 ys pos2 ys pos2 dummyd
|
swap two training examples
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.