Module Import alias identifier ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad NameLoad Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If BoolOpOr UnaryOpNot CompareEq Call NameLoad AttributeLoad NameLoad attr Num UnaryOpNot CompareIn SubscriptLoad AttributeLoad NameLoad attr Index Num TupleLoad Num Num UnaryOpNot CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Raise Call NameLoad Str If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign AttributeStore NameLoad attr Num orelse Assign AttributeStore NameLoad attr Num If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpAdd Num SubscriptLoad AttributeLoad NameLoad attr Index Num keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore Call NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareGt AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpSub SubscriptLoad NameLoad Index NameLoad NameLoad AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Slice Num BinOpMult AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr attr NameLoad AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Index Num BinOpMult AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword BinOpAdd NameLoad Num keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpSub NameLoad NameLoad Return BinOpDiv Call AttributeLoad BinOpPow NameLoad Num attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpAdd Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice Num SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr CompareGtE Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list decorator_list
N/A N/A numpy np time time base _BaseClassifier Adaline N/A _BaseClassifier N/A N/A ADAptive LInear NEuron classifier.

    Parameters
    ------------
    eta : float (default: 0.01)
        solver rate (between 0.0 and 1.0)
    epochs : int (default: 50)
        Passes over the training dataset.
    minibatches : int (default: None)
        The number of minibatches for gradient-based optimization.
        If None: Normal Equations (closed-form solution)
        If 1: Gradient Descent learning
        If len(y): Stochastic Gradient Descent learning
        If 1 < minibatches < len(y): Minibatch learning
    random_seed : int (default: None)
        Set random state for shuffling and initializing the weights.
    zero_init_weight : bool (default: False)
        If True, weights are initialized to zero instead of small random
        numbers following a standard normal distribution with mean=0 and
        stddev=1;
        ignored if solver='normal equation'
    print_progress : int (default: 0)
        Prints progress in fitting to stderr if not solver='normal equation'
        0: No output
        1: Epochs elapsed and cost
        2: 1 plus time elapsed
        3: 2 plus estimated time until completion


    Attributes
    -----------
    w_ : 1d-array
      Weights after fitting.
    cost_ : list
      Sum of squared errors after each epoch.

     __init__ N/A N/A self eta epochs minibatches random_seed zero_init_weight print_progress N/A 0.01 50 None None False 0 N/A N/A N/A N/A N/A super Adaline self __init__ print_progress print_progress N/A N/A self random_seed random_seed N/A N/A self eta eta N/A N/A self minibatches minibatches N/A N/A self epochs epochs N/A N/A self zero_init_weight zero_init_weight 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)
            Re-initializes weights prior to fitting. Set False to continue
            training with weights from a previous fitting.

        Returns
        -------
        self : object

         N/A N/A N/A self _check_arrays X y N/A N/A self classes_ N/A N/A np unique y N/A N/A N/A N/A N/A len N/A self classes_ 2 N/A N/A N/A N/A self classes_ N/A 0 N/A -1 0 N/A N/A N/A N/A self classes_ N/A 1 1 N/A N/A N/A ValueError Only supports binary class labels {0, 1} or {-1, 1}. N/A N/A N/A N/A self classes_ N/A 0 -1 N/A N/A N/A self thres_ 0.0 N/A N/A N/A self thres_ 0.5 N/A init_weights N/A N/A N/A self w_ N/A N/A self _init_weights shape N/A 1 N/A N/A X shape N/A 1 zero_init_weight N/A self zero_init_weight seed N/A self random_seed N/A N/A self cost_ N/A 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 minibatches None N/A N/A N/A self w_ N/A N/A self _normal_equation X y N/A N/A n_idx N/A list N/A range N/A N/A y shape N/A 0 N/A N/A N/A self minibatches 1 N/A N/A n_idx N/A N/A N/A np random permutation n_idx N/A N/A self init_time_ N/A time N/A i N/A range N/A self epochs N/A N/A minis N/A N/A np array_split n_idx N/A self minibatches N/A idx minis N/A N/A y_val N/A N/A self _activation N/A X N/A idx N/A errors N/A N/A y N/A idx y_val N/A N/A N/A self w_ N/A 1 N/A N/A self eta N/A N/A N/A N/A X N/A idx T dot errors N/A N/A N/A self w_ N/A 0 N/A N/A self eta N/A N/A errors sum N/A cost N/A N/A self _sum_squared_error_cost y N/A N/A self _activation X N/A N/A N/A N/A self cost_ append cost N/A N/A self print_progress N/A N/A N/A N/A self _print_progress epoch N/A i 1 cost cost N/A self N/A _sum_squared_error_cost N/A N/A self y y_val N/A N/A N/A errors N/A y y_val N/A N/A N/A N/A N/A errors 2 sum 2.0 N/A _normal_equation N/A N/A self X y N/A N/A N/A Solve linear regression analytically. N/A Xb N/A N/A np hstack N/A N/A N/A np ones N/A N/A N/A X shape N/A 0 1 X N/A w N/A N/A np zeros N/A N/A X shape N/A 1 N/A z N/A N/A N/A np linalg inv N/A N/A np dot N/A Xb T Xb N/A w N/A N/A np dot z N/A N/A np dot N/A Xb T y N/A w N/A _net_input N/A N/A self X N/A N/A N/A Compute the linear net input. N/A N/A N/A N/A np dot X N/A N/A self w_ N/A 1 N/A N/A self w_ N/A 0 N/A _activation N/A N/A self X N/A N/A N/A Compute the linear activation from the net input. N/A N/A N/A self _net_input X N/A _predict N/A N/A self X N/A N/A N/A N/A N/A np where N/A N/A N/A self _net_input X N/A self thres_ N/A N/A self classes_ N/A 1 N/A N/A self classes_ N/A 0 N/A N/A