@@ -1559,13 +1559,6 @@ Construct a `LinearRegressor` estimator object.
15591559 A ` LinearRegressor ` estimator.
15601560
15611561
1562- - - -
1563-
1564- #### ` tf.contrib.learn.LinearRegressor.__repr__() ` {#LinearRegressor.__ repr__ }
1565-
1566-
1567-
1568-
15691562- - -
15701563
15711564#### ` tf.contrib.learn.LinearRegressor.bias_ ` {#LinearRegressor.bias_ }
@@ -1584,164 +1577,39 @@ This method will be removed after the deprecation date. To inspect variables, us
15841577
15851578
15861579
1587- - - -
1588-
1589- #### ` tf.contrib.learn.LinearRegressor.dnn_bias_ ` {#LinearRegressor.dnn_bias_ }
1590-
1591- Returns bias of deep neural network part. (deprecated)
1592-
1593- THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30.
1594- Instructions for updating:
1595- This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value().
1596-
1597-
1598- - - -
1599-
1600- #### ` tf.contrib.learn.LinearRegressor.dnn_weights_ ` {#LinearRegressor.dnn_weights_ }
1601-
1602- Returns weights of deep neural network part. (deprecated)
1603-
1604- THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30.
1605- Instructions for updating:
1606- This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value().
1607-
1608-
16091580- - -
16101581
16111582#### ` tf.contrib.learn.LinearRegressor.evaluate(x=None, y=None, input_fn=None, feed_fn=None, batch_size=None, steps=None, metrics=None, name=None) ` {#LinearRegressor.evaluate}
16121583
1613- See ` Evaluable ` .
1614-
1615- ##### Raises:
1616-
1617-
1618- * <b >` ValueError ` </b >: If at least one of ` x ` or ` y ` is provided, and at least one of
1619- ` input_fn ` or ` feed_fn ` is provided.
1620- Or if ` metrics ` is not ` None ` or ` dict ` .
1584+ See evaluable.Evaluable.
16211585
16221586
16231587- - -
16241588
1625- #### ` tf.contrib.learn.LinearRegressor.export(*args, **kwargs) ` {#LinearRegressor.export}
1626-
1627- Exports inference graph into given dir. (deprecated arguments)
1628-
1629- SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-09-23.
1630- Instructions for updating:
1631- The signature of the input_fn accepted by export is changing to be consistent with what's used by tf.Learn Estimator's train/evaluate. input_fn (and in most cases, input_feature_key) will become required args, and use_deprecated_input_fn will default to False and be removed altogether.
1632-
1633- Args:
1634- export_dir: A string containing a directory to write the exported graph
1635- and checkpoints.
1636- input_fn: If `use_deprecated_input_fn` is true, then a function that given
1637- `Tensor` of `Example` strings, parses it into features that are then
1638- passed to the model. Otherwise, a function that takes no argument and
1639- returns a tuple of (features, labels), where features is a dict of
1640- string key to `Tensor` and labels is a `Tensor` that's currently not
1641- used (and so can be `None`).
1642- input_feature_key: Only used if `use_deprecated_input_fn` is false. String
1643- key into the features dict returned by `input_fn` that corresponds to a
1644- the raw `Example` strings `Tensor` that the exported model will take as
1645- input. Can only be `None` if you're using a custom `signature_fn` that
1646- does not use the first arg (examples).
1647- use_deprecated_input_fn: Determines the signature format of `input_fn`.
1648- signature_fn: Function that returns a default signature and a named
1649- signature map, given `Tensor` of `Example` strings, `dict` of `Tensor`s
1650- for features and `Tensor` or `dict` of `Tensor`s for predictions.
1651- prediction_key: The key for a tensor in the `predictions` dict (output
1652- from the `model_fn`) to use as the `predictions` input to the
1653- `signature_fn`. Optional. If `None`, predictions will pass to
1654- `signature_fn` without filtering.
1655- default_batch_size: Default batch size of the `Example` placeholder.
1656- exports_to_keep: Number of exports to keep.
1589+ #### ` tf.contrib.learn.LinearRegressor.export(export_dir, input_fn=None, input_feature_key=None, use_deprecated_input_fn=True, signature_fn=None, default_batch_size=1, exports_to_keep=None) ` {#LinearRegressor.export}
16571590
1658- Returns:
1659- The string path to the exported directory. NB: this functionality was
1660- added ca. 2016/09/25; clients that depend on the return value may need
1661- to handle the case where this function returns None because subclasses
1662- are not returning a value.
1591+ See BaseEstimator.export.
16631592
16641593
16651594- - -
16661595
16671596#### ` tf.contrib.learn.LinearRegressor.fit(x=None, y=None, input_fn=None, steps=None, batch_size=None, monitors=None, max_steps=None) ` {#LinearRegressor.fit}
16681597
1669- See ` Trainable ` .
1670-
1671- ##### Raises:
1672-
1673-
1674- * <b >` ValueError ` </b >: If ` x ` or ` y ` are not ` None ` while ` input_fn ` is not ` None ` .
1675- * <b >` ValueError ` </b >: If both ` steps ` and ` max_steps ` are not ` None ` .
1676-
1677-
1678- - - -
1679-
1680- #### ` tf.contrib.learn.LinearRegressor.get_params(deep=True) ` {#LinearRegressor.get_params}
1681-
1682- Get parameters for this estimator.
1683-
1684- ##### Args:
1685-
1686-
1687- * <b >` deep ` </b >: boolean, optional
1688-
1689- If ` True ` , will return the parameters for this estimator and
1690- contained subobjects that are estimators.
1691-
1692- ##### Returns:
1693-
1694- params : mapping of string to any
1695- Parameter names mapped to their values.
1598+ See trainable.Trainable.
16961599
16971600
16981601- - -
16991602
17001603#### ` tf.contrib.learn.LinearRegressor.get_variable_names() ` {#LinearRegressor.get_variable_names}
17011604
1702- Returns list of all variable names in this model.
17031605
1704- ##### Returns:
1705-
1706- List of names.
17071606
17081607
17091608- - -
17101609
17111610#### ` tf.contrib.learn.LinearRegressor.get_variable_value(name) ` {#LinearRegressor.get_variable_value}
17121611
1713- Returns value of the variable given by name.
1714-
1715- ##### Args:
1716-
1717-
1718- * <b >` name ` </b >: string, name of the tensor.
1719-
1720- ##### Returns:
1721-
1722- Numpy array - value of the tensor.
1723-
1724-
1725- - - -
1726-
1727- #### ` tf.contrib.learn.LinearRegressor.linear_bias_ ` {#LinearRegressor.linear_bias_ }
1728-
1729- Returns bias of the linear part. (deprecated)
1730-
1731- THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30.
1732- Instructions for updating:
1733- This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value().
1734-
1735-
1736- - - -
17371612
1738- #### ` tf.contrib.learn.LinearRegressor.linear_weights_ ` {#LinearRegressor.linear_weights_ }
1739-
1740- Returns weights per feature of the linear part. (deprecated)
1741-
1742- THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30.
1743- Instructions for updating:
1744- This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value().
17451613
17461614
17471615- - -
@@ -1751,110 +1619,18 @@ This method will be removed after the deprecation date. To inspect variables, us
17511619
17521620
17531621
1754- - - -
1755-
1756- #### ` tf.contrib.learn.LinearRegressor.partial_fit(x=None, y=None, input_fn=None, steps=1, batch_size=None, monitors=None) ` {#LinearRegressor.partial_fit}
1757-
1758- Incremental fit on a batch of samples.
1759-
1760- This method is expected to be called several times consecutively
1761- on different or the same chunks of the dataset. This either can
1762- implement iterative training or out-of-core/online training.
1763-
1764- This is especially useful when the whole dataset is too big to
1765- fit in memory at the same time. Or when model is taking long time
1766- to converge, and you want to split up training into subparts.
1767-
1768- ##### Args:
1769-
1770-
1771- * <b >` x ` </b >: Matrix of shape [ n_samples, n_features...] . Can be iterator that
1772- returns arrays of features. The training input samples for fitting the
1773- model. If set, ` input_fn ` must be ` None ` .
1774- * <b >` y ` </b >: Vector or matrix [ n_samples] or [ n_samples, n_outputs] . Can be
1775- iterator that returns array of labels. The training label values
1776- (class labels in classification, real numbers in regression). If set,
1777- ` input_fn ` must be ` None ` .
1778- * <b >` input_fn ` </b >: Input function. If set, ` x ` , ` y ` , and ` batch_size ` must be
1779- ` None ` .
1780- * <b >` steps ` </b >: Number of steps for which to train model. If ` None ` , train forever.
1781- * <b >` batch_size ` </b >: minibatch size to use on the input, defaults to first
1782- dimension of ` x ` . Must be ` None ` if ` input_fn ` is provided.
1783- * <b >` monitors ` </b >: List of ` BaseMonitor ` subclass instances. Used for callbacks
1784- inside the training loop.
1785-
1786- ##### Returns:
1787-
1788- ` self ` , for chaining.
1789-
1790- ##### Raises:
1791-
1792-
1793- * <b >` ValueError ` </b >: If at least one of ` x ` and ` y ` is provided, and ` input_fn ` is
1794- provided.
1795-
1796-
17971622- - -
17981623
17991624#### ` tf.contrib.learn.LinearRegressor.predict(*args, **kwargs) ` {#LinearRegressor.predict}
18001625
1801- Returns predictions for given features . (deprecated arguments)
1626+ Runs inference to determine the predicted class . (deprecated arguments)
18021627
18031628SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-09-15.
18041629Instructions for updating:
18051630The default behavior of predict() is changing. The default value for
18061631as_iterable will change to True, and then the flag will be removed
18071632altogether. The behavior of this flag is described below.
18081633
1809- Args:
1810- x: Matrix of shape [n_samples, n_features...]. Can be iterator that
1811- returns arrays of features. The training input samples for fitting the
1812- model. If set, `input_fn` must be `None`.
1813- input_fn: Input function. If set, `x` and 'batch_size' must be `None`.
1814- batch_size: Override default batch size. If set, 'input_fn' must be
1815- 'None'.
1816- outputs: list of `str`, name of the output to predict.
1817- If `None`, returns all.
1818- as_iterable: If True, return an iterable which keeps yielding predictions
1819- for each example until inputs are exhausted. Note: The inputs must
1820- terminate if you want the iterable to terminate (e.g. be sure to pass
1821- num_epochs=1 if you are using something like read_batch_features).
1822-
1823- Returns:
1824- A numpy array of predicted classes or regression values if the
1825- constructor's `model_fn` returns a `Tensor` for `predictions` or a `dict`
1826- of numpy arrays if `model_fn` returns a `dict`. Returns an iterable of
1827- predictions if as_iterable is True.
1828-
1829- Raises:
1830- ValueError: If x and input_fn are both provided or both `None`.
1831-
1832-
1833- - - -
1834-
1835- #### ` tf.contrib.learn.LinearRegressor.set_params(**params) ` {#LinearRegressor.set_params}
1836-
1837- Set the parameters of this estimator.
1838-
1839- The method works on simple estimators as well as on nested objects
1840- (such as pipelines). The former have parameters of the form
1841- `` <component>__<parameter> `` so that it's possible to update each
1842- component of a nested object.
1843-
1844- ##### Args:
1845-
1846-
1847- * <b >` **params ` </b >: Parameters.
1848-
1849- ##### Returns:
1850-
1851- self
1852-
1853- ##### Raises:
1854-
1855-
1856- * <b >` ValueError ` </b >: If params contain invalid names.
1857-
18581634
18591635- - -
18601636
0 commit comments