# tf.contrib.learn.SKCompat

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1495-L1573) |

Scikit learn wrapper for TensorFlow Learn Estimator.

    tf.contrib.learn.SKCompat(
        estimator
    )

THIS CLASS IS DEPRECATED. See
[contrib/learn/README.md](https://www.tensorflow.org/code/tensorflow/contrib/learn/README.md)
for general migration instructions.

## Methods

### `fit`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1507-L1528)

    fit(
        x, y, batch_size=128, steps=None, max_steps=None, monitors=None
    )

### `get_params`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/_sklearn.py#L41-L67)

    get_params(
        deep=True
    )

Get parameters for this estimator.

<br />

<br />

<br />

| Args ||
|---|---|
| `deep` | boolean, optional <br /> If `True`, will return the parameters for this estimator and contained subobjects that are estimators. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `params` | mapping of string to any Parameter names mapped to their values. |

<br />

### `predict`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1552-L1573)

    predict(
        x, batch_size=128, outputs=None
    )

### `score`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1530-L1550)

    score(
        x, y, batch_size=128, steps=None, metrics=None, name=None
    )

### `set_params`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/_sklearn.py#L69-L110)

    set_params(
        **params
    )

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects
(such as pipelines). The former have parameters of the form
`<component>__<parameter>` so that it's possible to update each
component of a nested object.

<br />

<br />

<br />

| Args ||
|---|---|
| `**params` | Parameters. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| self ||

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `ValueError` | If params contain invalid names. |

<br />