repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
ClassSelector.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, Instances): inst = None data = self.input.payload elif isinstance(self.inpu...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, Instances): inst = None data = self.input.payload elif isinstance(self.inpu...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L687-L718
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Train.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Tra...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Tra...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L761-L778
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Train.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, Instances): inst = None data = self.input.payload else: inst = ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, Instances): inst = None data = self.input.payload else: inst = ...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L793-L843
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Filter.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "setup" ...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "setup" ...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L885-L906
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Filter.check_input
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if token is None: raise Exception(self.full_name + ": No token provided!") if isinstance(...
python
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if token is None: raise Exception(self.full_name + ": No token provided!") if isinstance(...
Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L908-L921
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Filter.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, Instance): inst = self.input.payload data = Instances.template_instances(inst.datas...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, Instance): inst = self.input.payload data = Instances.template_instances(inst.datas...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L923-L966
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
DeleteFile.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Del...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Del...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1004-L1021
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
DeleteFile.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ fname = str(self.input.payload) spattern = str(self.resolve_option("regexp")) pattern = None if (spattern is not None...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ fname = str(self.input.payload) spattern = str(self.resolve_option("regexp")) pattern = None if (spattern is not None...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1023-L1038
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
CrossValidate.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Cro...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Cro...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1078-L1119
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
CrossValidate.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ data = self.input.payload cls = self.resolve_option("setup") if isinstance(cls, Classifier): cls = Classifier.mak...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ data = self.input.payload cls = self.resolve_option("setup") if isinstance(cls, Classifier): cls = Classifier.mak...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1132-L1163
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Evaluate.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Eva...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Eva...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1201-L1230
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Evaluate.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ data = self.input.payload if self.storagehandler is None: return "No storage handler available!" sname = str(self...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ data = self.input.payload if self.storagehandler is None: return "No storage handler available!" sname = str(self...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1243-L1271
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
EvaluationSummary.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Eva...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Eva...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1311-L1340
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
EvaluationSummary.check_input
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if isinstance(token.payload, Evaluation): return None if isinstance(token.payload, Cluste...
python
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if isinstance(token.payload, Evaluation): return None if isinstance(token.payload, Cluste...
Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1342-L1355
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
EvaluationSummary.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ evl = self.input.payload if isinstance(evl, Evaluation): summary = evl.summary(title=self.resolve_option("title"), comple...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ evl = self.input.payload if isinstance(evl, Evaluation): summary = evl.summary(title=self.resolve_option("title"), comple...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1357-L1372
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
ModelReader.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ fname = self.input.payload data = serialization.read_all(fname) if len(data) == 1: if is_instance_of(data[0], "we...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ fname = self.input.payload data = serialization.read_all(fname) if len(data) == 1: if is_instance_of(data[0], "we...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1400-L1426
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Convert.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "setup" ...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "setup" ...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1464-L1479
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Convert.check_input
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if token is None: raise Exception(self.full_name + ": No token provided!") self.config["s...
python
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if token is None: raise Exception(self.full_name + ": No token provided!") self.config["s...
Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1481-L1490
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Convert.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ conv = self.config["setup"].shallow_copy() conv.input = self._input.payload result = conv.convert() if result is None...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ conv = self.config["setup"].shallow_copy() conv.input = self._input.payload result = conv.convert() if result is None...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1492-L1505
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
AttributeSelection.quickinfo
def quickinfo(self): """ Returns a short string describing some of the options of the actor. :return: the info, None if not available :rtype: str """ return "search: " + base.to_commandline(self.config["search"]) + ", eval: " \ + base.to_commandline(self.c...
python
def quickinfo(self): """ Returns a short string describing some of the options of the actor. :return: the info, None if not available :rtype: str """ return "search: " + base.to_commandline(self.config["search"]) + ", eval: " \ + base.to_commandline(self.c...
Returns a short string describing some of the options of the actor. :return: the info, None if not available :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1537-L1545
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
AttributeSelection.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "search" ...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "search" ...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1547-L1568
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
AttributeSelection.check_input
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if token is None: raise Exception(self.full_name + ": No token provided!") if not isinsta...
python
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if token is None: raise Exception(self.full_name + ": No token provided!") if not isinsta...
Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1570-L1580
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
AttributeSelection.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ data = self.input.payload search = self.config["search"].shallow_copy() evl = self.config["eval"].shallow_copy() asel...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ data = self.input.payload search = self.config["search"].shallow_copy() evl = self.config["eval"].shallow_copy() asel...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1582-L1603
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
RenameRelation.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Ren...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Ren...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1641-L1658
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
RenameRelation.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ relname = self.resolve_option("name") if isinstance(self.input.payload, Instance): self.input.payload.dataset.relationnam...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ relname = self.resolve_option("name") if isinstance(self.input.payload, Instance): self.input.payload.dataset.relationnam...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1673-L1686
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Copy.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, classes.JavaObject) and self.input.payload.is_serializable: copy = serialization.deepcopy(self....
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if isinstance(self.input.payload, classes.JavaObject) and self.input.payload.is_serializable: copy = serialization.deepcopy(self....
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1716-L1729
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Predict.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Pre...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ options = super(Pre...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1774-L1797
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Predict.check_input
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if isinstance(token.payload, Instance): return raise Exception(self.full_name + ": Unhand...
python
def check_input(self, token): """ Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token """ if isinstance(token.payload, Instance): return raise Exception(self.full_name + ": Unhand...
Performs checks on the input token. Raises an exception if unsupported. :param token: the token to check :type token: Token
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1799-L1808
fracpete/python-weka-wrapper3
python/weka/flow/transformer.py
Predict.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ inst = self.input.payload if not inst.has_class: return "No class set!" # load model? if self._model is ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ inst = self.input.payload if not inst.has_class: return "No class set!" # load model? if self._model is ...
The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/transformer.py#L1810-L1852
fracpete/python-weka-wrapper3
python/weka/plot/graph.py
plot_dot_graph
def plot_dot_graph(graph, filename=None): """ Plots a graph in graphviz dot notation. :param graph: the dot notation graph :type graph: str :param filename: the (optional) file to save the generated plot to. The extension determines the file format. :type filename: str """ if not plot.p...
python
def plot_dot_graph(graph, filename=None): """ Plots a graph in graphviz dot notation. :param graph: the dot notation graph :type graph: str :param filename: the (optional) file to save the generated plot to. The extension determines the file format. :type filename: str """ if not plot.p...
Plots a graph in graphviz dot notation. :param graph: the dot notation graph :type graph: str :param filename: the (optional) file to save the generated plot to. The extension determines the file format. :type filename: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/plot/graph.py#L29-L51
fracpete/python-weka-wrapper3
python/weka/core/stemmers.py
Stemmer.stem
def stem(self, s): """ Performs stemming on the string. :param s: the string to stem :type s: str :return: the stemmed string :rtype: str """ return javabridge.get_env().get_string(self.__stem(javabridge.get_env().new_string_utf(s)))
python
def stem(self, s): """ Performs stemming on the string. :param s: the string to stem :type s: str :return: the stemmed string :rtype: str """ return javabridge.get_env().get_string(self.__stem(javabridge.get_env().new_string_utf(s)))
Performs stemming on the string. :param s: the string to stem :type s: str :return: the stemmed string :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/stemmers.py#L43-L52
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
create_instances_from_matrices
def create_instances_from_matrices(x, y=None, name="data"): """ Allows the generation of an Instances object from a 2-dimensional matrix for X and a 1-dimensional matrix for Y (optional). All data must be numerical. Attributes can be converted to nominal with the weka.filters.unsupervised.attribute....
python
def create_instances_from_matrices(x, y=None, name="data"): """ Allows the generation of an Instances object from a 2-dimensional matrix for X and a 1-dimensional matrix for Y (optional). All data must be numerical. Attributes can be converted to nominal with the weka.filters.unsupervised.attribute....
Allows the generation of an Instances object from a 2-dimensional matrix for X and a 1-dimensional matrix for Y (optional). All data must be numerical. Attributes can be converted to nominal with the weka.filters.unsupervised.attribute.NumericToNominal filter. :param x: the input variables :type x:...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L1528-L1560
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.attribute_by_name
def attribute_by_name(self, name): """ Returns the specified attribute, None if not found. :param name: the name of the attribute :type name: str :return: the attribute or None :rtype: Attribute """ att = self.__attribute_by_name(javabridge.get_env().new_...
python
def attribute_by_name(self, name): """ Returns the specified attribute, None if not found. :param name: the name of the attribute :type name: str :return: the attribute or None :rtype: Attribute """ att = self.__attribute_by_name(javabridge.get_env().new_...
Returns the specified attribute, None if not found. :param name: the name of the attribute :type name: str :return: the attribute or None :rtype: Attribute
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L118-L131
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.add_instance
def add_instance(self, inst, index=None): """ Adds the specified instance to the dataset. :param inst: the Instance to add :type inst: Instance :param index: the 0-based index where to add the Instance :type index: int """ if index is None: se...
python
def add_instance(self, inst, index=None): """ Adds the specified instance to the dataset. :param inst: the Instance to add :type inst: Instance :param index: the 0-based index where to add the Instance :type index: int """ if index is None: se...
Adds the specified instance to the dataset. :param inst: the Instance to add :type inst: Instance :param index: the 0-based index where to add the Instance :type index: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L235-L247
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.set_instance
def set_instance(self, index, inst): """ Sets the Instance at the specified location in the dataset. :param index: the 0-based index of the instance to replace :type index: int :param inst: the Instance to set :type inst: Instance :return: the instance :r...
python
def set_instance(self, index, inst): """ Sets the Instance at the specified location in the dataset. :param index: the 0-based index of the instance to replace :type index: int :param inst: the Instance to set :type inst: Instance :return: the instance :r...
Sets the Instance at the specified location in the dataset. :param index: the 0-based index of the instance to replace :type index: int :param inst: the Instance to set :type inst: Instance :return: the instance :rtype: Instance
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L249-L261
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.delete
def delete(self, index=None): """ Removes either the specified Instance or all Instance objects. :param index: the 0-based index of the instance to remove :type index: int """ if index is None: javabridge.call(self.jobject, "delete", "()V") else: ...
python
def delete(self, index=None): """ Removes either the specified Instance or all Instance objects. :param index: the 0-based index of the instance to remove :type index: int """ if index is None: javabridge.call(self.jobject, "delete", "()V") else: ...
Removes either the specified Instance or all Instance objects. :param index: the 0-based index of the instance to remove :type index: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L263-L273
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.insert_attribute
def insert_attribute(self, att, index): """ Inserts the attribute at the specified location. :param att: the attribute to insert :type att: Attribute :param index: the index to insert the attribute at :type index: int """ javabridge.call(self.jobject, "in...
python
def insert_attribute(self, att, index): """ Inserts the attribute at the specified location. :param att: the attribute to insert :type att: Attribute :param index: the index to insert the attribute at :type index: int """ javabridge.call(self.jobject, "in...
Inserts the attribute at the specified location. :param att: the attribute to insert :type att: Attribute :param index: the index to insert the attribute at :type index: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L314-L323
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.train_cv
def train_cv(self, num_folds, fold, random=None): """ Generates a training fold for cross-validation. :param num_folds: the number of folds of cross-validation, eg 10 :type num_folds: int :param fold: the current fold (0-based) :type fold: int :param random: the ...
python
def train_cv(self, num_folds, fold, random=None): """ Generates a training fold for cross-validation. :param num_folds: the number of folds of cross-validation, eg 10 :type num_folds: int :param fold: the current fold (0-based) :type fold: int :param random: the ...
Generates a training fold for cross-validation. :param num_folds: the number of folds of cross-validation, eg 10 :type num_folds: int :param fold: the current fold (0-based) :type fold: int :param random: the random number generator :type random: Random :return: ...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L358-L378
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.copy_instances
def copy_instances(cls, dataset, from_row=None, num_rows=None): """ Creates a copy of the Instances. If either from_row or num_rows are None, then all of the data is being copied. :param dataset: the original dataset :type dataset: Instances :param from_row: the 0-based ...
python
def copy_instances(cls, dataset, from_row=None, num_rows=None): """ Creates a copy of the Instances. If either from_row or num_rows are None, then all of the data is being copied. :param dataset: the original dataset :type dataset: Instances :param from_row: the 0-based ...
Creates a copy of the Instances. If either from_row or num_rows are None, then all of the data is being copied. :param dataset: the original dataset :type dataset: Instances :param from_row: the 0-based start index of the rows to copy :type from_row: int :param num_rows:...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L408-L432
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.template_instances
def template_instances(cls, dataset, capacity=0): """ Uses the Instances as template to create an empty dataset. :param dataset: the original dataset :type dataset: Instances :param capacity: how many data rows to reserve initially (see compactify) :type capacity: int ...
python
def template_instances(cls, dataset, capacity=0): """ Uses the Instances as template to create an empty dataset. :param dataset: the original dataset :type dataset: Instances :param capacity: how many data rows to reserve initially (see compactify) :type capacity: int ...
Uses the Instances as template to create an empty dataset. :param dataset: the original dataset :type dataset: Instances :param capacity: how many data rows to reserve initially (see compactify) :type capacity: int :return: the empty dataset :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L435-L448
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.create_instances
def create_instances(cls, name, atts, capacity): """ Creates a new Instances. :param name: the relation name :type name: str :param atts: the list of attributes to use for the dataset :type atts: list of Attribute :param capacity: how many data rows to reserve in...
python
def create_instances(cls, name, atts, capacity): """ Creates a new Instances. :param name: the relation name :type name: str :param atts: the list of attributes to use for the dataset :type atts: list of Attribute :param capacity: how many data rows to reserve in...
Creates a new Instances. :param name: the relation name :type name: str :param atts: the list of attributes to use for the dataset :type atts: list of Attribute :param capacity: how many data rows to reserve initially (see compactify) :type capacity: int :return:...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L451-L470
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instances.merge_instances
def merge_instances(cls, inst1, inst2): """ Merges the two datasets (side-by-side). :param inst1: the first dataset :type inst1: Instances or str :param inst2: the first dataset :type inst2: Instances :return: the combined dataset :rtype: Instances ...
python
def merge_instances(cls, inst1, inst2): """ Merges the two datasets (side-by-side). :param inst1: the first dataset :type inst1: Instances or str :param inst2: the first dataset :type inst2: Instances :return: the combined dataset :rtype: Instances ...
Merges the two datasets (side-by-side). :param inst1: the first dataset :type inst1: Instances or str :param inst2: the first dataset :type inst2: Instances :return: the combined dataset :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L473-L486
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instance.dataset
def dataset(self): """ Returns the dataset that this instance belongs to. :return: the dataset or None if no dataset set :rtype: Instances """ dataset = javabridge.call(self.jobject, "dataset", "()Lweka/core/Instances;") if dataset is None: return Non...
python
def dataset(self): """ Returns the dataset that this instance belongs to. :return: the dataset or None if no dataset set :rtype: Instances """ dataset = javabridge.call(self.jobject, "dataset", "()Lweka/core/Instances;") if dataset is None: return Non...
Returns the dataset that this instance belongs to. :return: the dataset or None if no dataset set :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L577-L588
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instance.set_string_value
def set_string_value(self, index, s): """ Sets the string value at the specified position (0-based). :param index: the 0-based index of the inernal value :type index: int :param s: the string value :type s: str """ return self.__set_string_value(index, ja...
python
def set_string_value(self, index, s): """ Sets the string value at the specified position (0-based). :param index: the 0-based index of the inernal value :type index: int :param s: the string value :type s: str """ return self.__set_string_value(index, ja...
Sets the string value at the specified position (0-based). :param index: the 0-based index of the inernal value :type index: int :param s: the string value :type s: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L671-L680
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instance.create_instance
def create_instance(cls, values, classname="weka.core.DenseInstance", weight=1.0): """ Creates a new instance. :param values: the float values (internal format) to use, numpy array or list. :type values: ndarray or list :param classname: the classname of the instance (eg weka.co...
python
def create_instance(cls, values, classname="weka.core.DenseInstance", weight=1.0): """ Creates a new instance. :param values: the float values (internal format) to use, numpy array or list. :type values: ndarray or list :param classname: the classname of the instance (eg weka.co...
Creates a new instance. :param values: the float values (internal format) to use, numpy array or list. :type values: ndarray or list :param classname: the classname of the instance (eg weka.core.DenseInstance). :type classname: str :param weight: the weight of the instance ...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L764-L783
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Instance.create_sparse_instance
def create_sparse_instance(cls, values, max_values, classname="weka.core.SparseInstance", weight=1.0): """ Creates a new sparse instance. :param values: the list of tuples (0-based index and internal format float). The indices of the tuples must be in ascending order and ...
python
def create_sparse_instance(cls, values, max_values, classname="weka.core.SparseInstance", weight=1.0): """ Creates a new sparse instance. :param values: the list of tuples (0-based index and internal format float). The indices of the tuples must be in ascending order and ...
Creates a new sparse instance. :param values: the list of tuples (0-based index and internal format float). The indices of the tuples must be in ascending order and "max_values" must be set to the maximum number of attributes in the dataset. :type values: l...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L786-L813
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Attribute.values
def values(self): """ Returns the labels, strings or relation-values. :return: all the values, None if not NOMINAL, STRING, or RELATION :rtype: list """ enm = javabridge.call(self.jobject, "enumerateValues", "()Ljava/util/Enumeration;") if enm is None: ...
python
def values(self): """ Returns the labels, strings or relation-values. :return: all the values, None if not NOMINAL, STRING, or RELATION :rtype: list """ enm = javabridge.call(self.jobject, "enumerateValues", "()Ljava/util/Enumeration;") if enm is None: ...
Returns the labels, strings or relation-values. :return: all the values, None if not NOMINAL, STRING, or RELATION :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L913-L924
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Attribute.type_str
def type_str(self, short=False): """ Returns the type of the attribute as string. :return: the type :rtype: str """ if short: return javabridge.static_call( "weka/core/Attribute", "typeToStringShort", "(Lweka/core/Attribute;)Ljava/lang/String;...
python
def type_str(self, short=False): """ Returns the type of the attribute as string. :return: the type :rtype: str """ if short: return javabridge.static_call( "weka/core/Attribute", "typeToStringShort", "(Lweka/core/Attribute;)Ljava/lang/String;...
Returns the type of the attribute as string. :return: the type :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L946-L960
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Attribute.copy
def copy(self, name=None): """ Creates a copy of this attribute. :param name: the new name, uses the old one if None :type name: str :return: the copy of the attribute :rtype: Attribute """ if name is None: return Attribute( ja...
python
def copy(self, name=None): """ Creates a copy of this attribute. :param name: the new name, uses the old one if None :type name: str :return: the copy of the attribute :rtype: Attribute """ if name is None: return Attribute( ja...
Creates a copy of this attribute. :param name: the new name, uses the old one if None :type name: str :return: the copy of the attribute :rtype: Attribute
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L1119-L1133
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Attribute.create_nominal
def create_nominal(cls, name, labels): """ Creates a nominal attribute. :param name: the name of the attribute :type name: str :param labels: the list of string labels to use :type labels: list """ return Attribute( javabridge.make_instance( ...
python
def create_nominal(cls, name, labels): """ Creates a nominal attribute. :param name: the name of the attribute :type name: str :param labels: the list of string labels to use :type labels: list """ return Attribute( javabridge.make_instance( ...
Creates a nominal attribute. :param name: the name of the attribute :type name: str :param labels: the list of string labels to use :type labels: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L1162-L1173
fracpete/python-weka-wrapper3
python/weka/core/dataset.py
Attribute.create_relational
def create_relational(cls, name, inst): """ Creates a relational attribute. :param name: the name of the attribute :type name: str :param inst: the structure of the relational attribute :type inst: Instances """ return Attribute( javabridge.ma...
python
def create_relational(cls, name, inst): """ Creates a relational attribute. :param name: the name of the attribute :type name: str :param inst: the structure of the relational attribute :type inst: Instances """ return Attribute( javabridge.ma...
Creates a relational attribute. :param name: the name of the attribute :type name: str :param inst: the structure of the relational attribute :type inst: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/dataset.py#L1188-L1199
fracpete/python-weka-wrapper3
python/weka/core/jvm.py
add_bundled_jars
def add_bundled_jars(): """ Adds the bundled jars to the JVM's classpath. """ # determine lib directory with jars rootdir = os.path.split(os.path.dirname(__file__))[0] libdir = rootdir + os.sep + "lib" # add jars from lib directory for l in glob.glob(libdir + os.sep + "*.jar"): ...
python
def add_bundled_jars(): """ Adds the bundled jars to the JVM's classpath. """ # determine lib directory with jars rootdir = os.path.split(os.path.dirname(__file__))[0] libdir = rootdir + os.sep + "lib" # add jars from lib directory for l in glob.glob(libdir + os.sep + "*.jar"): ...
Adds the bundled jars to the JVM's classpath.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/jvm.py#L31-L42
fracpete/python-weka-wrapper3
python/weka/core/jvm.py
add_system_classpath
def add_system_classpath(): """ Adds the system's classpath to the JVM's classpath. """ if 'CLASSPATH' in os.environ: parts = os.environ['CLASSPATH'].split(os.pathsep) for part in parts: javabridge.JARS.append(part)
python
def add_system_classpath(): """ Adds the system's classpath to the JVM's classpath. """ if 'CLASSPATH' in os.environ: parts = os.environ['CLASSPATH'].split(os.pathsep) for part in parts: javabridge.JARS.append(part)
Adds the system's classpath to the JVM's classpath.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/jvm.py#L45-L52
fracpete/python-weka-wrapper3
python/weka/core/jvm.py
start
def start(class_path=None, bundled=True, packages=False, system_cp=False, max_heap_size=None): """ Initializes the javabridge connection (starts up the JVM). :param class_path: the additional classpath elements to add :type class_path: list :param bundled: whether to add jars from the "lib" directo...
python
def start(class_path=None, bundled=True, packages=False, system_cp=False, max_heap_size=None): """ Initializes the javabridge connection (starts up the JVM). :param class_path: the additional classpath elements to add :type class_path: list :param bundled: whether to add jars from the "lib" directo...
Initializes the javabridge connection (starts up the JVM). :param class_path: the additional classpath elements to add :type class_path: list :param bundled: whether to add jars from the "lib" directory :type bundled: bool :param packages: whether to add jars from Weka packages as well (bool) or an...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/jvm.py#L55-L123
fracpete/python-weka-wrapper3
python/weka/core/classes.py
get_class
def get_class(classname): """ Returns the class object associated with the dot-notation classname. Taken from here: http://stackoverflow.com/a/452981 :param classname: the classname :type classname: str :return: the class object :rtype: object """ parts = classname.split('.') m...
python
def get_class(classname): """ Returns the class object associated with the dot-notation classname. Taken from here: http://stackoverflow.com/a/452981 :param classname: the classname :type classname: str :return: the class object :rtype: object """ parts = classname.split('.') m...
Returns the class object associated with the dot-notation classname. Taken from here: http://stackoverflow.com/a/452981 :param classname: the classname :type classname: str :return: the class object :rtype: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L33-L49
fracpete/python-weka-wrapper3
python/weka/core/classes.py
get_jclass
def get_jclass(classname): """ Returns the Java class object associated with the dot-notation classname. :param classname: the classname :type classname: str :return: the class object :rtype: JB_Object """ try: return javabridge.class_for_name(classname) except: retu...
python
def get_jclass(classname): """ Returns the Java class object associated with the dot-notation classname. :param classname: the classname :type classname: str :return: the class object :rtype: JB_Object """ try: return javabridge.class_for_name(classname) except: retu...
Returns the Java class object associated with the dot-notation classname. :param classname: the classname :type classname: str :return: the class object :rtype: JB_Object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L52-L67
fracpete/python-weka-wrapper3
python/weka/core/classes.py
get_static_field
def get_static_field(classname, fieldname, signature): """ Returns the Java object associated with the static field of the specified class. :param classname: the classname of the class to get the field from :type classname: str :param fieldname: the name of the field to retriev :type fieldname:...
python
def get_static_field(classname, fieldname, signature): """ Returns the Java object associated with the static field of the specified class. :param classname: the classname of the class to get the field from :type classname: str :param fieldname: the name of the field to retriev :type fieldname:...
Returns the Java object associated with the static field of the specified class. :param classname: the classname of the class to get the field from :type classname: str :param fieldname: the name of the field to retriev :type fieldname: str :return: the object :rtype: JB_Object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L70-L87
fracpete/python-weka-wrapper3
python/weka/core/classes.py
get_classname
def get_classname(obj): """ Returns the classname of the JB_Object, Python class or object. :param obj: the java object or Python class/object to get the classname for :type obj: object :return: the classname :rtype: str """ if isinstance(obj, javabridge.JB_Object): cls = javabr...
python
def get_classname(obj): """ Returns the classname of the JB_Object, Python class or object. :param obj: the java object or Python class/object to get the classname for :type obj: object :return: the classname :rtype: str """ if isinstance(obj, javabridge.JB_Object): cls = javabr...
Returns the classname of the JB_Object, Python class or object. :param obj: the java object or Python class/object to get the classname for :type obj: object :return: the classname :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L90-L105
fracpete/python-weka-wrapper3
python/weka/core/classes.py
is_instance_of
def is_instance_of(obj, class_or_intf_name): """ Checks whether the Java object implements the specified interface or is a subclass of the superclass. :param obj: the Java object to check :type obj: JB_Object :param class_or_intf_name: the superclass or interface to check, dot notation or with forw...
python
def is_instance_of(obj, class_or_intf_name): """ Checks whether the Java object implements the specified interface or is a subclass of the superclass. :param obj: the Java object to check :type obj: JB_Object :param class_or_intf_name: the superclass or interface to check, dot notation or with forw...
Checks whether the Java object implements the specified interface or is a subclass of the superclass. :param obj: the Java object to check :type obj: JB_Object :param class_or_intf_name: the superclass or interface to check, dot notation or with forward slashes :type class_or_intf_name: str :return...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L108-L134
fracpete/python-weka-wrapper3
python/weka/core/classes.py
from_commandline
def from_commandline(cmdline, classname=None): """ Creates an OptionHandler based on the provided commandline string. :param cmdline: the commandline string to use :type cmdline: str :param classname: the classname of the wrapper to return other than OptionHandler (in dot-notation) :type classn...
python
def from_commandline(cmdline, classname=None): """ Creates an OptionHandler based on the provided commandline string. :param cmdline: the commandline string to use :type cmdline: str :param classname: the classname of the wrapper to return other than OptionHandler (in dot-notation) :type classn...
Creates an OptionHandler based on the provided commandline string. :param cmdline: the commandline string to use :type cmdline: str :param classname: the classname of the wrapper to return other than OptionHandler (in dot-notation) :type classname: str :return: the generated option handler instance...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1683-L1705
fracpete/python-weka-wrapper3
python/weka/core/classes.py
complete_classname
def complete_classname(classname): """ Attempts to complete a partial classname like '.J48' and returns the full classname if a single match was found, otherwise an exception is raised. :param classname: the partial classname to expand :type classname: str :return: the full classname :rtype...
python
def complete_classname(classname): """ Attempts to complete a partial classname like '.J48' and returns the full classname if a single match was found, otherwise an exception is raised. :param classname: the partial classname to expand :type classname: str :return: the full classname :rtype...
Attempts to complete a partial classname like '.J48' and returns the full classname if a single match was found, otherwise an exception is raised. :param classname: the partial classname to expand :type classname: str :return: the full classname :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1708-L1732
fracpete/python-weka-wrapper3
python/weka/core/classes.py
main
def main(): """ Runs a classifier from the command-line. Calls JVM start/stop automatically. Use -h to see all options. """ parser = argparse.ArgumentParser( description='Performs option handling operations from the command-line. Calls JVM start/stop automatically.') parser.add_argument(...
python
def main(): """ Runs a classifier from the command-line. Calls JVM start/stop automatically. Use -h to see all options. """ parser = argparse.ArgumentParser( description='Performs option handling operations from the command-line. Calls JVM start/stop automatically.') parser.add_argument(...
Runs a classifier from the command-line. Calls JVM start/stop automatically. Use -h to see all options.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L2031-L2084
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JSONObject.to_json
def to_json(self): """ Returns the options as JSON. :return: the object as string :rtype: str """ return json.dumps(self.to_dict(), sort_keys=True, indent=2, separators=(',', ': '))
python
def to_json(self): """ Returns the options as JSON. :return: the object as string :rtype: str """ return json.dumps(self.to_dict(), sort_keys=True, indent=2, separators=(',', ': '))
Returns the options as JSON. :return: the object as string :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L250-L257
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JSONObject.from_json
def from_json(cls, s): """ Restores the object from the given JSON. :param s: the JSON string to parse :type s: str :return: the """ d = json.loads(s) return get_dict_handler(d["type"])(d)
python
def from_json(cls, s): """ Restores the object from the given JSON. :param s: the JSON string to parse :type s: str :return: the """ d = json.loads(s) return get_dict_handler(d["type"])(d)
Restores the object from the given JSON. :param s: the JSON string to parse :type s: str :return: the
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L260-L269
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Configurable.to_dict
def to_dict(self): """ Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict """ result = {} result["type"] = "Configurable" result["class"] = get_classname(self) result["config...
python
def to_dict(self): """ Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict """ result = {} result["type"] = "Configurable" result["class"] = get_classname(self) result["config...
Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L352-L369
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Configurable.from_dict
def from_dict(cls, d): """ Restores its state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict """ conf = {} for k in d["config"]: v = d["config"][k] if isinstance(v, dict): conf[st...
python
def from_dict(cls, d): """ Restores its state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict """ conf = {} for k in d["config"]: v = d["config"][k] if isinstance(v, dict): conf[st...
Restores its state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L372-L386
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Configurable.logger
def logger(self): """ Returns the logger object. :return: the logger :rtype: logger """ if self._logger is None: self._logger = self.new_logger() return self._logger
python
def logger(self): """ Returns the logger object. :return: the logger :rtype: logger """ if self._logger is None: self._logger = self.new_logger() return self._logger
Returns the logger object. :return: the logger :rtype: logger
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L398-L407
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Configurable.generate_help
def generate_help(self): """ Generates a help string for this actor. :return: the help string :rtype: str """ result = [] result.append(self.__class__.__name__) result.append(re.sub(r'.', '=', self.__class__.__name__)) result.append("") re...
python
def generate_help(self): """ Generates a help string for this actor. :return: the help string :rtype: str """ result = [] result.append(self.__class__.__name__) result.append(re.sub(r'.', '=', self.__class__.__name__)) result.append("") re...
Generates a help string for this actor. :return: the help string :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L419-L442
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JavaObject.classname
def classname(self): """ Returns the Java classname in dot-notation. :return: the Java classname :rtype: str """ cls = javabridge.call(self.jobject, "getClass", "()Ljava/lang/Class;") return javabridge.call(cls, "getName", "()Ljava/lang/String;")
python
def classname(self): """ Returns the Java classname in dot-notation. :return: the Java classname :rtype: str """ cls = javabridge.call(self.jobject, "getClass", "()Ljava/lang/Class;") return javabridge.call(cls, "getName", "()Ljava/lang/String;")
Returns the Java classname in dot-notation. :return: the Java classname :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L494-L502
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JavaObject.set_property
def set_property(self, path, jobject): """ Attempts to set the value (jobject, a Java object) of the provided (bean) property path. :param path: the property path, e.g., "filter" for a setFilter(...)/getFilter() method pair :type path: str :param jobject: the Java object to set;...
python
def set_property(self, path, jobject): """ Attempts to set the value (jobject, a Java object) of the provided (bean) property path. :param path: the property path, e.g., "filter" for a setFilter(...)/getFilter() method pair :type path: str :param jobject: the Java object to set;...
Attempts to set the value (jobject, a Java object) of the provided (bean) property path. :param path: the property path, e.g., "filter" for a setFilter(...)/getFilter() method pair :type path: str :param jobject: the Java object to set; if instance of JavaObject class, the jobject member is aut...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L504-L520
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JavaObject.enforce_type
def enforce_type(cls, jobject, intf_or_class): """ Raises an exception if the object does not implement the specified interface or is not a subclass. :param jobject: the Java object to check :type jobject: JB_Object :param intf_or_class: the classname in Java notation (eg "weka...
python
def enforce_type(cls, jobject, intf_or_class): """ Raises an exception if the object does not implement the specified interface or is not a subclass. :param jobject: the Java object to check :type jobject: JB_Object :param intf_or_class: the classname in Java notation (eg "weka...
Raises an exception if the object does not implement the specified interface or is not a subclass. :param jobject: the Java object to check :type jobject: JB_Object :param intf_or_class: the classname in Java notation (eg "weka.core.DenseInstance") :type intf_or_class: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L621-L631
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JavaObject.new_instance
def new_instance(cls, classname): """ Creates a new object from the given classname using the default constructor, None in case of error. :param classname: the classname in Java notation (eg "weka.core.DenseInstance") :type classname: str :return: the Java object :rtype:...
python
def new_instance(cls, classname): """ Creates a new object from the given classname using the default constructor, None in case of error. :param classname: the classname in Java notation (eg "weka.core.DenseInstance") :type classname: str :return: the Java object :rtype:...
Creates a new object from the given classname using the default constructor, None in case of error. :param classname: the classname in Java notation (eg "weka.core.DenseInstance") :type classname: str :return: the Java object :rtype: JB_Object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L634-L650
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Environment.add_variable
def add_variable(self, key, value, system_wide=False): """ Adds the environment variable. :param key: the name of the variable :type key: str :param value: the value :type value: str :param system_wide: whether to add the variable system wide :type system...
python
def add_variable(self, key, value, system_wide=False): """ Adds the environment variable. :param key: the name of the variable :type key: str :param value: the value :type value: str :param system_wide: whether to add the variable system wide :type system...
Adds the environment variable. :param key: the name of the variable :type key: str :param value: the value :type value: str :param system_wide: whether to add the variable system wide :type system_wide: bool
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L671-L685
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Environment.variable_names
def variable_names(self): """ Returns the names of all environment variables. :return: the names of the variables :rtype: list """ result = [] names = javabridge.call(self.jobject, "getVariableNames", "()Ljava/util/Set;") for name in javabridge.iterate_co...
python
def variable_names(self): """ Returns the names of all environment variables. :return: the names of the variables :rtype: list """ result = [] names = javabridge.call(self.jobject, "getVariableNames", "()Ljava/util/Set;") for name in javabridge.iterate_co...
Returns the names of all environment variables. :return: the names of the variables :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L707-L718
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JavaArray.component_type
def component_type(self): """ Returns the classname of the elements. :return: the class of the elements :rtype: str """ cls = javabridge.call(self.jobject, "getClass", "()Ljava/lang/Class;") comptype = javabridge.call(cls, "getComponentType", "()Ljava/lang/Class;...
python
def component_type(self): """ Returns the classname of the elements. :return: the class of the elements :rtype: str """ cls = javabridge.call(self.jobject, "getClass", "()Ljava/lang/Class;") comptype = javabridge.call(cls, "getComponentType", "()Ljava/lang/Class;...
Returns the classname of the elements. :return: the class of the elements :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L843-L852
fracpete/python-weka-wrapper3
python/weka/core/classes.py
JavaArray.new_instance
def new_instance(cls, classname, length): """ Creates a new array with the given classname and length; initial values are null. :param classname: the classname in Java notation (eg "weka.core.DenseInstance") :type classname: str :param length: the length of the array :ty...
python
def new_instance(cls, classname, length): """ Creates a new array with the given classname and length; initial values are null. :param classname: the classname in Java notation (eg "weka.core.DenseInstance") :type classname: str :param length: the length of the array :ty...
Creates a new array with the given classname and length; initial values are null. :param classname: the classname in Java notation (eg "weka.core.DenseInstance") :type classname: str :param length: the length of the array :type length: int :return: the Java array :rtype:...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L855-L870
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Enum.values
def values(self): """ Returns list of all enum members. :return: all enum members :rtype: list """ cls = javabridge.call(self.jobject, "getClass", "()Ljava/lang/Class;") clsname = javabridge.call(cls, "getName", "()Ljava/lang/String;") l = javabridge.stat...
python
def values(self): """ Returns list of all enum members. :return: all enum members :rtype: list """ cls = javabridge.call(self.jobject, "getClass", "()Ljava/lang/Class;") clsname = javabridge.call(cls, "getName", "()Ljava/lang/String;") l = javabridge.stat...
Returns list of all enum members. :return: all enum members :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L918-L932
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Random.next_int
def next_int(self, n=None): """ Next random integer. if n is provided, then between 0 and n-1. :param n: the upper limit (minus 1) for the random integer :type n: int :return: the next random integer :rtype: int """ if n is None: return javabr...
python
def next_int(self, n=None): """ Next random integer. if n is provided, then between 0 and n-1. :param n: the upper limit (minus 1) for the random integer :type n: int :return: the next random integer :rtype: int """ if n is None: return javabr...
Next random integer. if n is provided, then between 0 and n-1. :param n: the upper limit (minus 1) for the random integer :type n: int :return: the next random integer :rtype: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L949-L961
fracpete/python-weka-wrapper3
python/weka/core/classes.py
OptionHandler.options
def options(self): """ Obtains the currently set options as list. :return: the list of options :rtype: list """ if self.is_optionhandler: return typeconv.string_array_to_list(javabridge.call(self.jobject, "getOptions", "()[Ljava/lang/String;")) else: ...
python
def options(self): """ Obtains the currently set options as list. :return: the list of options :rtype: list """ if self.is_optionhandler: return typeconv.string_array_to_list(javabridge.call(self.jobject, "getOptions", "()[Ljava/lang/String;")) else: ...
Obtains the currently set options as list. :return: the list of options :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1077-L1087
fracpete/python-weka-wrapper3
python/weka/core/classes.py
OptionHandler.options
def options(self, options): """ Sets the command-line options (as list). :param options: the list of command-line options to set :type options: list """ if self.is_optionhandler: javabridge.call(self.jobject, "setOptions", "([Ljava/lang/String;)V", typeconv.s...
python
def options(self, options): """ Sets the command-line options (as list). :param options: the list of command-line options to set :type options: list """ if self.is_optionhandler: javabridge.call(self.jobject, "setOptions", "([Ljava/lang/String;)V", typeconv.s...
Sets the command-line options (as list). :param options: the list of command-line options to set :type options: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1090-L1098
fracpete/python-weka-wrapper3
python/weka/core/classes.py
OptionHandler.to_help
def to_help(self): """ Returns a string that contains the 'global_info' text and the options. :return: the generated help string :rtype: str """ result = [] result.append(self.classname) result.append("=" * len(self.classname)) result.append("") ...
python
def to_help(self): """ Returns a string that contains the 'global_info' text and the options. :return: the generated help string :rtype: str """ result = [] result.append(self.classname) result.append("=" * len(self.classname)) result.append("") ...
Returns a string that contains the 'global_info' text and the options. :return: the generated help string :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1112-L1136
fracpete/python-weka-wrapper3
python/weka/core/classes.py
OptionHandler.to_dict
def to_dict(self): """ Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict """ result = super(OptionHandler, self).to_dict() result["type"] = "OptionHandler" result["options"] = join_...
python
def to_dict(self): """ Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict """ result = super(OptionHandler, self).to_dict() result["type"] = "OptionHandler" result["options"] = join_...
Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1147-L1157
fracpete/python-weka-wrapper3
python/weka/core/classes.py
OptionHandler.from_dict
def from_dict(cls, d): """ Restores an object state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict :return: the object :rtype: object """ result = OptionHandler(cls.new_instance(d["class"])) result.optio...
python
def from_dict(cls, d): """ Restores an object state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict :return: the object :rtype: object """ result = OptionHandler(cls.new_instance(d["class"])) result.optio...
Restores an object state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict :return: the object :rtype: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1160-L1171
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Tags.find
def find(self, name): """ Returns the Tag that matches the name. :param name: the string representation of the tag :type name: str :return: the tag, None if not found :rtype: Tag """ result = None for t in self.array: if str(t) == name...
python
def find(self, name): """ Returns the Tag that matches the name. :param name: the string representation of the tag :type name: str :return: the tag, None if not found :rtype: Tag """ result = None for t in self.array: if str(t) == name...
Returns the Tag that matches the name. :param name: the string representation of the tag :type name: str :return: the tag, None if not found :rtype: Tag
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1471-L1485
fracpete/python-weka-wrapper3
python/weka/core/classes.py
Tags.get_object_tags
def get_object_tags(cls, javaobject, methodname): """ Instantiates the Tag array obtained from the object using the specified method name. Example: cls = Classifier(classname="weka.classifiers.meta.MultiSearch") tags = Tags.get_object_tags(cls, "getMetricsTags") :param ...
python
def get_object_tags(cls, javaobject, methodname): """ Instantiates the Tag array obtained from the object using the specified method name. Example: cls = Classifier(classname="weka.classifiers.meta.MultiSearch") tags = Tags.get_object_tags(cls, "getMetricsTags") :param ...
Instantiates the Tag array obtained from the object using the specified method name. Example: cls = Classifier(classname="weka.classifiers.meta.MultiSearch") tags = Tags.get_object_tags(cls, "getMetricsTags") :param javaobject: the javaobject to obtain the tags from :type javao...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1505-L1520
fracpete/python-weka-wrapper3
python/weka/core/classes.py
SelectedTag.tags
def tags(self): """ Returns the associated tags. :return: the list of Tag objects :rtype: list """ result = [] a = javabridge.call(self.jobject, "getTags", "()Lweka/core/Tag;]") length = javabridge.get_env().get_array_length(a) wrapped = javabridg...
python
def tags(self): """ Returns the associated tags. :return: the list of Tag objects :rtype: list """ result = [] a = javabridge.call(self.jobject, "getTags", "()Lweka/core/Tag;]") length = javabridge.get_env().get_array_length(a) wrapped = javabridg...
Returns the associated tags. :return: the list of Tag objects :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1569-L1582
fracpete/python-weka-wrapper3
python/weka/core/classes.py
SetupGenerator.base_object
def base_object(self): """ Returns the base object to apply the setups to. :return: the base object :rtype: JavaObject or OptionHandler """ jobj = javabridge.call(self.jobject, "getBaseObject", "()Ljava/io/Serializable;") if OptionHandler.check_type(jobj, "weka.c...
python
def base_object(self): """ Returns the base object to apply the setups to. :return: the base object :rtype: JavaObject or OptionHandler """ jobj = javabridge.call(self.jobject, "getBaseObject", "()Ljava/io/Serializable;") if OptionHandler.check_type(jobj, "weka.c...
Returns the base object to apply the setups to. :return: the base object :rtype: JavaObject or OptionHandler
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1961-L1972
fracpete/python-weka-wrapper3
python/weka/core/classes.py
SetupGenerator.base_object
def base_object(self, obj): """ Sets the base object to apply the setups to. :param obj: the object to use (must be serializable!) :type obj: JavaObject """ if not obj.is_serializable: raise Exception("Base object must be serializable: " + obj.classname) ...
python
def base_object(self, obj): """ Sets the base object to apply the setups to. :param obj: the object to use (must be serializable!) :type obj: JavaObject """ if not obj.is_serializable: raise Exception("Base object must be serializable: " + obj.classname) ...
Sets the base object to apply the setups to. :param obj: the object to use (must be serializable!) :type obj: JavaObject
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1975-L1984
fracpete/python-weka-wrapper3
python/weka/core/classes.py
SetupGenerator.parameters
def parameters(self): """ Returns the list of currently set search parameters. :return: the list of AbstractSearchParameter objects :rtype: list """ array = JavaArray(javabridge.call(self.jobject, "getParameters", "()[Lweka/core/setupgenerator/AbstractParameter;")) ...
python
def parameters(self): """ Returns the list of currently set search parameters. :return: the list of AbstractSearchParameter objects :rtype: list """ array = JavaArray(javabridge.call(self.jobject, "getParameters", "()[Lweka/core/setupgenerator/AbstractParameter;")) ...
Returns the list of currently set search parameters. :return: the list of AbstractSearchParameter objects :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L1987-L1998
fracpete/python-weka-wrapper3
python/weka/core/classes.py
SetupGenerator.parameters
def parameters(self, params): """ Sets the list of search parameters to use. :param params: list of AbstractSearchParameter objects :type params: list """ array = JavaArray(jobject=JavaArray.new_instance("weka.core.setupgenerator.AbstractParameter", len(params))) ...
python
def parameters(self, params): """ Sets the list of search parameters to use. :param params: list of AbstractSearchParameter objects :type params: list """ array = JavaArray(jobject=JavaArray.new_instance("weka.core.setupgenerator.AbstractParameter", len(params))) ...
Sets the list of search parameters to use. :param params: list of AbstractSearchParameter objects :type params: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L2001-L2011
fracpete/python-weka-wrapper3
python/weka/core/classes.py
SetupGenerator.setups
def setups(self): """ Generates and returns all the setups according to the parameter search space. :return: the list of configured objects (of type JavaObject) :rtype: list """ result = [] has_options = self.base_object.is_optionhandler enm = javabridge....
python
def setups(self): """ Generates and returns all the setups according to the parameter search space. :return: the list of configured objects (of type JavaObject) :rtype: list """ result = [] has_options = self.base_object.is_optionhandler enm = javabridge....
Generates and returns all the setups according to the parameter search space. :return: the list of configured objects (of type JavaObject) :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/classes.py#L2013-L2028
fracpete/python-weka-wrapper3
python/weka/flow/base.py
to_commandline
def to_commandline(o): """ Turns the object into a commandline string. However, first checks whether a string represents a internal value placeholder (@{...}). :param o: the object to turn into commandline :type o: object :return: the commandline :rtype: str """ if isinstance(o, str...
python
def to_commandline(o): """ Turns the object into a commandline string. However, first checks whether a string represents a internal value placeholder (@{...}). :param o: the object to turn into commandline :type o: object :return: the commandline :rtype: str """ if isinstance(o, str...
Turns the object into a commandline string. However, first checks whether a string represents a internal value placeholder (@{...}). :param o: the object to turn into commandline :type o: object :return: the commandline :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L662-L675
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.unique_name
def unique_name(self, name): """ Generates a unique name. :param name: the name to check :type name: str :return: the unique name :rtype: str """ result = name if self.parent is not None: index = self.index bname = re.sub(...
python
def unique_name(self, name): """ Generates a unique name. :param name: the name to check :type name: str :return: the unique name :rtype: str """ result = name if self.parent is not None: index = self.index bname = re.sub(...
Generates a unique name. :param name: the name to check :type name: str :return: the unique name :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L99-L123
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.parent
def parent(self, parent): """ Sets the parent of the actor. :param parent: the parent :type parent: Actor """ self._name = self.unique_name(self._name) self._full_name = None self._logger = None self._parent = parent
python
def parent(self, parent): """ Sets the parent of the actor. :param parent: the parent :type parent: Actor """ self._name = self.unique_name(self._name) self._full_name = None self._logger = None self._parent = parent
Sets the parent of the actor. :param parent: the parent :type parent: Actor
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L136-L146
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.full_name
def full_name(self): """ Obtains the full name of the actor. :return: the full name :rtype: str """ if self._full_name is None: fn = self.name.replace(".", "\\.") parent = self._parent if parent is not None: fn = parent...
python
def full_name(self): """ Obtains the full name of the actor. :return: the full name :rtype: str """ if self._full_name is None: fn = self.name.replace(".", "\\.") parent = self._parent if parent is not None: fn = parent...
Obtains the full name of the actor. :return: the full name :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L162-L176
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.fix_config
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "annotation" ...
python
def fix_config(self, options): """ Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict """ opt = "annotation" ...
Fixes the options, if necessary. I.e., it adds all required elements to the dictionary. :param options: the options to fix :type options: dict :return: the (potentially) fixed options :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L178-L199
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.to_dict
def to_dict(self): """ Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict """ result = super(Actor, self).to_dict() result["type"] = "Actor" result["name"] = self.name return...
python
def to_dict(self): """ Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict """ result = super(Actor, self).to_dict() result["type"] = "Actor" result["name"] = self.name return...
Returns a dictionary that represents this object, to be used for JSONification. :return: the object dictionary :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L201-L211
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.from_dict
def from_dict(cls, d): """ Restores an object state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict :return: the object :rtype: object """ conf = {} for k in d["config"]: v = d["config"][k] ...
python
def from_dict(cls, d): """ Restores an object state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict :return: the object :rtype: object """ conf = {} for k in d["config"]: v = d["config"][k] ...
Restores an object state from a dictionary, used in de-JSONification. :param d: the object dictionary :type d: dict :return: the object :rtype: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L214-L234
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.resolve_option
def resolve_option(self, name, default=None): """ Resolves the option, i.e., interprets "@{...}" values and retrievs them instead from internal storage. :param name: the name of the option :type name: str :param default: the optional default value :type default: ...
python
def resolve_option(self, name, default=None): """ Resolves the option, i.e., interprets "@{...}" values and retrievs them instead from internal storage. :param name: the name of the option :type name: str :param default: the optional default value :type default: ...
Resolves the option, i.e., interprets "@{...}" values and retrievs them instead from internal storage. :param name: the name of the option :type name: str :param default: the optional default value :type default: object :return: the resolved value :rtype: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L236-L261
fracpete/python-weka-wrapper3
python/weka/flow/base.py
Actor.storagehandler
def storagehandler(self): """ Returns the storage handler available to thise actor. :return: the storage handler, None if not available """ if isinstance(self, StorageHandler): return self elif self.parent is not None: return self.parent.storageha...
python
def storagehandler(self): """ Returns the storage handler available to thise actor. :return: the storage handler, None if not available """ if isinstance(self, StorageHandler): return self elif self.parent is not None: return self.parent.storageha...
Returns the storage handler available to thise actor. :return: the storage handler, None if not available
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L294-L305