Add a `RegressionModel` instance.

        Parameters
        ----------
        model : `RegressionModel`
            Should have a ``.name`` attribute matching one of
            the groupby segments.
775830
def add_model(self, model):
        
        logger.debug(
            'adding model {} to group {}'.format(model.name, self.name))
        self.models[model.name] = model
1175822
def add_model(self, ic, N=1, index=0):
        
        if type(index) in [list,tuple]:
            if len(index) != N:
                raise ValueError('If a list, index must be of length N.')
        else:
            index = [index]*N

        for idx in index:
            existing = self.get_system(idx)
            tag = len(existing)
            self.add_child(ModelNode(ic, index=idx, tag=tag))
1365725
def add_method_model(self,
                         func,  # type: Callable
                         name=None,  # type: Optional[str]
                         description=None,  # type: Optional[str]
                         ):
        # type: (...) -> MethodModel
        """"""
        return self._field_registry.add_method_model(
            func, name, description, self._part)
17654
def created_model(name)
      factory, name_or_index = *parse_model(name)

      if name_or_index.blank?
        models_by_index(factory).last
      elsif name_or_index.is_a?(Integer)
        models_by_index(factory)[name_or_index]
      else
        models_by_name(factory)[name_or_index] or raise ModelNotKnownError, name
      end
    end
331789
def add_instance(model, _commit=True, **kwargs):
    
    try:
        model = get_model(model)
    except ImportError:
        return None

    instance = model(**kwargs)
    db.session.add(instance)

    try:
        if _commit:
            db.session.commit()
        else:
            db.session.flush()
        return instance.id
    except IntegrityError:
        db.session.rollback()
        return
18661
def setCurveModel(self, model):
        
        self.stimModel = model
        self.ui.curveWidget.setModel(model)
18587
def register_model(self, model):
        

        assert isinstance(model, str)
        if model not in self.all_models:
            self.all_models.append(model)
681786
def set_model(self, model):
        '''
        
        '''
        self.model = model
        if self.model:
            self.model.set_notification_handler(self)
            self.handle_stage_changed(model)
        return self
156209
def _init_model(self):
        
        model = Sequential()
        model.add(ConvLSTM2D(filters=self.filters, kernel_size=self.kernel_size, activation=self.activation,
                             input_shape=[self.time_delay] + list(self.image_size) + [self.channels],
                             data_format='channels_last', return_sequences=True))
        model.add(BatchNormalization())
        model.add(ConvLSTM2D(filters=self.filters, kernel_size=self.kernel_size, activation=self.activation,
                             input_shape=(self.time_delay, self.channels) + self.image_size,
                             data_format='channels_last', return_sequences=True))
        model.add(BatchNormalization())
        model.add(ConvLSTM2D(filters=self.filters, kernel_size=self.kernel_size, activation=self.activation))
        model.add(BatchNormalization())
        model.add(Conv2D(filters=1, kernel_size=self.kernel_size, activation="sigmoid", data_format="channels_last"))
        model.add(Flatten())
        model.add(Dense(units=len(self.emotion_map.keys()), activation="sigmoid"))
        if self.verbose:
            model.summary()
        self.model = model
927336
def _load_income_model(self):
        
        self._add_model(self.income, self.state.income, IncomeModel)
586352
def set_model(self, m):
        
        self._model = m
        self.new_root.emit(QtCore.QModelIndex())
        self.model_changed(m)
21320
def associate_model(model, field):
    
    class_field = model._meta.get_field(field)
    if hasattr(class_field, "field"):
        return class_field.field.related.related_model
    else:
        return class_field.related_model
600684
def _model_count_step(self, count, model):
    

    model = get_model(model)

    expected = int(count)
    found = model.objects.count()
    assert found == expected, "Expected %d %s, found %d." % \
        (expected, model._meta.verbose_name_plural, found)
995119
def add(self, **args):
        
        kwargs = self.getKwargs(args)
        if kwargs:
            self.model.add(**kwargs)
485692
def add_camera_make_model(self, make, model):
        ''' '''
        self._ef['0th'][piexif.ImageIFD.Make] = make
        self._ef['0th'][piexif.ImageIFD.Model] = model
948919
def svm_load_model(model_file_name):
	
	model = libsvm.svm_load_model(model_file_name.encode())
	if not model:
		print("can't open model file %s" % model_file_name)
		return None
	model = toPyModel(model)
	return model
1252650
def add(self, models):
        
        if models is None:
            return

        models = self._check_model_types(models)
        self._selected.update(models)
        self._selected = reduce_to_parent_states(self._selected)