def __init__(self, **kwargs):
        ''' Create instance of the db management model
        Input:
            kwargs: various parameters
        '''
        # Call super class init first
        if (kwargs.get("default_name") == None):
            kwargs["default_name"] = "attribute_indexer"
        if (kwargs.get("model_type") == None):
            kwargs["model_type"] = attribute_index
        if (kwargs.get("index_uuid") == None):
            index_uuid = True
        else:
            index_uuid = kwargs.get("index_uuid")
        if (kwargs.get("update_index") == None):
            update_index = False
        else:
            update_index = kwargs.get("update_index")

        modeling_worker.__init__(self, **kwargs)

        self._model = kwargs.get("model")

        self._model_observations_query_info = kwargs.get("model_observations_query_info")

        self._value_index = {}
        self._processed_count = 0
        self._index_uuid = index_uuid
        self._update_index = update_index

        self.loadModel()
    def __init__(self, **kwargs):
        # Call super class init first
        if (kwargs.get("default_name") == None):
            kwargs["default_name"] = "multinomialnb_worker"
        if (kwargs.get("model_type") == None):
            kwargs["model_type"] = sklearn_utils.multinomial_nb_model

        modeling_worker.__init__(self, **kwargs)

        self._model_type = kwargs.get("model_type")
        self._model = kwargs.get("model")
        self._model_observations_query_info = kwargs.get(
            "model_observations_query_info")

        self._feature_vector_paths = kwargs.get("feature_vectors")
        self._truth_vector_paths = kwargs.get("truth_vectors")
Exemplo n.º 3
0
    def __init__(self, **kwargs):
        # Call super class init first
        if (kwargs.get("default_name") == None):
            kwargs["default_name"] = "decision_tree_regressor"
        if (kwargs.get("model_type") == None):
            kwargs["model_type"] = sklearn_utils.decision_tree_regressor_model

        modeling_worker.__init__(self, **kwargs)

        self._model_type = kwargs.get("model_type")
        self._model = kwargs.get("model")
        self._model_observations_query_info = kwargs.get(
            "model_observations_query_info")
        self._model_observations_manager_name = kwargs.get(
            "model_observations_manager_name")

        self._feature_vector_paths = kwargs.get("feature_vectors")
        self._truth_vector_paths = kwargs.get("truth_vectors")
    def __init__(self, **kwargs):
        """
    this is the first worker called in our pipline
    """
        if (kwargs.get("default_name") == None):
            kwargs["default_name"] = "example_worker"
        if (kwargs.get("model_type") == None):
            print("Making an exampleModel")
            kwargs["model_type"] = ExampleModel
        # Call super class init
        modeling_worker.__init__(self, **kwargs)

        if (kwargs.get("pattern") == None):
            pattern = []
        self._model_type = kwargs.get("model_type")
        self._model = kwargs.get("model")
        self._model_observations_manager_name = kwargs.get("model_observations_manager_name")
        self._model_observations_query_info = kwargs.get("model_observations_query_info")
        model = self.loadModel()
Exemplo n.º 5
0
    def __init__(self, **kwargs):
        ''' Create instance of the db management model
        Input:
            kwargs: various parameters
        '''
        # Call super class init first
        if kwargs.get("default_name") is None:
            kwargs["default_name"] = "attribute_count_analyzer"
        if kwargs.get("model_type") is None:
            kwargs["model_type"] = attribute_count_analysis

        modeling_worker.__init__(self, **kwargs)

        self._report_aggregation_max = kwargs.get("report_aggregation_max")
        self._report_aggregation_min = kwargs.get("report_aggregation_max")
        self._report_aggregation_avg = kwargs.get("report_aggregation_max")

        self._model = kwargs.get("model")

        self.loadModel()