Module ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num NameLoad NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot BoolOpOr CompareIs NameLoad NameLoad Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword ListLoad Num keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad With NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad For NameStore Call NameLoad Num BinOpAdd AttributeLoad NameLoad attr Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad With NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list
N/A tf_base _TfBaseRegressor N/A numpy np N/A tensorflow tf time time TfLinearRegression N/A _TfBaseRegressor N/A N/A Estimator for Linear Regression in TensorFlow using Gradient Descent.

    Added in version 0.4.1

     __init__ N/A N/A self eta epochs print_progress random_seed dtype N/A 0.1 50 0 None None N/A N/A 
        Parameters
        ------------
        eta : float (default: 0.01)
            solver rate (between 0.0 and 1.0)
        epochs : int (default: 50)
            Passes over the training dataset.
        print_progress : int (default: 0)
            Prints progress in fitting to stderr
            0: No output
            1: Epochs elapsed and cost
            2: 1 plus time elapsed
            3: 2 plus estimated time until completion
        random_seed : int (default: None)
            Set random state for shuffling and initializing the weights.
        dtype : Array-type (default: None)
            Uses tensorflow.float32 if None.

        Attributes
        -----------
        weights_ : 1d-array, shape=[n_features]
            Model weights after fitting.
        bias_ : 1d-array, shape=[1]
                Bias unit (intercept term)
        cost_ : list
            Sum of mean squared errors (MSE) after each epoch;

         N/A N/A N/A N/A super TfLinearRegression self __init__ print_progress print_progress random_seed random_seed N/A N/A self eta eta N/A N/A self epochs epochs N/A N/A dtype None N/A N/A N/A self dtype N/A tf float32 N/A N/A N/A self dtype dtype N/A fit N/A N/A self X y init_weights N/A True N/A N/A Learn weight coefficients from training data.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Training vectors, where n_samples is the number of samples and
            n_features is the number of features.
        y : array-like, shape = [n_samples]
            Target values.
        init_weights : bool (default: True)
            Reinitialize weights

        Returns
        -------
        self : object

         N/A N/A self _is_fitted False N/A N/A N/A N/A init_weights None N/A isinstance init_weights bool N/A N/A N/A AttributeError init_weights must be True or False N/A N/A N/A self _check_arrays X X y y N/A N/A self random_seed N/A N/A N/A N/A N/A np random seed N/A self random_seed N/A N/A N/A self _fit X X y y init_weights init_weights N/A N/A self _is_fitted True N/A self N/A _fit N/A N/A self X y init_weights N/A True N/A N/A N/A N/A hasattr self cost_ N/A N/A N/A self cost_ N/A N/A N/A self cost_ N/A N/A g_train N/A N/A tf Graph N/A N/A N/A g_train as_default N/A N/A tf_X N/A N/A tf convert_to_tensor value X dtype N/A self dtype N/A tf_y N/A N/A tf convert_to_tensor value N/A y N/A N/A N/A N/A np newaxis dtype N/A self dtype N/A init_weights N/A N/A w N/A N/A tf Variable N/A N/A tf truncated_normal shape N/A N/A N/A X shape N/A 1 1 seed N/A self random_seed dtype N/A self dtype dtype N/A self dtype N/A b N/A N/A tf Variable N/A N/A tf zeros shape N/A 1 dtype N/A self dtype N/A N/A w N/A N/A tf Variable N/A N/A self weights_ N/A N/A N/A N/A np newaxis dtype N/A self dtype N/A b N/A N/A tf Variable N/A self bias_ dtype N/A self dtype N/A y_pred N/A N/A self _net_input tf_X w b N/A mse_cost N/A N/A tf reduce_mean N/A N/A tf square N/A y_pred tf_y N/A optimizer N/A N/A N/A tf train GradientDescentOptimizer learning_rate N/A self eta N/A train N/A N/A optimizer minimize mse_cost N/A train_init N/A N/A tf initialize_all_variables N/A sess N/A N/A tf Session graph g_train N/A sess N/A N/A N/A N/A sess run train_init N/A N/A self init_time_ N/A time N/A epoch N/A range 1 N/A N/A self epochs 1 N/A N/A N/A _ c N/A N/A sess run N/A train mse_cost N/A N/A N/A N/A self cost_ append c N/A N/A N/A self _print_progress epoch cost c N/A N/A self weights_ N/A N/A N/A N/A w eval flatten N/A N/A self bias_ N/A N/A b eval N/A predict N/A N/A self X N/A N/A N/A Predict class labels of X.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Training vectors, where n_samples is the number of samples and
            n_features is the number of features.

        Returns
        ----------
        class_labels : array-like, shape = [n_samples]
            Predicted class labels.

         N/A N/A N/A self _check_arrays X N/A N/A N/A self _is_fitted N/A N/A N/A AttributeError Model is not fitted, yet. N/A N/A N/A N/A N/A self _predict X flatten N/A _predict N/A N/A self X N/A N/A N/A g_predict N/A N/A tf Graph N/A N/A N/A g_predict as_default N/A N/A w N/A N/A tf convert_to_tensor value N/A N/A self weights_ N/A N/A N/A N/A np newaxis dtype N/A self dtype N/A b N/A N/A tf convert_to_tensor value N/A self bias_ dtype N/A self dtype N/A tf_X N/A N/A tf convert_to_tensor value X dtype N/A self dtype N/A predict_init N/A N/A tf initialize_all_variables N/A sess N/A N/A tf Session graph g_predict N/A sess N/A N/A N/A N/A sess run predict_init N/A N/A N/A N/A N/A self _net_input tf_X w b eval N/A _net_input N/A N/A self X w b N/A N/A N/A N/A N/A tf add N/A N/A tf matmul X w b N/A N/A