def _load_version(self, state, version):
        from turicreate.toolkits.classifier.logistic_classifier import (
            LogisticClassifier, )

        state["classifier"] = LogisticClassifier(state["classifier"])
        state = _PythonProxy(state)
        return TextClassifier(state)
Exemple #2
0
    def _load_version(self, state, version):
        """
        A function to load a previously created DBSCANModel instance.

        Parameters
        ----------
        unpickler : GLUnpickler
            A GLUnpickler file handler.

        version : int
            Version number maintained by the class writer.
        """
        state = _PythonProxy(state)
        return DBSCANModel(state)
Exemple #3
0
 def __init__(self, state):
     self.__proxy__ = _PythonProxy(state)
Exemple #4
0
 def __init__(self, knn_model, state=None):
     self.__proxy__ = _PythonProxy(state)
     assert(isinstance(knn_model, _tc.nearest_neighbors.NearestNeighborsModel))
     self._knn_model = knn_model
Exemple #5
0
 def __init__(self, state):
     # We use PythonProxy here so that we get tab completion
     self.__proxy__ = _PythonProxy(state)
 def __init__(self, state=None):
     if(state != None):
         self.__proxy__ = _PythonProxy(state)
Exemple #7
0
    def __init__(self, state=None):
        if state is None:
            state = {}

        self.__proxy__ = _PythonProxy(state)
Exemple #8
0
 def _load_version(self, state, version):
     from turicreate.toolkits.classifier.logistic_classifier import LogisticClassifier
     state['classifier'] = LogisticClassifier(state['classifier'])
     state = _PythonProxy(state)
     return SentenceClassifier(state)
Exemple #9
0
 def _setup(self):
     """
     Sets stuff up.
     """
     self.__proxy__ = _PythonProxy()
Exemple #10
0
 def _setup(self):
     self.__proxy__ = _PythonProxy()