TensorFlow 2.0 Beta is available Learn more

tf.contrib.learn.SKCompat

Class SKCompat

Scikit learn wrapper for TensorFlow Learn Estimator.

View source on GitHub

THIS CLASS IS DEPRECATED. See contrib/learn/README.md for general migration instructions.

__init__

View source

__init__(estimator)

DEPRECATED FUNCTION

Methods

fit

View source

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

get_params

View source

get_params(deep=True)

Get parameters for this estimator.

Args:

  • deep: boolean, optional

    If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:

  • params: mapping of string to any Parameter names mapped to their values.

predict

View source

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

score

View source

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

set_params

View source

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.

Args:

  • **params: Parameters.

Returns:

self

Raises:

  • ValueError: If params contain invalid names.