Skip to content

Commit

Permalink
DOC: add comparison to TF wrappers (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb authored Nov 27, 2020
1 parent 8d47423 commit 94960da
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@

Scikit-Learn compatible wrappers for Keras Models.

## Why SciKeras

SciKeras is derived from and API compatible with `tf.keras.wrappers.scikit_learn`. The original TensorFlow (TF) wrappers are not actively mantained,
and [may be deprecated](https://github.com/tensorflow/tensorflow/pull/37201#pullrequestreview-391650001) at some point.
In addition, they have many incompatibilities with both the Keras ecosystem and the Scikit-Learn ecosystem.
SciKeras attempts to resolve these issues by providing maintained, documented wrappers that are fully compatible with the
entire Scikit-Learn and Keras ecosystems. Some advantages over the TF wrappers are:

* Full compatibility with the Scikit-Learn API, including grid searches, ensembles, transformers, etc.
* Support for pre-trained models.
* Support for dynamically set Keras parameters depending on inputs (e.g. input shape).
* Support for hyperparameter tuning of optimizers and losses.
* Support for multi-input and multi-ouput Keras models.
* Functional `random_state` for reproducible training.
* Many more that you will discover as you use SciKeras!

## Installation

This package is available on PyPi:
Expand All @@ -14,7 +30,7 @@ This package is available on PyPi:
pip install scikeras
```

The only dependencies are `scikit-learn>=0.22` and `TensorFlow>=2.1.0`.
The only dependencies are `scikit-learn>=0.22` and `TensorFlow>=2.2.0`.

## Documentation

Expand Down
12 changes: 11 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@ Welcome to SciKeras's documentation!

The goal of scikeras is to make it possible to use Keras/TensorFlow with sklearn.
This is achieved by providing a wrapper around Keras that has an Scikit-Learn interface.
SciKeras is the successor to ``~tensorflow.keras.wrappers.scikit_learn``.
SciKeras is the successor to ``tf.keras.wrappers.scikit_learn``.

Some advantages over the ``tf.keras.wrappers.scikit_learn`` wrappers are:

* Full compatibility with the Scikit-Learn API, including grid searches, ensembles, transformers, etc.
* Support for pre-trained models.
* Support for dynamically set Keras parameters depending on inputs (e.g. input shape).
* Support for hyperparameter tuning of optimizers and losses.
* Support for multi-input and multi-ouput Keras models.
* Functional `random_state` for reproducible training.
* Many more that you will discover as you use SciKeras!

SciKeras tries to make things easy for you while staying out of your way.
If you are familiar with Scikit-Learn and Keras, you don’t have to learn any new concepts, and the syntax should be well known.
Expand Down

0 comments on commit 94960da

Please sign in to comment.