Module Import alias identifier ImportFrom alias Assign NameStore TupleLoad Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad If CompareNotEq NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If UnaryOpNot BoolOpAnd CompareLtELtE Num NameLoad Num CompareLtELtE Num NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr CompareGt NameLoad Num NameLoad BinOpSub Num NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Slice NameLoad BinOpAdd NameLoad Num NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Slice NameLoad BinOpAdd NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num TupleLoad NameLoad Num Assign AttributeStore NameLoad attr BinOpDiv NameLoad NameLoad Return Call AttributeLoad BinOpMult AttributeLoad NameLoad attr NameLoad attr keyword Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A numpy np base BaseEnsemble N/A __all__ N/A DynamicallyAveragedNetwork DynamicallyAveragedNetwork N/A BaseEnsemble N/A N/A  Dynamically Averaged Network (DAN) weighted ensamble for binary
    classification problems.

    Notes
    -----
    * Every network must has 1 output and result must be between 0 and 1.

    Parameters
    ----------
    networks : list
        List of Neural Networks.

    Methods
    -------
    train(self, input_data, target_data, *args, **kwargs)
        Use input data to train all neural network one by one.

    Attributes
    ----------
    weights : ndarray, shape = [n_predictors, n_networks]
        After you get prediction you can also check weight which you
        will get to combine the result.

    Examples
    --------
    >>> import numpy as np
    >>> from sklearn import datasets, metrics
    >>> from sklearn.cross_validation import train_test_split
    >>> from neupy import algorithms
    >>>
    >>> np.random.seed(50)
    >>>
    >>> data, target = datasets.make_classification(300, n_features=4,
    >>>                                             n_classes=2)
    >>> x_train, x_test, y_train, y_test = train_test_split(
    >>>     data, target, train_size=0.7
    >>> )
    >>>
    >>> dan = algorithms.DynamicallyAveragedNetwork([
    >>>     algorithms.RPROP((4, 10, 1), maxstep=1),
    >>>     algorithms.GradientDescent((4, 5, 1)),
    >>> ])
    >>> dan.train(x_train, y_train, epochs=500)
    >>> y_predicted = dan.predict(x_test)
    >>>
    >>> metrics.accuracy_score(y_test, y_predicted)
    0.97777777777777775
     __init__ N/A N/A self networks N/A N/A N/A N/A N/A N/A super DynamicallyAveragedNetwork self __init__ networks N/A N/A self weights None N/A network networks N/A N/A output_layer_size N/A N/A network output_layer size N/A N/A network verbose False N/A N/A output_layer_size 1 N/A N/A N/A ValueError N/A N/A Final layer at network `{}` must has 1 output, got {} format N/A N/A self __class__ __name__ output_layer_size N/A train N/A N/A self input_data target_data N/A args kwargs N/A N/A network N/A self networks N/A N/A N/A N/A network train input_data target_data args kwargs N/A predict_raw N/A N/A self input_data N/A N/A N/A number_of_inputs N/A N/A input_data shape N/A 0 N/A network_certainties N/A N/A np zeros N/A number_of_inputs N/A len N/A self networks N/A network_outputs N/A N/A network_certainties copy N/A N/A i network N/A enumerate N/A self networks N/A N/A output N/A N/A network predict input_data N/A N/A minval maxval N/A N/A N/A output min N/A N/A output max N/A N/A N/A N/A 0 minval 1 N/A 0 maxval 1 N/A N/A N/A ValueError N/A N/A Netwrok output must be in range [0, 1]. Network output was in range [{}, {}] format minval maxval N/A certainty N/A N/A np where N/A output 0.5 output N/A 1 output N/A N/A network_certainties N/A N/A N/A i N/A i 1 certainty N/A N/A network_outputs N/A N/A N/A i N/A i 1 output N/A total_output_sum N/A N/A np reshape N/A N/A network_certainties sum axis 1 N/A number_of_inputs 1 N/A N/A self weights N/A network_certainties total_output_sum N/A N/A N/A N/A N/A self weights network_outputs sum axis 1 N/A predict N/A N/A self input_data N/A N/A N/A raw_output N/A N/A self predict_raw input_data N/A N/A N/A np round raw_output N/A N/A