def fit(self, X, y): X_dict = numpy_to_dict(X) self.model = self.model_creator(X_dict, y) self.model.fit(X_dict, y, epochs=self.epochs, batch_size=self.batch_size, verbose=1) return self
def fit(self, X, y): X_dict = numpy_to_dict(X) y = to_categorical(y) self.model = self.model_creator(X_dict, y) for (epochs, batch_size) in self.fit_params: self.model.fit(X_dict, y, epochs=epochs, batch_size=batch_size, verbose=1) return self
def fit(self, X, y): X_dict = numpy_to_dict(X) self._le = LabelEncoder().fit(y) y = to_categorical(self._le.transform(y)) self.model = self.model_creator(X_dict, y) self.model.fit(X_dict, y, epochs=self.epochs, batch_size=self.batch_size, verbose=1) return self
def predict_proba(self, X): return self.model.predict(numpy_to_dict(X))