:py:mod:`ontolearn.binders` =========================== .. py:module:: ontolearn.binders .. autoapi-nested-parse:: Pyhon binders of other concept learners. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ontolearn.binders.PredictedConcept ontolearn.binders.DLLearnerBinder .. py:class:: PredictedConcept(**kwargs) .. py:method:: __iter__() .. py:class:: DLLearnerBinder(binary_path=None, model=None, kb_path=None, storage_path='.', max_runtime=3) dl-learner python binder. .. py:method:: write_dl_learner_config(pos: List[str], neg: List[str]) -> str Writes config file for dl-learner. :param pos: A list of URIs of individuals indicating positive examples in concept learning problem. :param neg: A list of URIs of individuals indicating negatives examples in concept learning problem. :returns: Path of generated config file. :rtype: str .. py:method:: fit(lp: ontolearn.learning_problem.PosNegLPStandard, max_runtime: int = None) Fit dl-learner model on a given positive and negative examples. :param lp: PosNegLPStandard :param lp.pos A list of URIs of individuals indicating positive examples in concept learning problem.: :param lp.neg A list of URIs of individuals indicating negatives examples in concept learning problem.: :param max_runtime: Limit to stop the algorithm after n seconds. :returns: self. .. py:method:: best_hypotheses(n: int = None) -> PredictedConcept .. py:method:: best_hypothesis() Return predictions if exists. :returns: The prediction or the string 'No prediction found.' .. py:method:: parse_dl_learner_output(output_of_dl_learner: List[str], file_path: str) -> Dict Parse the output received from executing dl-learner. :param output_of_dl_learner: The output of dl-learner to parse. :param file_path: The file path to store the output. :returns: ..., 'Accuracy': ..., 'F-measure': ...}. :rtype: A dictionary of {'Prediction' .. py:method:: train(dataset: List = None) -> None :staticmethod: Dummy method, currently it does nothing. .. py:method:: fit_from_iterable(dataset: List = None, max_runtime=None) -> List[Dict] :abstractmethod: Fit dl-learner model on a list of given positive and negative examples. :param dataset: A list of tuple (s,p,n) where s => string representation of target concept, p => positive examples, i.e. s(p)=1 and n => negative examples, i.e. s(n)=0. :param max_runtime: Limit to stop the algorithm after n seconds. :returns: self.