ageron / ageron/handson-ml2

[BUG] Chapter 10: KerasRegressor vs Sci-Keras issue

Open
#609 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
30k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

(I did a quick search in the existing issues about the problem but did not find it.)

**Describe the bug**
In chapter 10's notebook "10_neural_nets_with_keras.ipynb", cell [95], as I run "keras_reg = keras.wrappers.scikit_learn.KerasRegressor(build_model)" it output the following message:

"/var/folders/s9/zk8r4hnd1p9dh9tf9s0xytfw0000gn/T/ipykernel_6596/1709004121.py:1: DeprecationWarning: KerasRegressor is deprecated, use Sci-Keras (https://github.com/adriangb/scikeras) instead. See https://www.adriangb.com/scikeras/stable/migration.html for help migrating.
keras_reg = keras.wrappers.scikit_learn.KerasRegressor(build_model)"

Following the suggestion, I go to https://github.com/adriangb/scikeras to read the document. Then I try to install "Sci-Keras" by running the following command in a terminal:

pip install scikeras[tensorflow]

However, I only get a message saying that "zsh: no matches found: scikeras[tensorflow]". So, I guess that I have missunderstood something about installation of Sci-Keras. Can you tell me what is the correct way to install Sci-Keras?

**Screenshots**
See below.

**Versions (please complete the following information):**
- OS: MacOSX 12.6.5
- Python: 3.10
- TensorFlow: 2.10.1
- Scikit-Learn: 1.1.3

![Xnip2023-05-01_18-05-14](https://user-images.githubusercontent.com/115785359/235438695-dfd31519-6073-4323-9801-6e689d360336.jpg)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.