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/base.py
Actor.execute
def execute(self): """ Executes the actor. :return: None if successful, otherwise error message :rtype: str """ if self.skip: return None result = self.pre_execute() if result is None: try: result = self.do_execute...
python
def execute(self): """ Executes the actor. :return: None if successful, otherwise error message :rtype: str """ if self.skip: return None result = self.pre_execute() if result is None: try: result = self.do_execute...
Executes the actor. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L384-L403
fracpete/python-weka-wrapper3
python/weka/flow/base.py
OutputProducer.output
def output(self): """ Returns the next available output token. :return: the next token, None if none available :rtype: Token """ if (self._output is None) or (len(self._output) == 0): result = None else: result = self._output.pop(0) ...
python
def output(self): """ Returns the next available output token. :return: the next token, None if none available :rtype: Token """ if (self._output is None) or (len(self._output) == 0): result = None else: result = self._output.pop(0) ...
Returns the next available output token. :return: the next token, None if none available :rtype: Token
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L544-L555
fracpete/python-weka-wrapper3
python/weka/flow/base.py
StorageHandler.expand
def expand(self, s): """ Expands all occurrences of "@{...}" within the string with the actual values currently stored in internal storage. :param s: the string to expand :type s: str :return: the expanded string :rtype: str """ result = s ...
python
def expand(self, s): """ Expands all occurrences of "@{...}" within the string with the actual values currently stored in internal storage. :param s: the string to expand :type s: str :return: the expanded string :rtype: str """ result = s ...
Expands all occurrences of "@{...}" within the string with the actual values currently stored in internal storage. :param s: the string to expand :type s: str :return: the expanded string :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L573-L593
fracpete/python-weka-wrapper3
python/weka/flow/base.py
StorageHandler.extract
def extract(cls, padded): """ Removes the surrounding "@{...}" from the name. :param padded: the padded string :type padded: str :return: the extracted name :rtype: str """ if padded.startswith("@{") and padded.endswith("}"): return padded[2:l...
python
def extract(cls, padded): """ Removes the surrounding "@{...}" from the name. :param padded: the padded string :type padded: str :return: the extracted name :rtype: str """ if padded.startswith("@{") and padded.endswith("}"): return padded[2:l...
Removes the surrounding "@{...}" from the name. :param padded: the padded string :type padded: str :return: the extracted name :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/base.py#L611-L623
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.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(Act...
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(Act...
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/control.py#L70-L87
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.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(ActorHandler, self).to_dict() result["type"] = "ActorHandler" del result["config"]["actor...
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(ActorHandler, self).to_dict() result["type"] = "ActorHandler" del result["config"]["actor...
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/control.py#L89-L102
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.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 = super(ActorHandler, cls).from_dict(d) if "actors" in d: ...
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 = super(ActorHandler, cls).from_dict(d) if "actors" in 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
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L105-L123
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.actors
def actors(self, actors): """ Sets the sub-actors of the actor. :param actors: the sub-actors :type actors: list """ if actors is None: actors = self.default_actors() self.check_actors(actors) self.config["actors"] = actors
python
def actors(self, actors): """ Sets the sub-actors of the actor. :param actors: the sub-actors :type actors: list """ if actors is None: actors = self.default_actors() self.check_actors(actors) self.config["actors"] = actors
Sets the sub-actors of the actor. :param actors: the sub-actors :type actors: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L139-L149
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.active
def active(self): """ Returns the count of non-skipped actors. :return: the count :rtype: int """ result = 0 for actor in self.actors: if not actor.skip: result += 1 return result
python
def active(self): """ Returns the count of non-skipped actors. :return: the count :rtype: int """ result = 0 for actor in self.actors: if not actor.skip: result += 1 return result
Returns the count of non-skipped actors. :return: the count :rtype: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L152-L163
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.first_active
def first_active(self): """ Returns the first non-skipped actor. :return: the first active actor, None if not available :rtype: Actor """ result = None for actor in self.actors: if not actor.skip: result = actor break ...
python
def first_active(self): """ Returns the first non-skipped actor. :return: the first active actor, None if not available :rtype: Actor """ result = None for actor in self.actors: if not actor.skip: result = actor break ...
Returns the first non-skipped actor. :return: the first active actor, None if not available :rtype: Actor
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L166-L178
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.last_active
def last_active(self): """ Returns the last non-skipped actor. :return: the last active actor, None if not available :rtype: Actor """ result = None for actor in reversed(self.actors): if not actor.skip: result = actor ...
python
def last_active(self): """ Returns the last non-skipped actor. :return: the last active actor, None if not available :rtype: Actor """ result = None for actor in reversed(self.actors): if not actor.skip: result = actor ...
Returns the last non-skipped actor. :return: the last active actor, None if not available :rtype: Actor
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L181-L193
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.index_of
def index_of(self, name): """ Returns the index of the actor with the given name. :param name: the name of the Actor to find :type name: str :return: the index, -1 if not found :rtype: int """ result = -1 for index, actor in enumerate(self.actors)...
python
def index_of(self, name): """ Returns the index of the actor with the given name. :param name: the name of the Actor to find :type name: str :return: the index, -1 if not found :rtype: int """ result = -1 for index, actor in enumerate(self.actors)...
Returns the index of the actor with the given name. :param name: the name of the Actor to find :type name: str :return: the index, -1 if not found :rtype: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L195-L209
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.setup
def setup(self): """ Configures the actor before execution. :return: None if successful, otherwise error message :rtype: str """ result = super(ActorHandler, self).setup() if result is None: self.update_parent() try: self.c...
python
def setup(self): """ Configures the actor before execution. :return: None if successful, otherwise error message :rtype: str """ result = super(ActorHandler, self).setup() if result is None: self.update_parent() try: self.c...
Configures the actor before execution. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L218-L247
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.wrapup
def wrapup(self): """ Finishes up after execution finishes, does not remove any graphical output. """ for actor in self.actors: if actor.skip: continue actor.wrapup() super(ActorHandler, self).wrapup()
python
def wrapup(self): """ Finishes up after execution finishes, does not remove any graphical output. """ for actor in self.actors: if actor.skip: continue actor.wrapup() super(ActorHandler, self).wrapup()
Finishes up after execution finishes, does not remove any graphical output.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L264-L272
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ActorHandler.cleanup
def cleanup(self): """ Destructive finishing up after execution stopped. """ for actor in self.actors: if actor.skip: continue actor.cleanup() super(ActorHandler, self).cleanup()
python
def cleanup(self): """ Destructive finishing up after execution stopped. """ for actor in self.actors: if actor.skip: continue actor.cleanup() super(ActorHandler, self).cleanup()
Destructive finishing up after execution stopped.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L274-L282
fracpete/python-weka-wrapper3
python/weka/flow/control.py
SequentialDirector.stop_execution
def stop_execution(self): """ Triggers the stopping of the object. """ if not (self._stopping or self._stopped): for actor in self.owner.actors: actor.stop_execution() self._stopping = True
python
def stop_execution(self): """ Triggers the stopping of the object. """ if not (self._stopping or self._stopped): for actor in self.owner.actors: actor.stop_execution() self._stopping = True
Triggers the stopping of the object.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L472-L479
fracpete/python-weka-wrapper3
python/weka/flow/control.py
SequentialDirector.do_execute
def do_execute(self): """ Actual execution of the director. :return: None if successful, otherwise error message :rtype: str """ self._stopped = False self._stopping = False not_finished_actor = self.owner.first_active pending_actors = [] ...
python
def do_execute(self): """ Actual execution of the director. :return: None if successful, otherwise error message :rtype: str """ self._stopped = False self._stopping = False not_finished_actor = self.owner.first_active pending_actors = [] ...
Actual execution of the director. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L540-L631
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Flow.check_actors
def check_actors(self, actors): """ Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list """ super(Flow, self).check_actors(actors) actor = self.first_active if (act...
python
def check_actors(self, actors): """ Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list """ super(Flow, self).check_actors(actors) actor = self.first_active if (act...
Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L672-L682
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Flow.load
def load(cls, fname): """ Loads the flow from a JSON file. :param fname: the file to load :type fname: str :return: the flow :rtype: Flow """ with open(fname) as f: content = f.readlines() return Flow.from_json(''.join(content))
python
def load(cls, fname): """ Loads the flow from a JSON file. :param fname: the file to load :type fname: str :return: the flow :rtype: Flow """ with open(fname) as f: content = f.readlines() return Flow.from_json(''.join(content))
Loads the flow from a JSON file. :param fname: the file to load :type fname: str :return: the flow :rtype: Flow
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L695-L706
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Sequence.new_director
def new_director(self): """ Creates the director to use for handling the sub-actors. :return: the director instance :rtype: Director """ result = SequentialDirector(self) result.record_output = False result.allow_source = False return result
python
def new_director(self): """ Creates the director to use for handling the sub-actors. :return: the director instance :rtype: Director """ result = SequentialDirector(self) result.record_output = False result.allow_source = False return result
Creates the director to use for handling the sub-actors. :return: the director instance :rtype: Director
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L756-L766
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Sequence.check_actors
def check_actors(self, actors): """ Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list """ super(Sequence, self).check_actors(actors) actor = self.first_active if ...
python
def check_actors(self, actors): """ Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list """ super(Sequence, self).check_actors(actors) actor = self.first_active if ...
Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L768-L778
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Sequence.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ self.first_active.input = self.input result = self._director.execute() if result is None: self._output.append(sel...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ self.first_active.input = self.input result = self._director.execute() if result is None: self._output.append(sel...
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/control.py#L780-L791
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Tee.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(Tee...
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(Tee...
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/control.py#L834-L854
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Tee.check_actors
def check_actors(self, actors): """ Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list """ super(Tee, self).check_actors(actors) actor = self.first_active if actor...
python
def check_actors(self, actors): """ Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list """ super(Tee, self).check_actors(actors) actor = self.first_active if actor...
Performs checks on the actors that are to be used. Raises an exception if invalid setup. :param actors: the actors to check :type actors: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L868-L881
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Tee.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None teeoff = True cond = self.storagehandler.expand(str(self.resolve_option("condition"))) if len(cond) > 0...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None teeoff = True cond = self.storagehandler.expand(str(self.resolve_option("condition"))) if len(cond) > 0...
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/control.py#L883-L900
fracpete/python-weka-wrapper3
python/weka/flow/control.py
Trigger.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(Tri...
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(Tri...
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/control.py#L942-L962
fracpete/python-weka-wrapper3
python/weka/flow/control.py
BranchDirector.check_actors
def check_actors(self): """ Checks the actors of the owner. Raises an exception if invalid. """ actors = [] for actor in self.owner.actors: if actor.skip: continue actors.append(actor) if len(actors) == 0: return ...
python
def check_actors(self): """ Checks the actors of the owner. Raises an exception if invalid. """ actors = [] for actor in self.owner.actors: if actor.skip: continue actors.append(actor) if len(actors) == 0: return ...
Checks the actors of the owner. Raises an exception if invalid.
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L1061-L1074
fracpete/python-weka-wrapper3
python/weka/flow/control.py
BranchDirector.do_execute
def do_execute(self): """ Actual execution of the director. :return: None if successful, otherwise error message :rtype: str """ result = None self._stopped = False self._stopping = False for actor in self.owner.actors: if self.is_st...
python
def do_execute(self): """ Actual execution of the director. :return: None if successful, otherwise error message :rtype: str """ result = None self._stopped = False self._stopping = False for actor in self.owner.actors: if self.is_st...
Actual execution of the director. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/control.py#L1091-L1111
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ContainerValuePicker.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(Con...
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(Con...
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/control.py#L1186-L1210
fracpete/python-weka-wrapper3
python/weka/flow/control.py
ContainerValuePicker.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None cont = self.input.payload name = str(self.resolve_option("value")) value = cont.get(name) switc...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None cont = self.input.payload name = str(self.resolve_option("value")) value = cont.get(name) switc...
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/control.py#L1212-L1236
fracpete/python-weka-wrapper3
python/weka/flow/conversion.py
CommandlineToAny.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(Com...
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(Com...
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/conversion.py#L188-L205
fracpete/python-weka-wrapper3
python/weka/flow/conversion.py
CommandlineToAny.check_input
def check_input(self, obj): """ Performs checks on the input object. Raises an exception if unsupported. :param obj: the object to check :type obj: object """ if isinstance(obj, str): return if isinstance(obj, unicode): return rais...
python
def check_input(self, obj): """ Performs checks on the input object. Raises an exception if unsupported. :param obj: the object to check :type obj: object """ if isinstance(obj, str): return if isinstance(obj, unicode): return rais...
Performs checks on the input object. Raises an exception if unsupported. :param obj: the object to check :type obj: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/conversion.py#L207-L218
fracpete/python-weka-wrapper3
python/weka/flow/conversion.py
CommandlineToAny.convert
def convert(self): """ Performs the actual conversion. :return: None if successful, otherwise errors message :rtype: str """ cname = str(self.config["wrapper"]) self._output = classes.from_commandline(self._input, classname=cname) return None
python
def convert(self): """ Performs the actual conversion. :return: None if successful, otherwise errors message :rtype: str """ cname = str(self.config["wrapper"]) self._output = classes.from_commandline(self._input, classname=cname) return None
Performs the actual conversion. :return: None if successful, otherwise errors message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/conversion.py#L220-L229
fracpete/python-weka-wrapper3
python/weka/plot/experiments.py
plot_experiment
def plot_experiment(mat, title="Experiment", axes_swapped=False, measure="Statistic", show_stdev=False, key_loc="lower right", outfile=None, wait=True): """ Plots the results from an experiment. :param mat: the result matrix to plot :type mat: ResultMatrix :param title: the titl...
python
def plot_experiment(mat, title="Experiment", axes_swapped=False, measure="Statistic", show_stdev=False, key_loc="lower right", outfile=None, wait=True): """ Plots the results from an experiment. :param mat: the result matrix to plot :type mat: ResultMatrix :param title: the titl...
Plots the results from an experiment. :param mat: the result matrix to plot :type mat: ResultMatrix :param title: the title for the experiment :type title: str :param axes_swapped: whether the axes whether swapped ("sets x cls" or "cls x sets") :type axes_swapped: bool :param measure: the m...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/plot/experiments.py#L28-L99
fracpete/python-weka-wrapper3
python/weka/plot/__init__.py
create_subsample
def create_subsample(data, percent, seed=1): """ Generates a subsample of the dataset. :param data: the data to create the subsample from :type data: Instances :param percent: the percentage (0-100) :type percent: float :param seed: the seed value to use :type seed: int """ if pe...
python
def create_subsample(data, percent, seed=1): """ Generates a subsample of the dataset. :param data: the data to create the subsample from :type data: Instances :param percent: the percentage (0-100) :type percent: float :param seed: the seed value to use :type seed: int """ if pe...
Generates a subsample of the dataset. :param data: the data to create the subsample from :type data: Instances :param percent: the percentage (0-100) :type percent: float :param seed: the seed value to use :type seed: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/plot/__init__.py#L45-L60
fracpete/python-weka-wrapper3
python/weka/classifiers.py
predictions_to_instances
def predictions_to_instances(data, preds): """ Turns the predictions turned into an Instances object. :param data: the original dataset format :type data: Instances :param preds: the predictions to convert :type preds: list :return: the predictions, None if no predictions present :rtype...
python
def predictions_to_instances(data, preds): """ Turns the predictions turned into an Instances object. :param data: the original dataset format :type data: Instances :param preds: the predictions to convert :type preds: list :return: the predictions, None if no predictions present :rtype...
Turns the predictions turned into an Instances object. :param data: the original dataset format :type data: Instances :param preds: the predictions to convert :type preds: list :return: the predictions, None if no predictions present :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L2061-L2114
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Classifier.distributions_for_instances
def distributions_for_instances(self, data): """ Peforms predictions, returning the class distributions. :param data: the Instances to get the class distributions for :type data: Instances :return: the class distribution matrix, None if not a batch predictor :rtype: ndar...
python
def distributions_for_instances(self, data): """ Peforms predictions, returning the class distributions. :param data: the Instances to get the class distributions for :type data: Instances :return: the class distribution matrix, None if not a batch predictor :rtype: ndar...
Peforms predictions, returning the class distributions. :param data: the Instances to get the class distributions for :type data: Instances :return: the class distribution matrix, None if not a batch predictor :rtype: ndarray
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L120-L132
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Classifier.batch_size
def batch_size(self, size): """ Sets the batch size, in case this classifier is a batch predictor. :param size: the size of the batch :type size: str """ if self.is_batchpredictor: javabridge.call(self.jobject, "setBatchSize", "(Ljava/lang/String;)V", size)
python
def batch_size(self, size): """ Sets the batch size, in case this classifier is a batch predictor. :param size: the size of the batch :type size: str """ if self.is_batchpredictor: javabridge.call(self.jobject, "setBatchSize", "(Ljava/lang/String;)V", size)
Sets the batch size, in case this classifier is a batch predictor. :param size: the size of the batch :type size: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L148-L156
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Classifier.to_source
def to_source(self, classname): """ Returns the model as Java source code if the classifier implements weka.classifiers.Sourcable. :param classname: the classname for the generated Java code :type classname: str :return: the model as source code string :rtype: str ...
python
def to_source(self, classname): """ Returns the model as Java source code if the classifier implements weka.classifiers.Sourcable. :param classname: the classname for the generated Java code :type classname: str :return: the model as source code string :rtype: str ...
Returns the model as Java source code if the classifier implements weka.classifiers.Sourcable. :param classname: the classname for the generated Java code :type classname: str :return: the model as source code string :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L196-L207
fracpete/python-weka-wrapper3
python/weka/classifiers.py
GridSearch.evaluation
def evaluation(self, evl): """ Sets the statistic to use for evaluation. :param evl: the statistic :type evl: SelectedTag, Tag or str """ if isinstance(evl, str): evl = self.tags_evaluation.find(evl) if isinstance(evl, Tag): evl = Selected...
python
def evaluation(self, evl): """ Sets the statistic to use for evaluation. :param evl: the statistic :type evl: SelectedTag, Tag or str """ if isinstance(evl, str): evl = self.tags_evaluation.find(evl) if isinstance(evl, Tag): evl = Selected...
Sets the statistic to use for evaluation. :param evl: the statistic :type evl: SelectedTag, Tag or str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L355-L366
fracpete/python-weka-wrapper3
python/weka/classifiers.py
GridSearch.x
def x(self): """ Returns a dictionary with all the current values for the X of the grid. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :return: the dictionary with the paramet...
python
def x(self): """ Returns a dictionary with all the current values for the X of the grid. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :return: the dictionary with the paramet...
Returns a dictionary with all the current values for the X of the grid. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :return: the dictionary with the parameters :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L369-L385
fracpete/python-weka-wrapper3
python/weka/classifiers.py
GridSearch.x
def x(self, d): """ Allows to configure the X of the grid with one method call. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :param d: the dictionary with the parameters ...
python
def x(self, d): """ Allows to configure the X of the grid with one method call. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :param d: the dictionary with the parameters ...
Allows to configure the X of the grid with one method call. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :param d: the dictionary with the parameters :type d: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L388-L408
fracpete/python-weka-wrapper3
python/weka/classifiers.py
GridSearch.y
def y(self): """ Returns a dictionary with all the current values for the Y of the grid. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :return: the dictionary with the paramet...
python
def y(self): """ Returns a dictionary with all the current values for the Y of the grid. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :return: the dictionary with the paramet...
Returns a dictionary with all the current values for the Y of the grid. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :return: the dictionary with the parameters :rtype: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L411-L427
fracpete/python-weka-wrapper3
python/weka/classifiers.py
GridSearch.y
def y(self, d): """ Allows to configure the Y of the grid with one method call. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :param d: the dictionary with the parameters ...
python
def y(self, d): """ Allows to configure the Y of the grid with one method call. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :param d: the dictionary with the parameters ...
Allows to configure the Y of the grid with one method call. Keys for the dictionary: property, min, max, step, base, expression Types: property=str, min=float, max=float, step=float, base=float, expression=str :param d: the dictionary with the parameters :type d: dict
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L430-L450
fracpete/python-weka-wrapper3
python/weka/classifiers.py
MultipleClassifiersCombiner.classifiers
def classifiers(self): """ Returns the list of base classifiers. :return: the classifier list :rtype: list """ objects = javabridge.get_env().get_object_array_elements( javabridge.call(self.jobject, "getClassifiers", "()[Lweka/classifiers/Classifier;")) ...
python
def classifiers(self): """ Returns the list of base classifiers. :return: the classifier list :rtype: list """ objects = javabridge.get_env().get_object_array_elements( javabridge.call(self.jobject, "getClassifiers", "()[Lweka/classifiers/Classifier;")) ...
Returns the list of base classifiers. :return: the classifier list :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L573-L585
fracpete/python-weka-wrapper3
python/weka/classifiers.py
MultipleClassifiersCombiner.classifiers
def classifiers(self, classifiers): """ Sets the base classifiers. :param classifiers: the list of base classifiers to use :type classifiers: list """ obj = [] for classifier in classifiers: obj.append(classifier.jobject) javabridge.call(self....
python
def classifiers(self, classifiers): """ Sets the base classifiers. :param classifiers: the list of base classifiers to use :type classifiers: list """ obj = [] for classifier in classifiers: obj.append(classifier.jobject) javabridge.call(self....
Sets the base classifiers. :param classifiers: the list of base classifiers to use :type classifiers: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L588-L598
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Kernel.eval
def eval(self, id1, id2, inst1): """ Computes the result of the kernel function for two instances. If id1 == -1, eval use inst1 instead of an instance in the dataset. :param id1: the index of the first instance in the dataset :type id1: int :param id2: the index of the s...
python
def eval(self, id1, id2, inst1): """ Computes the result of the kernel function for two instances. If id1 == -1, eval use inst1 instead of an instance in the dataset. :param id1: the index of the first instance in the dataset :type id1: int :param id2: the index of the s...
Computes the result of the kernel function for two instances. If id1 == -1, eval use inst1 instead of an instance in the dataset. :param id1: the index of the first instance in the dataset :type id1: int :param id2: the index of the second instance in the dataset :type id2: int ...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L666-L681
fracpete/python-weka-wrapper3
python/weka/classifiers.py
KernelClassifier.kernel
def kernel(self): """ Returns the current kernel. :return: the kernel or None if none found :rtype: Kernel """ result = javabridge.static_call( "weka/classifiers/KernelHelper", "getKernel", "(Ljava/lang/Object;)Lweka/classifiers/functions/supportV...
python
def kernel(self): """ Returns the current kernel. :return: the kernel or None if none found :rtype: Kernel """ result = javabridge.static_call( "weka/classifiers/KernelHelper", "getKernel", "(Ljava/lang/Object;)Lweka/classifiers/functions/supportV...
Returns the current kernel. :return: the kernel or None if none found :rtype: Kernel
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L727-L741
fracpete/python-weka-wrapper3
python/weka/classifiers.py
KernelClassifier.kernel
def kernel(self, kernel): """ Sets the kernel. :param kernel: the kernel to set :type kernel: Kernel """ result = javabridge.static_call( "weka/classifiers/KernelHelper", "setKernel", "(Ljava/lang/Object;Lweka/classifiers/functions/supportVector/K...
python
def kernel(self, kernel): """ Sets the kernel. :param kernel: the kernel to set :type kernel: Kernel """ result = javabridge.static_call( "weka/classifiers/KernelHelper", "setKernel", "(Ljava/lang/Object;Lweka/classifiers/functions/supportVector/K...
Sets the kernel. :param kernel: the kernel to set :type kernel: Kernel
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L744-L756
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.apply_cost_matrix
def apply_cost_matrix(self, data, rnd): """ Applies the cost matrix to the data. :param data: the data to apply to :type data: Instances :param rnd: the random number generator :type rnd: Random """ return Instances( javabridge.call( ...
python
def apply_cost_matrix(self, data, rnd): """ Applies the cost matrix to the data. :param data: the data to apply to :type data: Instances :param rnd: the random number generator :type rnd: Random """ return Instances( javabridge.call( ...
Applies the cost matrix to the data. :param data: the data to apply to :type data: Instances :param rnd: the random number generator :type rnd: Random
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L924-L936
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.expected_costs
def expected_costs(self, class_probs, inst=None): """ Calculates the expected misclassification cost for each possible class value, given class probability estimates. :param class_probs: the class probabilities :type class_probs: ndarray :return: the calculated costs ...
python
def expected_costs(self, class_probs, inst=None): """ Calculates the expected misclassification cost for each possible class value, given class probability estimates. :param class_probs: the class probabilities :type class_probs: ndarray :return: the calculated costs ...
Calculates the expected misclassification cost for each possible class value, given class probability estimates. :param class_probs: the class probabilities :type class_probs: ndarray :return: the calculated costs :rtype: ndarray
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L938-L956
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.get_cell
def get_cell(self, row, col): """ Returns the JB_Object at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :return: the object in that cell :rtype: JB_Object ...
python
def get_cell(self, row, col): """ Returns the JB_Object at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :return: the object in that cell :rtype: JB_Object ...
Returns the JB_Object at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :return: the object in that cell :rtype: JB_Object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L958-L970
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.set_cell
def set_cell(self, row, col, obj): """ Sets the JB_Object at the specified location. Automatically unwraps JavaObject. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param obj: the object for th...
python
def set_cell(self, row, col, obj): """ Sets the JB_Object at the specified location. Automatically unwraps JavaObject. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param obj: the object for th...
Sets the JB_Object at the specified location. Automatically unwraps JavaObject. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param obj: the object for that cell :type obj: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L972-L986
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.get_element
def get_element(self, row, col, inst=None): """ Returns the value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param inst: the Instace :type inst: Instance ...
python
def get_element(self, row, col, inst=None): """ Returns the value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param inst: the Instace :type inst: Instance ...
Returns the value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param inst: the Instace :type inst: Instance :return: the value in that cell :rtype: float
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L988-L1006
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.set_element
def set_element(self, row, col, value): """ Sets the float value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param value: the float value for that cell :typ...
python
def set_element(self, row, col, value): """ Sets the float value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param value: the float value for that cell :typ...
Sets the float value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param value: the float value for that cell :type value: float
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1008-L1020
fracpete/python-weka-wrapper3
python/weka/classifiers.py
CostMatrix.get_max_cost
def get_max_cost(self, class_value, inst=None): """ Gets the maximum cost for a particular class value. :param class_value: the class value to get the maximum cost for :type class_value: int :param inst: the Instance :type inst: Instance :return: the cost ...
python
def get_max_cost(self, class_value, inst=None): """ Gets the maximum cost for a particular class value. :param class_value: the class value to get the maximum cost for :type class_value: int :param inst: the Instance :type inst: Instance :return: the cost ...
Gets the maximum cost for a particular class value. :param class_value: the class value to get the maximum cost for :type class_value: int :param inst: the Instance :type inst: Instance :return: the cost :rtype: float
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1022-L1038
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Evaluation.crossvalidate_model
def crossvalidate_model(self, classifier, data, num_folds, rnd, output=None): """ Crossvalidates the model using the specified data, number of folds and random number generator wrapper. :param classifier: the classifier to cross-validate :type classifier: Classifier :param data:...
python
def crossvalidate_model(self, classifier, data, num_folds, rnd, output=None): """ Crossvalidates the model using the specified data, number of folds and random number generator wrapper. :param classifier: the classifier to cross-validate :type classifier: Classifier :param data:...
Crossvalidates the model using the specified data, number of folds and random number generator wrapper. :param classifier: the classifier to cross-validate :type classifier: Classifier :param data: the data to evaluate on :type data: Instances :param num_folds: the number of fol...
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1133-L1155
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Evaluation.summary
def summary(self, title=None, complexity=False): """ Generates a summary. :param title: optional title :type title: str :param complexity: whether to print the complexity information as well :type complexity: bool :return: the summary :rtype: str ...
python
def summary(self, title=None, complexity=False): """ Generates a summary. :param title: optional title :type title: str :param complexity: whether to print the complexity information as well :type complexity: bool :return: the summary :rtype: str ...
Generates a summary. :param title: optional title :type title: str :param complexity: whether to print the complexity information as well :type complexity: bool :return: the summary :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1221-L1237
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Evaluation.class_details
def class_details(self, title=None): """ Generates the class details. :param title: optional title :type title: str :return: the details :rtype: str """ if title is None: return javabridge.call( self.jobject, "toClassDetailsStr...
python
def class_details(self, title=None): """ Generates the class details. :param title: optional title :type title: str :return: the details :rtype: str """ if title is None: return javabridge.call( self.jobject, "toClassDetailsStr...
Generates the class details. :param title: optional title :type title: str :return: the details :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1239-L1253
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Evaluation.matrix
def matrix(self, title=None): """ Generates the confusion matrix. :param title: optional title :type title: str :return: the matrix :rtype: str """ if title is None: return javabridge.call(self.jobject, "toMatrixString", "()Ljava/lang/String;"...
python
def matrix(self, title=None): """ Generates the confusion matrix. :param title: optional title :type title: str :return: the matrix :rtype: str """ if title is None: return javabridge.call(self.jobject, "toMatrixString", "()Ljava/lang/String;"...
Generates the confusion matrix. :param title: optional title :type title: str :return: the matrix :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1255-L1267
fracpete/python-weka-wrapper3
python/weka/classifiers.py
Evaluation.predictions
def predictions(self): """ Returns the predictions. :return: the predictions. None if not available :rtype: list """ preds = javabridge.get_collection_wrapper( javabridge.call(self.jobject, "predictions", "()Ljava/util/ArrayList;")) if self.discard_pr...
python
def predictions(self): """ Returns the predictions. :return: the predictions. None if not available :rtype: list """ preds = javabridge.get_collection_wrapper( javabridge.call(self.jobject, "predictions", "()Ljava/util/ArrayList;")) if self.discard_pr...
Returns the predictions. :return: the predictions. None if not available :rtype: list
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L1905-L1925
fracpete/python-weka-wrapper3
python/weka/classifiers.py
PredictionOutput.print_all
def print_all(self, cls, data): """ Prints the header, classifications and footer to the buffer. :param cls: the classifier :type cls: Classifier :param data: the test data :type data: Instances """ javabridge.call( self.jobject, "print", "(Lw...
python
def print_all(self, cls, data): """ Prints the header, classifications and footer to the buffer. :param cls: the classifier :type cls: Classifier :param data: the test data :type data: Instances """ javabridge.call( self.jobject, "print", "(Lw...
Prints the header, classifications and footer to the buffer. :param cls: the classifier :type cls: Classifier :param data: the test data :type data: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L2001-L2012
fracpete/python-weka-wrapper3
python/weka/classifiers.py
PredictionOutput.print_classifications
def print_classifications(self, cls, data): """ Prints the classifications to the buffer. :param cls: the classifier :type cls: Classifier :param data: the test data :type data: Instances """ javabridge.call( self.jobject, "printClassification...
python
def print_classifications(self, cls, data): """ Prints the classifications to the buffer. :param cls: the classifier :type cls: Classifier :param data: the test data :type data: Instances """ javabridge.call( self.jobject, "printClassification...
Prints the classifications to the buffer. :param cls: the classifier :type cls: Classifier :param data: the test data :type data: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L2014-L2025
fracpete/python-weka-wrapper3
python/weka/classifiers.py
PredictionOutput.print_classification
def print_classification(self, cls, inst, index): """ Prints the classification to the buffer. :param cls: the classifier :type cls: Classifier :param inst: the test instance :type inst: Instance :param index: the 0-based index of the test instance :type ...
python
def print_classification(self, cls, inst, index): """ Prints the classification to the buffer. :param cls: the classifier :type cls: Classifier :param inst: the test instance :type inst: Instance :param index: the 0-based index of the test instance :type ...
Prints the classification to the buffer. :param cls: the classifier :type cls: Classifier :param inst: the test instance :type inst: Instance :param index: the 0-based index of the test instance :type index: int
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/classifiers.py#L2027-L2040
fracpete/python-weka-wrapper3
python/weka/core/tokenizers.py
Tokenizer.tokenize
def tokenize(self, s): """ Tokenizes the string. :param s: the string to tokenize :type s: str :return: the iterator :rtype: TokenIterator """ javabridge.call(self.jobject, "tokenize", "(Ljava/lang/String;)V", s) return TokenIterator(self)
python
def tokenize(self, s): """ Tokenizes the string. :param s: the string to tokenize :type s: str :return: the iterator :rtype: TokenIterator """ javabridge.call(self.jobject, "tokenize", "(Ljava/lang/String;)V", s) return TokenIterator(self)
Tokenizes the string. :param s: the string to tokenize :type s: str :return: the iterator :rtype: TokenIterator
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/core/tokenizers.py#L76-L86
fracpete/python-weka-wrapper3
python/weka/datagenerators.py
main
def main(): """ Runs a datagenerator from the command-line. Calls JVM start/stop automatically. Use -h to see all options. """ parser = argparse.ArgumentParser( description='Executes a data generator from the command-line. Calls JVM start/stop automatically.') parser.add_argument("-j", m...
python
def main(): """ Runs a datagenerator from the command-line. Calls JVM start/stop automatically. Use -h to see all options. """ parser = argparse.ArgumentParser( description='Executes a data generator from the command-line. Calls JVM start/stop automatically.') parser.add_argument("-j", m...
Runs a datagenerator 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/datagenerators.py#L180-L209
fracpete/python-weka-wrapper3
python/weka/datagenerators.py
DataGenerator.define_data_format
def define_data_format(self): """ Returns the data format. :return: the data format :rtype: Instances """ data = javabridge.call(self.jobject, "defineDataFormat", "()Lweka/core/Instances;") if data is None: return None else: return...
python
def define_data_format(self): """ Returns the data format. :return: the data format :rtype: Instances """ data = javabridge.call(self.jobject, "defineDataFormat", "()Lweka/core/Instances;") if data is None: return None else: return...
Returns the data format. :return: the data format :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/datagenerators.py#L50-L61
fracpete/python-weka-wrapper3
python/weka/datagenerators.py
DataGenerator.dataset_format
def dataset_format(self): """ Returns the dataset format. :return: the format :rtype: Instances """ data = javabridge.call(self.jobject, "getDatasetFormat", "()Lweka/core/Instances;") if data is None: return None else: return Insta...
python
def dataset_format(self): """ Returns the dataset format. :return: the format :rtype: Instances """ data = javabridge.call(self.jobject, "getDatasetFormat", "()Lweka/core/Instances;") if data is None: return None else: return Insta...
Returns the dataset format. :return: the format :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/datagenerators.py#L74-L85
fracpete/python-weka-wrapper3
python/weka/datagenerators.py
DataGenerator.generate_example
def generate_example(self): """ Returns a single Instance. :return: the next example :rtype: Instance """ data = javabridge.call(self.jobject, "generateExample", "()Lweka/core/Instance;") if data is None: return None else: return I...
python
def generate_example(self): """ Returns a single Instance. :return: the next example :rtype: Instance """ data = javabridge.call(self.jobject, "generateExample", "()Lweka/core/Instance;") if data is None: return None else: return I...
Returns a single Instance. :return: the next example :rtype: Instance
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/datagenerators.py#L116-L127
fracpete/python-weka-wrapper3
python/weka/datagenerators.py
DataGenerator.generate_examples
def generate_examples(self): """ Returns complete dataset. :return: the generated dataset :rtype: Instances """ data = javabridge.call(self.jobject, "generateExamples", "()Lweka/core/Instances;") if data is None: return None else: ...
python
def generate_examples(self): """ Returns complete dataset. :return: the generated dataset :rtype: Instances """ data = javabridge.call(self.jobject, "generateExamples", "()Lweka/core/Instances;") if data is None: return None else: ...
Returns complete dataset. :return: the generated dataset :rtype: Instances
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/datagenerators.py#L129-L140
fracpete/python-weka-wrapper3
python/weka/datagenerators.py
DataGenerator.make_copy
def make_copy(cls, generator): """ Creates a copy of the generator. :param generator: the generator to copy :type generator: DataGenerator :return: the copy of the generator :rtype: DataGenerator """ return from_commandline( to_commandline(gen...
python
def make_copy(cls, generator): """ Creates a copy of the generator. :param generator: the generator to copy :type generator: DataGenerator :return: the copy of the generator :rtype: DataGenerator """ return from_commandline( to_commandline(gen...
Creates a copy of the generator. :param generator: the generator to copy :type generator: DataGenerator :return: the copy of the generator :rtype: DataGenerator
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/datagenerators.py#L167-L177
fracpete/python-weka-wrapper3
python/weka/flow/source.py
FileSupplier.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(Fil...
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(Fil...
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/source.py#L116-L133
fracpete/python-weka-wrapper3
python/weka/flow/source.py
FileSupplier.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ for f in self.resolve_option("files"): self._output.append(Token(f)) return None
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ for f in self.resolve_option("files"): self._output.append(Token(f)) return 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/source.py#L135-L144
fracpete/python-weka-wrapper3
python/weka/flow/source.py
ListFiles.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 "dir: " + str(self.config["dir"]) \ + ", files: " + str(self.config["list_files"]) \ ...
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 "dir: " + str(self.config["dir"]) \ + ", files: " + str(self.config["list_files"]) \ ...
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/source.py#L173-L183
fracpete/python-weka-wrapper3
python/weka/flow/source.py
ListFiles.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(Lis...
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(Lis...
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/source.py#L185-L226
fracpete/python-weka-wrapper3
python/weka/flow/source.py
ListFiles._list
def _list(self, path, collected): """ Lists all the files/dirs in directory that match the pattern. :param path: the directory to search :type path: str :param collected: the files/dirs collected so far (full path) :type collected: list :return: None if successfu...
python
def _list(self, path, collected): """ Lists all the files/dirs in directory that match the pattern. :param path: the directory to search :type path: str :param collected: the files/dirs collected so far (full path) :type collected: list :return: None if successfu...
Lists all the files/dirs in directory that match the pattern. :param path: the directory to search :type path: str :param collected: the files/dirs collected so far (full path) :type collected: list :return: None if successful, error otherwise :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/source.py#L228-L260
fracpete/python-weka-wrapper3
python/weka/flow/source.py
ListFiles.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ directory = str(self.resolve_option("dir")) if not os.path.exists(directory): return "Directory '" + directory + "' does ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ directory = str(self.resolve_option("dir")) if not os.path.exists(directory): return "Directory '" + directory + "' does ...
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/source.py#L262-L279
fracpete/python-weka-wrapper3
python/weka/flow/source.py
GetStorageValue.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(Get...
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(Get...
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/source.py#L317-L334
fracpete/python-weka-wrapper3
python/weka/flow/source.py
GetStorageValue.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if self.storagehandler is None: return "No storage handler available!" sname = str(self.resolve_option("storage_name")) ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ if self.storagehandler is None: return "No storage handler available!" sname = str(self.resolve_option("storage_name")) ...
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/source.py#L336-L349
fracpete/python-weka-wrapper3
python/weka/flow/source.py
ForLoop.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(For...
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(For...
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/source.py#L389-L418
fracpete/python-weka-wrapper3
python/weka/flow/source.py
ForLoop.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ for i in range( int(self.resolve_option("min")), int(self.resolve_option("max")) + 1, int(sel...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ for i in range( int(self.resolve_option("min")), int(self.resolve_option("max")) + 1, int(sel...
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/source.py#L420-L432
fracpete/python-weka-wrapper3
python/weka/flow/source.py
LoadDatabase.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 = "db_url" ...
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 = "db_url" ...
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/source.py#L473-L518
fracpete/python-weka-wrapper3
python/weka/flow/source.py
LoadDatabase.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ iquery = InstanceQuery() iquery.db_url = str(self.resolve_option("db_url")) iquery.user = str(self.resolve_option("user")) ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ iquery = InstanceQuery() iquery.db_url = str(self.resolve_option("db_url")) iquery.user = str(self.resolve_option("user")) ...
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/source.py#L520-L537
fracpete/python-weka-wrapper3
python/weka/flow/source.py
DataGenerator.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/source.py#L575-L596
fracpete/python-weka-wrapper3
python/weka/flow/source.py
DataGenerator.to_config
def to_config(self, k, v): """ Hook method that allows conversion of individual options. :param k: the key of the option :type k: str :param v: the value :type v: object :return: the potentially processed value :rtype: object """ if k == "...
python
def to_config(self, k, v): """ Hook method that allows conversion of individual options. :param k: the key of the option :type k: str :param v: the value :type v: object :return: the potentially processed value :rtype: object """ if k == "...
Hook method that allows conversion of individual options. :param k: the key of the option :type k: str :param v: the value :type v: object :return: the potentially processed value :rtype: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/source.py#L598-L611
fracpete/python-weka-wrapper3
python/weka/flow/source.py
DataGenerator.from_config
def from_config(self, k, v): """ Hook method that allows converting values from the dictionary. :param k: the key in the dictionary :type k: str :param v: the value :type v: object :return: the potentially parsed value :rtype: object """ i...
python
def from_config(self, k, v): """ Hook method that allows converting values from the dictionary. :param k: the key in the dictionary :type k: str :param v: the value :type v: object :return: the potentially parsed value :rtype: object """ i...
Hook method that allows converting values from the dictionary. :param k: the key in the dictionary :type k: str :param v: the value :type v: object :return: the potentially parsed value :rtype: object
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/source.py#L613-L626
fracpete/python-weka-wrapper3
python/weka/flow/source.py
DataGenerator.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ generator = datagen.DataGenerator.make_copy(self.resolve_option("setup")) generator.dataset_format = generator.define_data_format() ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ generator = datagen.DataGenerator.make_copy(self.resolve_option("setup")) generator.dataset_format = generator.define_data_format() ...
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/source.py#L628-L643
fracpete/python-weka-wrapper3
python/weka/flow/source.py
CombineStorage.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(Com...
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(Com...
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/source.py#L681-L699
fracpete/python-weka-wrapper3
python/weka/flow/source.py
CombineStorage.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ formatstr = str(self.resolve_option("format")) expanded = self.storagehandler.expand(formatstr) self._output.append(Token(exp...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ formatstr = str(self.resolve_option("format")) expanded = self.storagehandler.expand(formatstr) self._output.append(Token(exp...
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/source.py#L701-L711
fracpete/python-weka-wrapper3
python/weka/flow/source.py
StringConstants.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(Str...
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(Str...
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/source.py#L749-L766
fracpete/python-weka-wrapper3
python/weka/flow/source.py
StringConstants.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ for s in self.resolve_option("strings"): self._output.append(Token(s)) return None
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ for s in self.resolve_option("strings"): self._output.append(Token(s)) return 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/source.py#L768-L777
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
Sink.post_execute
def post_execute(self): """ Gets executed after the actual execution. :return: None if successful, otherwise error message :rtype: str """ result = super(Sink, self).post_execute() if result is None: self._input = None return result
python
def post_execute(self): """ Gets executed after the actual execution. :return: None if successful, otherwise error message :rtype: str """ result = super(Sink, self).post_execute() if result is None: self._input = None return result
Gets executed after the actual execution. :return: None if successful, otherwise error message :rtype: str
https://github.com/fracpete/python-weka-wrapper3/blob/d850ab1bdb25fbd5a8d86e99f34a397975425838/python/weka/flow/sink.py#L46-L56
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
Console.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(Con...
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(Con...
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/sink.py#L129-L146
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
FileOutputSink.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(Fil...
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(Fil...
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/sink.py#L185-L202
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
DumpFile.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(Dum...
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(Dum...
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/sink.py#L240-L257
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
DumpFile.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None f = None try: if bool(self.resolve_option("append")): f = open(str(self.resolve_opt...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None f = None try: if bool(self.resolve_option("append")): f = open(str(self.resolve_opt...
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/sink.py#L259-L280
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
ModelWriter.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 not isinstance(token.payload, ModelContainer): raise Exception(self.full_name + ": Input token...
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 not isinstance(token.payload, ModelContainer): raise Exception(self.full_name + ": Input token...
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/sink.py#L308-L316
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
ModelWriter.do_execute
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None cont = self.input.payload serialization.write_all( str(self.resolve_option("output")), ...
python
def do_execute(self): """ The actual execution of the actor. :return: None if successful, otherwise error message :rtype: str """ result = None cont = self.input.payload serialization.write_all( str(self.resolve_option("output")), ...
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/sink.py#L318-L330
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
MatrixPlot.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(Mat...
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(Mat...
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/sink.py#L358-L405
fracpete/python-weka-wrapper3
python/weka/flow/sink.py
LinePlot.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(Lin...
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(Lin...
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/sink.py#L475-L522