tf.contrib.learn.SKCompat
Stay organized with collections
Save and categorize content based on your preferences.
Scikit learn wrapper for TensorFlow Learn Estimator.
tf.contrib.learn.SKCompat(
estimator
)
THIS CLASS IS DEPRECATED. See
contrib/learn/README.md
for general migration instructions.
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.
|
Raises |
ValueError
|
If params contain invalid names.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.learn.SKCompat\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1495-L1573) |\n\nScikit learn wrapper for TensorFlow Learn Estimator. \n\n tf.contrib.learn.SKCompat(\n estimator\n )\n\nTHIS CLASS IS DEPRECATED. See\n[contrib/learn/README.md](https://www.tensorflow.org/code/tensorflow/contrib/learn/README.md)\nfor general migration instructions.\n\nMethods\n-------\n\n### `fit`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1507-L1528) \n\n fit(\n x, y, batch_size=128, steps=None, max_steps=None, monitors=None\n )\n\n### `get_params`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/_sklearn.py#L41-L67) \n\n get_params(\n deep=True\n )\n\nGet parameters for this estimator.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|--------|---------------------------------------------------------------------------------------------------------------------------------|\n| `deep` | boolean, optional \u003cbr /\u003e If `True`, will return the parameters for this estimator and contained subobjects that are estimators. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|------------------------------------------------------------------|\n| `params` | mapping of string to any Parameter names mapped to their values. |\n\n\u003cbr /\u003e\n\n### `predict`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1552-L1573) \n\n predict(\n x, batch_size=128, outputs=None\n )\n\n### `score`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/estimator.py#L1530-L1550) \n\n score(\n x, y, batch_size=128, steps=None, metrics=None, name=None\n )\n\n### `set_params`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/learn/python/learn/estimators/_sklearn.py#L69-L110) \n\n set_params(\n **params\n )\n\nSet the parameters of this estimator.\n\nThe method works on simple estimators as well as on nested objects\n(such as pipelines). The former have parameters of the form\n`\u003ccomponent\u003e__\u003cparameter\u003e` so that it's possible to update each\ncomponent of a nested object.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|------------|-------------|\n| `**params` | Parameters. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| self ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|--------------|----------------------------------|\n| `ValueError` | If params contain invalid names. |\n\n\u003cbr /\u003e"]]