from keras.models import Sequential from keras.layers import Dense from keras.wrappers.scikit_learn import KerasClassifier from sklearn.datasets import make_classification from sklearn.model_selection import train_test_split def create_model(): model = Sequential() model.add(Dense(4, input_dim=10, activation='relu')) model.add(Dense(1, activation='sigmoid')) model.compile(loss='binary_crossentropy', optimizer='adam') return model X, y = make_classification(n_samples=1000, n_features=10, random_state=42) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42) clf = KerasClassifier(build_fn=create_model, epochs=10, batch_size=32, verbose=0) clf.fit(X_train, y_train) score = clf.score(X_test, y_test) proba = clf.predict_proba(X_test) pred = clf.predict(X_test)In this example, we create a simple Keras model with two fully connected layers using the `create_model` function. We then generate a toy dataset using scikit-learn's `make_classification` function and split it into a training and testing set using `train_test_split`. We initialize a `KerasClassifier` object with the `create_model` function, along with other hyperparameters such as the number of epochs and batch size. We then train the model on the training data using the `fit` method. After training, we can use the `score` method to get the test accuracy, `predict_proba` to get the predicted probabilities for each class, and `predict` to get the predicted labels. The package library for `keras.wrappers.scikit_learn` is Keras.