Module Import alias identifier Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Str If CompareIn Str NameLoad body AugAssignAdd NameStore BinOpMod Str SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body AugAssignAdd NameStore BinOpMod Str SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body AugAssignAdd NameStore BinOpMod Str SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body AugAssignAdd NameStore BinOpMod Str SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str If CompareEq Call NameLoad Call AttributeLoad NameLoad attr NameLoad Num body If CompareEq SubscriptLoad NameLoad Index Num Num body AugAssignAdd NameStore BinOpMod Str Call NameLoad NameLoad orelse AugAssignAdd NameStore BinOpMod Str TupleLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index Num orelse AugAssignAdd NameStore BinOpMod Str TupleLoad Call NameLoad NameLoad Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Return BinOpMod Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad NameLoad Str Str NameLoad Num body ImportFrom alias ImportFrom alias ImportFrom alias Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr IfExp CompareIs NameLoad NameLoad Call NameLoad Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad orelse If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad ListLoad TupleLoad Str NameLoad TupleLoad Str 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 Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias For NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str body If Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call NameLoad GeneratorExp Call NameLoad Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Ellipsis Index Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Call NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str If CompareNotIn AttributeLoad NameLoad attr ListLoad Str Str body Raise Call NameLoad Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore CompareNotEq Call NameLoad Call NameLoad NameLoad Num Assign NameStore CompareNotEq SubscriptLoad NameLoad Index Num Call NameLoad AttributeLoad NameLoad attr Assign NameStore CompareNotEq Call NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad If BoolOpOr NameLoad NameLoad NameLoad body Raise Call NameLoad Str For NameStore ListLoad Str Str Str Str Str body If Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr ListComp Call NameLoad NameLoad comprehension TupleStore NameStore NameStore AttributeLoad NameLoad attr body Expr Call NameLoad Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str ListComp ListLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign SubscriptStore NameLoad Index Str ListComp ListLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str orelse If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad Str If CompareNotIn Str NameLoad body If CompareNotIn Str Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call NameLoad Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad For NameStore Call NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str AugAssignAdd NameStore ListLoad SubscriptLoad NameLoad Index Str Assign NameStore NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str ListComp Call NameLoad NameLoad AttributeLoad NameLoad attr comprehension NameStore SubscriptLoad NameLoad Index Str For TupleStore NameStore NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad NameLoad Index Str body If UnaryOpNot Call AttributeLoad NameLoad attr ListComp CompareEq Call NameLoad NameLoad Call NameLoad NameLoad comprehension NameStore NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Num For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Num AugAssignAdd NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp Call NameLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad GeneratorExp Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Call NameLoad Call NameLoad ListLoad Str Str Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareEq Call NameLoad Call NameLoad NameLoad Num body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num orelse Assign AttributeStore NameLoad attr ListComp ListComp NameLoad comprehension NameStore NameLoad comprehension NameStore NameLoad comprehension NameStore Call NameLoad NameLoad Call NameLoad NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Import alias ImportFrom alias ImportFrom alias alias If Call NameLoad Str Str body ImportFrom alias orelse FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body If CompareEq AttributeLoad NameLoad attr Str body If Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad orelse If Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad orelse If Call NameLoad AttributeLoad NameLoad attr NameLoad body If Call NameLoad AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr orelse Raise Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad NameLoad attr orelse If CompareIsNot NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num orelse Raise Call NameLoad Str If UnaryOpNot Call AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore ListLoad Str Str body If Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Call NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call NameLoad GeneratorExp Call NameLoad AttributeLoad NameLoad attr ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListComp NameLoad comprehension NameStore NameLoad comprehension NameStore NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore NameLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore BoolOpAnd CompareEq NameLoad Num NameLoad If NameLoad body Assign NameStore ListLoad Call NameLoad SubscriptLoad NameLoad Index Num BinOpAdd SubscriptLoad NameLoad Index Num Num Num orelse If Call AttributeLoad NameLoad attr Str NameLoad body If CompareGt Call NameLoad NameLoad Num body Expr Call NameLoad Str Assign SubscriptStore NameLoad Index Str NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Slice Index NameLoad attr NameLoad Num If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad orelse If CompareEq NameLoad Str body For TupleStore TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad body If CompareEq AttributeLoad NameLoad attr Num body Continue Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad ListLoad NameLoad keyword NameLoad keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad ExtSlice Index NameLoad Index NameLoad Ellipsis NameLoad orelse Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad ExtSlice Index NameLoad Index NameLoad Ellipsis NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareEq Call NameLoad Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad SubscriptLoad NameLoad Index Num NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword NameLoad If Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr orelse Raise Call NameLoad Str Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Slice Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str ImportFrom alias Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp NameLoad comprehension NameStore NameLoad comprehension NameStore NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad SubscriptLoad Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad Index Num Index Num comprehension NameStore NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Ellipsis Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call NameLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Import alias Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str BinOpDiv Num NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str BinOpDiv Num NameLoad If UnaryOpNot CompareLtELtE SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Num body Raise Call NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot CompareLtELtE SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Num body Raise Call NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareLt SubscriptLoad NameLoad Index Str BinOpDiv Num NameLoad body Raise Call NameLoad Str If CompareLt SubscriptLoad NameLoad Index Str BinOpDiv Num NameLoad body Raise Call NameLoad Str If CompareGt SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call NameLoad BinOpMult SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call NameLoad Call NameLoad BinOpMult SubscriptLoad NameLoad Index Str NameLoad Assign NameStore ListLoad Call NameLoad NameLoad BinOpAdd NameLoad NameLoad While CompareLtE BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index Num Index Num NameLoad BinOpAdd BinOpSub NameLoad NameLoad Num body Assign NameStore BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index Num Index Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Return SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call Call NameLoad NameLoad NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index NameLoad If CompareEq NameLoad Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Slice Index NameLoad NameLoad If CompareGt NameLoad Num body If BoolOpAnd Call NameLoad NameLoad CompareEq NameLoad Str body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Index Num If NameLoad body Assign NameStore ListLoad NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr ListLoad Num Num Num Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad NameLoad Str Str NameLoad Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str If Call NameLoad NameLoad Str body AugAssignAdd NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr orelse AugAssignAdd NameStore Str If Call NameLoad NameLoad Str body AugAssignAdd NameStore BinOpMod Str Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num orelse AugAssignAdd NameStore Str If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad NameLoad Str body AugAssignAdd NameStore Str orelse AugAssignAdd NameStore Str If Call NameLoad NameLoad Str body AugAssignAdd NameStore Str If Call NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr orelse AugAssignAdd NameStore Str Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad Str NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str body Expr Str Return Call NameLoad NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str body Expr Str If UnaryOpNot CompareIs AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad NameLoad attr Str body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad Str Str NameLoad Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str If Call NameLoad NameLoad Str body AugAssignAdd NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr orelse AugAssignAdd NameStore Str If Call NameLoad NameLoad Str body AugAssignAdd NameStore BinOpMod Str Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num orelse AugAssignAdd NameStore Str If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad NameLoad Str body AugAssignAdd NameStore Str orelse AugAssignAdd NameStore Str If Call NameLoad NameLoad Str body AugAssignAdd NameStore Str If Call NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr orelse AugAssignAdd NameStore Str Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Str If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListComp ListLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str ListComp ListLoad NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr ListComp ListLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr ListComp ListLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr For NameStore ListLoad Str Str Str Str body If Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr ListComp SubscriptLoad NameLoad Index Num comprehension NameStore AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore ListComp BinOpSub NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Slice NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body ImportFrom alias If Call NameLoad Str Str body ImportFrom alias alias alias If Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore IfExp Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Call NameLoad NameLoad orelse ImportFrom alias alias alias If Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr body If Call NameLoad NameLoad body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad orelse Assign NameStore Call NameLoad keyword Call NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Call NameLoad NameLoad If Call NameLoad NameLoad Str body Assign NameStore ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Assign NameStore ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr ListComp Call NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad body Raise Call NameLoad Str Return TupleLoad NameLoad NameLoad decorator_list
N/A N/A numpy np N/A copy io.pick _pick_data_channels viz.decoding plot_gat_matrix plot_gat_times parallel parallel_func check_n_jobs utils warn check_version _DecodingTime N/A dict N/A N/A A dictionary to configure the training times that has the following keys:

    'slices' : ndarray, shape (n_clfs,)
        Array of time slices (in indices) used for each classifier.
        If not given, computed from 'start', 'stop', 'length', 'step'.
    'start' : float
        Time at which to start decoding (in seconds).
        Defaults to min(epochs.times).
    'stop' : float
        Maximal time at which to stop decoding (in seconds).
        Defaults to max(times).
    'step' : float
        Duration separating the start of subsequent classifiers (in
        seconds). Defaults to one time sample.
    'length' : float
        Duration of each classifier (in seconds). Defaults to one time sample.
    If None, empty dict.  __repr__ N/A N/A self N/A N/A N/A s N/A N/A start self N/A N/A s N/A start: %0.3f (s) N/A self N/A start N/A N/A stop self N/A N/A s N/A , stop: %0.3f (s) N/A self N/A stop N/A N/A step self N/A N/A s N/A , step: %0.3f (s) N/A self N/A step N/A N/A length self N/A N/A s N/A , length: %0.3f (s) N/A self N/A length N/A N/A slices self N/A N/A depth N/A N/A len ii N/A ii N/A self N/A slices N/A N/A N/A len N/A N/A np unique depth 1 N/A N/A N/A N/A depth N/A 0 1 N/A N/A s N/A , n_time_windows: %s N/A len depth N/A N/A s N/A , n_time_windows: %s x %s N/A N/A len depth N/A depth N/A 0 N/A N/A s N/A , n_time_windows: %s x [%s, %s] N/A N/A len depth N/A min N/A N/A len ii N/A ii depth N/A max N/A N/A len ii N/A ii depth N/A N/A <DecodingTime | %s> s N/A N/A _GeneralizationAcrossTime N/A object N/A N/A Generic object to train and test a series of classifiers at and across
    different time samples.
     __init__ N/A N/A self picks cv clf train_times test_times predict_method predict_mode scorer n_jobs N/A None 5 None None None predict cross-validation None 1 N/A sklearn.preprocessing StandardScaler sklearn.linear_model LogisticRegression sklearn.pipeline Pipeline N/A N/A self cv cv N/A N/A self train_times N/A N/A train_times None N/A _DecodingTime N/A _DecodingTime train_times N/A N/A test_times None N/A N/A N/A self test_times N/A _DecodingTime N/A N/A N/A test_times diagonal N/A N/A N/A self test_times diagonal N/A N/A N/A self test_times N/A _DecodingTime test_times N/A N/A clf None N/A N/A scaler N/A StandardScaler N/A estimator N/A LogisticRegression N/A clf N/A Pipeline N/A N/A scaler scaler N/A estimator estimator N/A N/A self clf clf N/A N/A self predict_mode predict_mode N/A N/A self scorer scorer N/A N/A self picks picks N/A N/A self predict_method predict_method N/A N/A self n_jobs n_jobs N/A fit N/A N/A self epochs y N/A None N/A N/A Train a classifier on each specified time slice.

        Note. This function sets the ``picks_``, ``ch_names``, ``cv_``,
        ``y_train``, ``train_times_`` and ``estimators_`` attributes.

        Parameters
        ----------
        epochs : instance of Epochs
            The epochs.
        y : list or ndarray of int, shape (n_samples,) or None, optional
            To-be-fitted model values. If None, y = epochs.events[:, 2].

        Returns
        -------
        self : GeneralizationAcrossTime
            Returns fitted GeneralizationAcrossTime object.

        Notes
        -----
        If X and y are not C-ordered and contiguous arrays of np.float64 and
        X is not a scipy.sparse.csr_matrix, X and/or y may be copied.

        If X is a dense array, then the other methods will not support sparse
        matrices as input.
         sklearn.base clone N/A att N/A picks_ ch_names y_train_ cv_ train_times_ estimators_ test_times_ y_pred_ y_true_ scores_ scorer_ N/A N/A N/A hasattr self att N/A N/A N/A delattr self att N/A n_jobs N/A self n_jobs N/A N/A X y N/A self picks_ N/A _check_epochs_input epochs y N/A self picks N/A N/A self ch_names N/A N/A N/A epochs ch_names N/A p N/A p N/A self picks_ N/A N/A N/A self cv_ N/A self _cv_splits N/A _set_cv N/A self cv clf N/A self clf X X y y N/A N/A self y_train_ y N/A N/A self train_times_ N/A _sliding_window N/A epochs times N/A self train_times N/A N/A epochs info N/A sfreq N/A N/A parallel p_func n_jobs N/A parallel_func _fit_slices n_jobs N/A n_chunks N/A min N/A len N/A N/A self train_times_ N/A slices n_jobs N/A time_chunks N/A N/A np array_split N/A N/A self train_times_ N/A slices n_chunks N/A out N/A parallel N/A N/A p_func N/A clone N/A self clf N/A X N/A N/A N/A N/A N/A np unique N/A N/A np concatenate time_chunk y time_chunk N/A self _cv_splits N/A time_chunk time_chunks N/A N/A self estimators_ N/A sum out N/A list N/A self N/A predict N/A N/A self epochs N/A N/A N/A Classifiers' predictions on each specified testing time slice.

        .. note:: This function sets the ``y_pred_`` and ``test_times_``
                  attributes.

        Parameters
        ----------
        epochs : instance of Epochs
            The epochs. Can be similar to fitted epochs or not. See
            predict_mode parameter.

        Returns
        -------
        y_pred : list of lists of arrays of floats, shape (n_train_t, n_test_t, n_epochs, n_prediction_dims)
            The single-trial predictions at each training time and each testing
            time. Note that the number of testing times per training time need
            not be regular; else
            ``np.shape(y_pred_) = (n_train_time, n_test_time, n_epochs)``.
         N/A N/A N/A hasattr N/A self clf N/A self predict_method N/A N/A N/A NotImplementedError N/A %s does not have `%s` N/A N/A self clf N/A self predict_method N/A N/A N/A hasattr self estimators_ N/A N/A N/A RuntimeError Please fit models before trying to predict N/A N/A N/A self predict_mode N/A cross-validation mean-prediction N/A N/A N/A ValueError `predict_mode` must be a str, "mean-prediction" or "cross-validation" N/A N/A N/A self predict_mode cross-validation N/A N/A n_est_cv N/A N/A len estimator N/A estimator N/A self estimators_ N/A heterogeneous_cv N/A N/A len N/A set n_est_cv 1 N/A mismatch_cv N/A N/A n_est_cv N/A 0 N/A len N/A self _cv_splits N/A mismatch_y N/A N/A len N/A self y_train_ N/A len epochs N/A N/A heterogeneous_cv mismatch_cv mismatch_y N/A N/A N/A ValueError When `predict_mode = "cross-validation"`, the training and predicting cv schemes must be identical. N/A att N/A y_pred_ test_times_ scores_ scorer_ y_true_ N/A N/A N/A hasattr self att N/A N/A N/A delattr self att N/A N/A N/A _warn_once clear N/A N/A X y _ N/A _check_epochs_input epochs None N/A self picks_ N/A N/A N/A N/A np all N/A N/A len test N/A N/A train test N/A self _cv_splits N/A N/A N/A warn Some folds do not have any test epochs. N/A N/A N/A self test_times diagonal N/A N/A test_times N/A _DecodingTime N/A N/A test_times N/A slices N/A N/A s N/A s N/A N/A self train_times_ N/A slices N/A N/A test_times N/A times N/A N/A s N/A s N/A N/A self train_times_ N/A times N/A N/A N/A isinstance N/A self test_times dict N/A N/A test_times N/A N/A copy deepcopy N/A self test_times N/A N/A N/A ValueError `test_times` must be a dict or "diagonal" N/A N/A slices test_times N/A N/A N/A length N/A N/A N/A self train_times_ keys N/A N/A N/A ValueError Need test_times["slices"] with adhoc train_times. N/A N/A test_times N/A length N/A N/A test_times get length N/A N/A self train_times_ N/A length N/A slices_list N/A list N/A _ N/A range N/A len N/A N/A self train_times_ N/A slices N/A N/A test_times_ N/A _sliding_window N/A epochs times test_times N/A N/A epochs info N/A sfreq N/A slices_list N/A N/A test_times_ N/A slices N/A test_times test_times_ N/A N/A test_times N/A slices slices_list N/A N/A test_times N/A times N/A N/A _set_window_time test N/A epochs times N/A test N/A test_times N/A slices N/A N/A train tests N/A zip N/A N/A self train_times_ N/A slices N/A test_times N/A slices N/A N/A N/A N/A N/A np all N/A N/A N/A len test N/A len train N/A test tests N/A N/A N/A ValueError `train_times` and `test_times` must have identical lengths N/A N/A self test_times_ test_times N/A N/A n_orig_epochs _ n_times N/A X shape N/A test_epochs N/A N/A N/A N/A self predict_mode cross-validation N/A N/A test_idxs N/A ii N/A N/A train test N/A self _cv_splits N/A ii test N/A start 0 N/A N/A _ test N/A self _cv_splits N/A N/A n_test_epochs N/A len test N/A stop N/A start n_test_epochs N/A N/A N/A test_epochs append N/A slice start stop 1 N/A start n_test_epochs N/A X N/A X N/A test_idxs N/A N/A parallel p_func n_jobs N/A parallel_func _predict_slices N/A self n_jobs N/A n_test_slice N/A max N/A N/A len sl N/A sl N/A N/A self test_times_ N/A slices N/A n_chunks N/A min n_test_slice n_jobs N/A chunks N/A N/A N/A np array_split slices n_chunks N/A slices N/A N/A self test_times_ N/A slices N/A chunks N/A map list N/A zip chunks N/A y_pred N/A parallel N/A N/A p_func estimators N/A self estimators_ cv_splits N/A self _cv_splits predict_mode N/A self predict_mode predict_method N/A self predict_method n_orig_epochs n_orig_epochs test_epochs test_epochs N/A dict N/A zip N/A X train_times N/A _chunk_data X chunk N/A chunk chunks N/A n_tests N/A N/A len sl N/A sl N/A N/A self test_times_ N/A slices N/A N/A N/A len N/A set n_tests 1 N/A N/A N/A self y_pred_ N/A N/A np concatenate y_pred axis 1 N/A N/A N/A self y_pred_ N/A N/A test N/A chunk train N/A test chunk N/A train N/A map list N/A zip y_pred N/A N/A self y_pred_ N/A score N/A N/A self epochs y N/A None None N/A N/A Score Epochs

        Estimate scores across trials by comparing the prediction estimated for
        each trial to its true value.

        Calls ``predict()`` if it has not been already.

        Note. The function updates the ``scorer_``, ``scores_``, and
        ``y_true_`` attributes.

        Parameters
        ----------
        epochs : instance of Epochs | None, optional
            The epochs. Can be similar to fitted epochs or not.
            If None, it needs to rely on the predictions ``y_pred_``
            generated with ``predict()``.
        y : list | ndarray, shape (n_epochs,) | None, optional
            True values to be compared with the predictions ``y_pred_``
            generated with ``predict()`` via ``scorer_``.
            If None and ``predict_mode``=='cross-validation' y = ``y_train_``.

        Returns
        -------
        scores : list of lists of float
            The scores estimated by ``scorer_`` at each training time and each
            testing time (e.g. mean accuracy of ``predict(X)``). Note that the
            number of testing times per training time need not be regular;
            else, np.shape(scores) = (n_train_time, n_test_time).
         N/A sklearn.metrics sklearn.base is_classifier sklearn.metrics accuracy_score mean_squared_error N/A N/A check_version sklearn 0.17 N/A sklearn.base is_regressor N/A is_regressor N/A N/A clf N/A N/A N/A False N/A N/A N/A epochs None N/A N/A N/A N/A self predict epochs N/A N/A N/A N/A hasattr self y_pred_ N/A N/A N/A RuntimeError Please predict() epochs first or pass epochs to score() N/A N/A self scorer_ N/A self scorer N/A N/A N/A self scorer_ None N/A N/A N/A N/A self predict_method predict N/A N/A N/A is_classifier N/A self clf N/A N/A N/A self scorer_ accuracy_score N/A N/A N/A is_regressor N/A self clf N/A N/A N/A self scorer_ mean_squared_error N/A N/A N/A isinstance N/A self scorer_ str N/A N/A N/A hasattr N/A sklearn metrics N/A %s_score N/A self scorer_ N/A N/A N/A self scorer_ N/A getattr N/A sklearn metrics N/A %s_score N/A self scorer_ N/A N/A N/A KeyError N/A N/A `{0} scorer` Doesn't appear to be valid a scikit-learn scorer. format N/A self scorer_ N/A N/A N/A self scorer_ N/A N/A N/A ValueError N/A Could not find a scoring metric for `clf=%s`  and `predict_method=%s`. Manually define scorer. N/A N/A self clf N/A self predict_method N/A N/A y None N/A N/A N/A N/A self predict_mode cross-validation N/A N/A y N/A self y_train_ N/A N/A N/A epochs None N/A N/A y N/A N/A epochs events N/A N/A N/A 2 N/A N/A N/A RuntimeError y is undefined because predict_mode="mean-prediction" and epochs are missing. You need to explicitly specify y. N/A N/A N/A N/A np all N/A N/A N/A np unique y N/A N/A np unique N/A self y_train_ N/A N/A N/A ValueError Classes (y) passed differ from classes used for training. Please explicitly pass your y for scoring. N/A N/A N/A isinstance y list N/A N/A y N/A N/A np array y N/A att N/A scores_ y_true_ N/A N/A N/A hasattr self att N/A N/A N/A delattr self att N/A N/A self y_true_ y N/A n_jobs N/A min N/A len N/A N/A N/A self y_pred_ N/A 0 N/A 0 N/A check_n_jobs N/A self n_jobs N/A N/A parallel p_func n_jobs N/A parallel_func _score_slices n_jobs N/A n_estimators N/A len N/A N/A self train_times_ N/A slices N/A n_chunks N/A min n_estimators n_jobs N/A chunks N/A N/A np array_split N/A range N/A len N/A N/A self train_times_ N/A slices n_chunks N/A scores N/A parallel N/A N/A p_func N/A self y_true_ N/A N/A N/A self y_pred_ N/A train N/A train chunk N/A self scorer_ N/A chunk chunks N/A N/A self scores_ N/A N/A np array N/A score N/A chunk scores N/A score chunk N/A N/A self scores_ N/A N/A N/A _warn_once N/A dict _predict_slices N/A N/A X train_times estimators cv_splits predict_mode predict_method n_orig_epochs test_epochs N/A N/A N/A Aux function of GeneralizationAcrossTime

    Run classifiers predictions loop across time samples.

    Parameters
    ----------
    X : ndarray, shape (n_epochs, n_features, n_times)
        To-be-fitted data.
    estimators : list of array-like, shape (n_times, n_folds)
        List of array of scikit-learn classifiers fitted in cross-validation.
    cv_splits : list of tuples
        List of tuples of train and test array generated from cv.
    train_times : list
        List of list of slices selecting data from X from which is prediction
        is generated.
    predict_method : str
        Specifies prediction method for the estimator.
    predict_mode : {'cross-validation', 'mean-prediction'}
        Indicates how predictions are achieved with regards to the cross-
        validation procedure:
            'cross-validation' : estimates a single prediction per sample based
                on the unique independent classifier fitted in the cross-
                validation.
            'mean-prediction' : estimates k predictions per sample, based on
                each of the k-fold cross-validation classifiers, and average
                these predictions into a single estimate per sample.
        Default: 'cross-validation'
    n_orig_epochs : int
        Original number of predicted epochs before slice definition. Note
        that the number of epochs may have been cropped if the cross validation
        is not deterministic (e.g. with ShuffleSplit, we may only predict a
        subset of epochs).
    test_epochs : list of slices
        List of slices to select the tested epoched in the cv.
     N/A N/A n_epochs _ n_times N/A X shape N/A n_train N/A len estimators N/A n_test N/A N/A len test_t_idxs N/A test_t_idxs train_times N/A y_pred None N/A N/A train_t_idx N/A estimator_cv test_t_idxs N/A enumerate N/A zip estimators train_times N/A N/A start N/A N/A np arange n_times N/A contiguous_start N/A N/A np array_equal N/A N/A sl N/A 0 N/A sl test_t_idxs start N/A window_lengths N/A N/A np unique N/A N/A len sl N/A sl test_t_idxs N/A vectorize_times N/A N/A window_lengths 1 contiguous_start N/A vectorize_times N/A N/A test_t_idxs N/A N/A slice N/A start N/A 0 N/A N/A start N/A -1 1 1 N/A N/A N/A N/A _warn_once get vectorization True N/A N/A N/A N/A len test_t_idxs 1 N/A N/A N/A warn Due to a time window with length > 1, unable to  vectorize across testing times. This leads to slower predictions compared to the length == 1 case. N/A N/A _warn_once N/A vectorization False N/A N/A ii test_t_idx N/A enumerate test_t_idxs N/A N/A X_pred X N/A N/A vectorize_times N/A N/A X_pred N/A N/A N/A X N/A N/A N/A N/A test_t_idx reshape n_epochs -1 N/A N/A predict_mode mean-prediction N/A N/A y_pred_ N/A _predict X_pred estimator_cv vectorize_times vectorize_times predict_method predict_method N/A N/A y_pred None N/A N/A n_dim N/A N/A y_pred_ shape N/A -1 N/A y_pred N/A _init_ypred n_train n_test n_orig_epochs n_dim N/A vectorize_times N/A N/A N/A N/A y_pred N/A train_t_idx N/A test_t_idx y_pred_ N/A N/A N/A N/A y_pred N/A train_t_idx N/A ii y_pred_ N/A N/A N/A predict_mode cross-validation N/A N/A N/A N/A _ test test_epoch estimator N/A zip cv_splits test_epochs estimator_cv N/A N/A N/A N/A test size 0 N/A N/A N/A y_pred_ N/A _predict N/A X_pred N/A test_epoch N/A estimator vectorize_times vectorize_times predict_method predict_method N/A N/A y_pred None N/A N/A n_dim N/A N/A y_pred_ shape N/A -1 N/A y_pred N/A _init_ypred n_train n_test n_orig_epochs n_dim N/A vectorize_times N/A N/A N/A N/A y_pred N/A train_t_idx N/A N/A test_t_idx N/A test N/A y_pred_ N/A N/A N/A N/A y_pred N/A train_t_idx N/A N/A ii N/A test N/A y_pred_ N/A y_pred N/A _init_ypred N/A N/A n_train n_test n_orig_epochs n_dim N/A N/A N/A Initialize the predictions for each train/test time points.

    Parameters
    ----------
    n_train : int
        Number of training time point (i.e. estimators)
    n_test : list of int
        List of number of testing time points for each estimator.
    n_orig_epochs : int
        Number of epochs passed to gat.predict()
    n_dim : int
        Number of dimensionality of y_pred. See np.shape(clf.predict(X))

    Returns
    -------
    y_pred : np.array, shape(n_train, n_test, n_orig_epochs, n_dim)
        Empty array.

    Notes
    -----
    The ``y_pred`` variable can only be initialized after the first
    prediction, because we can't know whether it is a a categorical output or a
    set of probabilistic estimates. If all train time points have the same
    number of testing time points, then y_pred is a matrix. Else it is an array
    of arrays.
     N/A N/A N/A len N/A set n_test 1 N/A N/A y_pred N/A N/A np empty N/A n_train N/A n_test N/A 0 n_orig_epochs n_dim N/A N/A y_pred N/A N/A np array N/A N/A N/A np empty N/A this_n n_orig_epochs n_dim N/A this_n n_test N/A y_pred N/A _score_slices N/A N/A y_true list_y_pred scorer N/A N/A N/A Aux function of GeneralizationAcrossTime that loops across chunks of
    testing slices.
     N/A scores_list N/A list N/A y_pred list_y_pred N/A N/A scores N/A list N/A N/A t this_y_pred N/A enumerate y_pred N/A N/A N/A N/A scores append N/A scorer y_true N/A N/A np array this_y_pred N/A N/A N/A scores_list append scores N/A scores_list N/A _check_epochs_input N/A N/A epochs y picks N/A None N/A N/A Aux function of GeneralizationAcrossTime

    Format MNE data into scikit-learn X and y.

    Parameters
    ----------
    epochs : instance of Epochs
            The epochs.
    y : ndarray shape (n_epochs) | list shape (n_epochs) | None
        To-be-fitted model. If y is None, y == epochs.events.
    picks : array-like of int | None
        The channels indices to include. If None the data
        channels in info, except bad channels, are used.

    Returns
    -------
    X : ndarray, shape (n_epochs, n_selected_chans, n_times)
        To-be-fitted data.
    y : ndarray, shape (n_epochs,)
        To-be-fitted model.
    picks : array-like of int | None
        The channels indices to include. If None the data
        channels in info, except bad channels, are used.
     N/A N/A y None N/A N/A y N/A N/A epochs events N/A N/A N/A 2 N/A N/A N/A isinstance y list N/A N/A y N/A N/A np array y N/A X N/A N/A epochs get_data N/A N/A picks None N/A N/A picks N/A _pick_data_channels N/A epochs info with_ref_meg False N/A N/A isinstance picks N/A list N/A np ndarray N/A N/A picks N/A N/A np array picks dtype N/A np int N/A N/A N/A ValueError picks must be a list or a numpy.ndarray of int N/A X N/A X N/A N/A N/A picks N/A N/A N/A N/A N/A X shape N/A 0 N/A N/A y shape N/A 0 N/A N/A X y picks N/A _fit_slices N/A N/A clf x_chunk y slices cv_splits N/A N/A N/A Aux function of GeneralizationAcrossTime

    Fit each classifier.

    Parameters
    ----------
    clf : scikit-learn classifier
        The classifier object.
    x_chunk : ndarray, shape (n_epochs, n_features, n_times)
        To-be-fitted data.
    y : list | array, shape (n_epochs,)
        To-be-fitted model.
    slices : list | array, shape (n_training_slice,)
        List of training slices, indicating time sample relative to X
    cv_splits : list of tuples
        List of (train, test) tuples generated from cv.split()

    Returns
    -------
    estimators : list of lists of estimators
        List of fitted scikit-learn classifiers corresponding to each training
        slice.
     sklearn.base clone N/A n_epochs N/A len x_chunk N/A estimators N/A list N/A values N/A N/A np unique N/A val N/A sl slices N/A val sl N/A t_slice slices N/A N/A t_slice N/A N/A np array N/A N/A N/A N/A N/A np where N/A ii values N/A 0 N/A 0 N/A ii t_slice N/A X N/A x_chunk N/A N/A N/A t_slice N/A X N/A N/A X reshape n_epochs N/A N/A np prod N/A N/A X shape N/A 1 N/A estimators_ N/A list N/A N/A fold N/A train test N/A enumerate cv_splits N/A N/A clf_ N/A clone clf N/A N/A N/A clf_ fit N/A X N/A N/A train N/A N/A y N/A train N/A N/A N/A estimators_ append clf_ N/A N/A N/A estimators append estimators_ N/A estimators N/A _sliding_window N/A N/A times window sfreq N/A N/A N/A Aux function of GeneralizationAcrossTime

    Define the slices on which to train each classifier. The user either define
    the time slices manually in window['slices'] or s/he passes optional params
    to set them from window['start'], window['stop'], window['step'] and
    window['length'].

    Parameters
    ----------
    times : ndarray, shape (n_times,)
        Array of times from MNE epochs.
    window : dict keys: ('start', 'stop', 'step', 'length')
        Either train or test times.

    Returns
    -------
    window : dict
        Dictionary to set training and testing times.

    See Also
    --------
    GeneralizationAcrossTime

     N/A copy N/A window N/A _DecodingTime N/A N/A copy deepcopy window N/A time_slices N/A N/A window get slices None N/A N/A time_slices None N/A N/A N/A window N/A start N/A N/A window get start N/A times N/A 0 N/A N/A window N/A stop N/A N/A window get stop N/A times N/A -1 N/A N/A window N/A step N/A N/A window get step N/A 1.0 sfreq N/A N/A window N/A length N/A N/A window get length N/A 1.0 sfreq N/A N/A N/A N/A times N/A 0 N/A window N/A start N/A times N/A -1 N/A N/A N/A ValueError N/A `start` (%.2f s) outside time range [%.2f, %.2f]. N/A N/A window N/A start N/A times N/A 0 N/A times N/A -1 N/A N/A N/A N/A times N/A 0 N/A window N/A stop N/A times N/A -1 N/A N/A N/A ValueError N/A `stop` (%.2f s) outside time range [%.2f, %.2f]. N/A N/A window N/A stop N/A times N/A 0 N/A times N/A -1 N/A N/A N/A window N/A step N/A 1.0 sfreq N/A N/A N/A ValueError `step` must be >= 1 / sampling_frequency N/A N/A N/A window N/A length N/A 1.0 sfreq N/A N/A N/A ValueError `length` must be >= 1 / sampling_frequency N/A N/A N/A window N/A length N/A N/A np ptp times N/A N/A N/A ValueError `length` must be <= time range find_t_idx N/A N/A t N/A N/A N/A N/A N/A np argmin N/A N/A np abs N/A N/A N/A np asarray times t N/A N/A start N/A find_t_idx N/A window N/A start N/A stop N/A find_t_idx N/A window N/A stop N/A step N/A int N/A round N/A N/A window N/A step sfreq N/A length N/A int N/A round N/A N/A window N/A length sfreq N/A time_slices N/A N/A range start N/A start length N/A N/A N/A N/A N/A time_slices N/A -1 N/A 0 step N/A N/A stop length 1 N/A N/A start N/A N/A N/A time_slices N/A -1 N/A 0 step N/A N/A N/A time_slices append N/A range start N/A start length N/A N/A window N/A slices time_slices N/A N/A window N/A times N/A _set_window_time N/A window N/A slices times N/A window N/A _set_window_time N/A N/A slices times N/A N/A N/A Aux function to define time as the last training time point N/A t_idx_ N/A N/A t N/A -1 N/A t slices N/A N/A times N/A t_idx_ N/A _predict N/A N/A X estimators vectorize_times predict_method N/A N/A N/A Aux function of GeneralizationAcrossTime

    Predict each classifier. If multiple classifiers are passed, average
    prediction across all classifiers to result in a single prediction per
    classifier.

    Parameters
    ----------
    estimators : ndarray, shape (n_folds,) | shape (1,)
        Array of scikit-learn classifiers to predict data.
    X : ndarray, shape (n_epochs, n_features, n_times)
        To-be-predicted data
    vectorize_times : bool
        If True, X can be vectorized to predict all times points at once
    predict_method : str
        Name of the method used to make predictions from the estimator. For
        example, both `predict_proba` and `predict` are supported for
        sklearn.linear_model.LogisticRegression. Note that the scorer must be
        adapted to the prediction outputs of the method. Defaults to 'predict'.

    Returns
    -------
    y_pred : ndarray, shape (n_epochs, m_prediction_dimensions)
        Classifier's prediction for each trial.
     scipy stats sklearn.base is_classifier N/A orig_shape N/A X shape N/A n_epochs N/A orig_shape N/A 0 N/A n_times N/A orig_shape N/A -1 N/A n_clf N/A len estimators N/A vectorize_times N/A N/A X N/A N/A N/A np hstack X T N/A n_epochs_tmp N/A len X N/A N/A fold clf N/A enumerate estimators N/A N/A _y_pred N/A N/A getattr clf predict_method X N/A N/A N/A _y_pred ndim 1 N/A N/A _y_pred N/A _y_pred N/A N/A N/A None N/A N/A fold 0 N/A N/A predict_size N/A N/A _y_pred shape N/A 1 N/A y_pred N/A N/A np ones N/A n_epochs_tmp predict_size n_clf N/A N/A y_pred N/A N/A N/A N/A fold _y_pred N/A N/A fold 0 N/A N/A N/A N/A is_classifier clf N/A predict_method predict N/A N/A N/A y_pred _ N/A N/A stats mode y_pred axis 2 N/A N/A y_pred N/A N/A np mean y_pred axis 2 keepdims True N/A y_pred N/A y_pred N/A N/A N/A N/A 0 N/A vectorize_times N/A N/A shape N/A n_epochs n_times N/A N/A y_pred shape N/A -1 N/A y_pred N/A N/A N/A N/A y_pred reshape shape transpose N/A 1 0 2 N/A y_pred N/A GeneralizationAcrossTime N/A _GeneralizationAcrossTime N/A N/A Generalize across time and conditions

    Creates an estimator object used to 1) fit a series of classifiers on
    multidimensional time-resolved data, and 2) test the ability of each
    classifier to generalize across other time samples.

    Parameters
    ----------
    picks : array-like of int | None
        The channels indices to include. If None the data
        channels in info, except bad channels, are used.
    cv : int | object
        If an integer is passed, it is the number of folds.
        Specific cross-validation objects can be passed, see
        scikit-learn.model_selection module for the list of possible objects.
        If clf is a classifier, defaults to StratifiedKFold(n_folds=5), else
        defaults to KFold(n_folds=5).
    clf : object | None
        An estimator compliant with the scikit-learn API (fit & predict).
        If None the classifier will be a standard pipeline including
        StandardScaler and LogisticRegression with default parameters.
    train_times : dict | None
        A dictionary to configure the training times:

            ``slices`` : ndarray, shape (n_clfs,)
                Array of time slices (in indices) used for each classifier.
                If not given, computed from 'start', 'stop', 'length', 'step'.
            ``start`` : float
                Time at which to start decoding (in seconds).
                Defaults to min(epochs.times).
            ``stop`` : float
                Maximal time at which to stop decoding (in seconds).
                Defaults to max(times).
            ``step`` : float
                Duration separating the start of subsequent classifiers (in
                seconds). Defaults to one time sample.
            ``length`` : float
                Duration of each classifier (in seconds).
                Defaults to one time sample.

        If None, empty dict.
    test_times : 'diagonal' | dict | None, optional
        Configures the testing times.
        If set to 'diagonal', predictions are made at the time at which
        each classifier is trained.
        If set to None, predictions are made at all time points.
        If set to dict, the dict should contain ``slices`` or be contructed in
        a similar way to train_times::

            ``slices`` : ndarray, shape (n_clfs,)
                Array of time slices (in indices) used for each classifier.
                If not given, computed from 'start', 'stop', 'length', 'step'.

        If None, empty dict.
    predict_method : str
        Name of the method used to make predictions from the estimator. For
        example, both `predict_proba` and `predict` are supported for
        sklearn.linear_model.LogisticRegression. Note that the scorer must be
        adapted to the prediction outputs of the method. Defaults to 'predict'.
    predict_mode : {'cross-validation', 'mean-prediction'}
        Indicates how predictions are achieved with regards to the cross-
        validation procedure:

            ``cross-validation`` : estimates a single prediction per sample
                based on the unique independent classifier fitted in the
                cross-validation.
            ``mean-prediction`` : estimates k predictions per sample, based on
                each of the k-fold cross-validation classifiers, and average
                these predictions into a single estimate per sample.

        Default: 'cross-validation'
    scorer : object | None | str
        scikit-learn Scorer instance or str type indicating the name of
        the scorer such as `accuracy`, `roc_auc`. If None, set to 
        accuracy_score.

    n_jobs : int
        Number of jobs to run in parallel. Defaults to 1.

    Attributes
    ----------
    picks_ : array-like of int | None
        The channels indices to include.
    ch_names : list, array-like, shape (n_channels,)
        Names of the channels used for training.
    y_train_ : list | ndarray, shape (n_samples,)
        The categories used for training.
    train_times_ : dict
        A dictionary that configures the training times:

            ``slices`` : ndarray, shape (n_clfs,)
                Array of time slices (in indices) used for each classifier.
                If not given, computed from 'start', 'stop', 'length', 'step'.
            ``times`` : ndarray, shape (n_clfs,)
                The training times (in seconds).

    test_times_ : dict
        A dictionary that configures the testing times for each training time:

            ``slices`` : ndarray, shape (n_clfs, n_testing_times)
                Array of time slices (in indices) used for each classifier.
            ``times`` : ndarray, shape (n_clfs, n_testing_times)
                The testing times (in seconds) for each training time.

    cv_ : CrossValidation object
        The actual CrossValidation input depending on y.
    estimators_ : list of list of scikit-learn.base.BaseEstimator subclasses.
        The estimators for each time point and each fold.
    y_pred_ : list of lists of arrays of floats, shape (n_train_times, n_test_times, n_epochs, n_prediction_dims)
        The single-trial predictions estimated by self.predict() at each
        training time and each testing time. Note that the number of testing
        times per training time need not be regular, else
        ``np.shape(y_pred_) = (n_train_time, n_test_time, n_epochs).``
    y_true_ : list | ndarray, shape (n_samples,)
        The categories used for scoring ``y_pred_``.
    scorer_ : object
        scikit-learn Scorer instance.
    scores_ : list of lists of float
        The scores estimated by ``self.scorer_`` at each training time and each
        testing time (e.g. mean accuracy of self.predict(X)). Note that the
        number of testing times per training time need not be regular;
        else, ``np.shape(scores) = (n_train_time, n_test_time)``.

    See Also
    --------
    TimeDecoding

    Notes
    -----
    The function implements the method used in:

        Jean-Remi King, Alexandre Gramfort, Aaron Schurger, Lionel Naccache
        and Stanislas Dehaene, "Two distinct dynamic modes subtend the
        detection of unexpected sounds", PLoS ONE, 2014
        DOI: 10.1371/journal.pone.0085791

    .. versionadded:: 0.9.0
     __init__ N/A N/A self picks cv clf train_times test_times predict_method predict_mode scorer n_jobs N/A None 5 None None None predict cross-validation None 1 N/A N/A N/A N/A N/A super GeneralizationAcrossTime self __init__ picks picks cv cv clf clf train_times train_times test_times test_times predict_method predict_method predict_mode predict_mode scorer scorer n_jobs n_jobs N/A __repr__ N/A N/A self N/A N/A N/A s N/A N/A hasattr self estimators_ N/A N/A s N/A fitted, start : %0.3f (s), stop : %0.3f (s) N/A N/A N/A N/A self train_times_ get start N/A np nan N/A N/A N/A self train_times_ get stop N/A np nan N/A N/A s no fit N/A N/A hasattr self y_pred_ N/A N/A s N/A , predicted %d epochs N/A len N/A N/A N/A self y_pred_ N/A 0 N/A 0 N/A N/A s , no prediction N/A N/A N/A hasattr self estimators_ N/A hasattr self scores_ N/A N/A s ,
  N/A N/A s ,  N/A N/A hasattr self scores_ N/A N/A s scored N/A N/A callable N/A self scorer_ N/A N/A s N/A  (%s) N/A N/A self scorer_ __name__ N/A N/A s no score N/A N/A <GAT | %s> s N/A plot N/A N/A self title vmin vmax tlim ax cmap show colorbar xlabel ylabel N/A None None None None None RdBu_r True True True True N/A N/A Plotting function of GeneralizationAcrossTime object

        Plot the score of each classifier at each tested time window.

        Parameters
        ----------
        title : str | None
            Figure title.
        vmin : float | None
            Min color value for scores. If None, sets to min(``gat.scores_``).
        vmax : float | None
            Max color value for scores. If None, sets to max(``gat.scores_``).
        tlim : ndarray, (train_min, test_max) | None
            The time limits used for plotting.
        ax : object | None
            Plot pointer. If None, generate new figure.
        cmap : str | cmap object
            The color map to be used. Defaults to ``'RdBu_r'``.
        show : bool
            If True, the figure will be shown. Defaults to True.
        colorbar : bool
            If True, the colorbar of the figure is displayed. Defaults to True.
        xlabel : bool
            If True, the xlabel is displayed. Defaults to True.
        ylabel : bool
            If True, the ylabel is displayed. Defaults to True.

        Returns
        -------
        fig : instance of matplotlib.figure.Figure
            The figure.
         N/A N/A plot_gat_matrix self title title vmin vmin vmax vmax tlim tlim ax ax cmap cmap show show colorbar colorbar xlabel xlabel ylabel ylabel N/A plot_diagonal N/A N/A self title xmin xmax ymin ymax ax show color xlabel ylabel legend chance label N/A None None None None None None True None True True True True Classif. score N/A N/A Plotting function of GeneralizationAcrossTime object

        Plot each classifier score trained and tested at identical time
        windows.

        Parameters
        ----------
        title : str | None
            Figure title.
        xmin : float | None, optional
            Min time value.
        xmax : float | None, optional
            Max time value.
        ymin : float | None, optional
            Min score value. If None, sets to min(scores).
        ymax : float | None, optional
            Max score value. If None, sets to max(scores).
        ax : object | None
            Instance of mataplotlib.axes.Axis. If None, generate new figure.
        show : bool
            If True, the figure will be shown. Defaults to True.
        color : str
            Score line color.
        xlabel : bool
            If True, the xlabel is displayed. Defaults to True.
        ylabel : bool
            If True, the ylabel is displayed. Defaults to True.
        legend : bool
            If True, a legend is displayed. Defaults to True.
        chance : bool | float. Defaults to None
            Plot chance level. If True, chance level is estimated from the type
            of scorer.
        label : str
            Score label used in the legend. Defaults to 'Classif. score'.

        Returns
        -------
        fig : instance of matplotlib.figure.Figure
            The figure.
         N/A N/A plot_gat_times self train_time diagonal title title xmin xmin xmax xmax ymin ymin ymax ymax ax ax show show color color xlabel xlabel ylabel ylabel legend legend chance chance label label N/A plot_times N/A N/A self train_time title xmin xmax ymin ymax ax show color xlabel ylabel legend chance label N/A None None None None None None True None True True True True Classif. score N/A N/A Plotting function of GeneralizationAcrossTime object

        Plot the scores of the classifier trained at specific training time(s).

        Parameters
        ----------
        train_time : float | list or array of float
            Plots scores of the classifier trained at train_time.
        title : str | None
            Figure title.
        xmin : float | None, optional
            Min time value.
        xmax : float | None, optional
            Max time value.
        ymin : float | None, optional
            Min score value. If None, sets to min(scores).
        ymax : float | None, optional
            Max score value. If None, sets to max(scores).
        ax : object | None
            Instance of mataplotlib.axes.Axis. If None, generate new figure.
        show : bool
            If True, the figure will be shown. Defaults to True.
        color : str or list of str
            Score line color(s).
        xlabel : bool
            If True, the xlabel is displayed. Defaults to True.
        ylabel : bool
            If True, the ylabel is displayed. Defaults to True.
        legend : bool
            If True, a legend is displayed. Defaults to True.
        chance : bool | float.
            Plot chance level. If True, chance level is estimated from the type
            of scorer.
        label : str
            Score label used in the legend. Defaults to 'Classif. score'.

        Returns
        -------
        fig : instance of matplotlib.figure.Figure
            The figure.
         N/A N/A N/A N/A N/A N/A np array train_time dtype N/A N/A np dtype float N/A N/A N/A ValueError N/A train_time must be float | list or array of floats. Got %s. N/A type train_time N/A N/A plot_gat_times self train_time train_time title title xmin xmin xmax xmax ymin ymin ymax ymax ax ax show show color color xlabel xlabel ylabel ylabel legend legend chance chance label label N/A N/A TimeDecoding N/A _GeneralizationAcrossTime N/A N/A Train and test a series of classifiers at each time point to obtain a
    score across time.

    Parameters
    ----------
    picks : array-like of int | None
        The channels indices to include. If None the data
        channels in info, except bad channels, are used.
    cv : int | object
        If an integer is passed, it is the number of folds.
        Specific cross-validation objects can be passed, see
        scikit-learn.model_selection module for the list of possible objects.
        If clf is a classifier, defaults to StratifiedKFold(n_folds=5), else
        defaults to KFold(n_folds=5).
    clf : object | None
        An estimator compliant with the scikit-learn API (fit & predict).
        If None the classifier will be a standard pipeline including
        StandardScaler and a Logistic Regression with default parameters.
    times : dict | None
        A dictionary to configure the training times:

            ``slices`` : ndarray, shape (n_clfs,)
                Array of time slices (in indices) used for each classifier.
                If not given, computed from 'start', 'stop', 'length', 'step'.
            ``start`` : float
                Time at which to start decoding (in seconds). By default,
                min(epochs.times).
            ``stop`` : float
                Maximal time at which to stop decoding (in seconds). By
                default, max(times).
            ``step`` : float
                Duration separating the start of subsequent classifiers (in
                seconds). By default, equals one time sample.
            ``length`` : float
                Duration of each classifier (in seconds). By default, equals
                one time sample.

        If None, empty dict.
    predict_method : str
        Name of the method used to make predictions from the estimator. For
        example, both `predict_proba` and `predict` are supported for
        sklearn.linear_model.LogisticRegression. Note that the scorer must be
        adapted to the prediction outputs of the method. Defaults to 'predict'.
    predict_mode : {'cross-validation', 'mean-prediction'}
        Indicates how predictions are achieved with regards to the cross-
        validation procedure:

            ``cross-validation`` : estimates a single prediction per sample
                based on the unique independent classifier fitted in the
                cross-validation.
            ``mean-prediction`` : estimates k predictions per sample, based on
                each of the k-fold cross-validation classifiers, and average
                these predictions into a single estimate per sample.

        Default: 'cross-validation'
    scorer : object | None | str
        scikit-learn Scorer instance or str type indicating the
        name of the scorer such as `accuracy`, `roc_auc`. If None,
        set to accuracy_score.
    n_jobs : int
        Number of jobs to run in parallel. Defaults to 1.

    Attributes
    ----------
    picks_ : array-like of int | None
        The channels indices to include.
    ch_names : list, array-like, shape (n_channels,)
        Names of the channels used for training.
    y_train_ : ndarray, shape (n_samples,)
        The categories used for training.
    times_ : dict
        A dictionary that configures the training times:

            ``slices`` : ndarray, shape (n_clfs,)
                Array of time slices (in indices) used for each classifier.
                If not given, computed from 'start', 'stop', 'length', 'step'.
            ``times`` : ndarray, shape (n_clfs,)
                The training times (in seconds).

    cv_ : CrossValidation object
        The actual CrossValidation input depending on y.
    estimators_ : list of list of scikit-learn.base.BaseEstimator subclasses.
        The estimators for each time point and each fold.
    y_pred_ : ndarray, shape (n_times, n_epochs, n_prediction_dims)
        Class labels for samples in X.
    y_true_ : list | ndarray, shape (n_samples,)
        The categories used for scoring ``y_pred_``.
    scorer_ : object
        scikit-learn Scorer instance.
    scores_ : list of float, shape (n_times,)
        The scores (mean accuracy of self.predict(X) wrt. y.).

    See Also
    --------
    GeneralizationAcrossTime

    Notes
    -----
    The function is equivalent to the diagonal of GeneralizationAcrossTime()

    .. versionadded:: 0.10
     __init__ N/A N/A self picks cv clf times predict_method predict_mode scorer n_jobs N/A None 5 None None predict cross-validation None 1 N/A N/A N/A N/A N/A super TimeDecoding self __init__ picks picks cv cv clf clf train_times times test_times diagonal predict_method predict_method predict_mode predict_mode scorer scorer n_jobs n_jobs N/A N/A N/A self _clean_times N/A __repr__ N/A N/A self N/A N/A N/A s N/A N/A hasattr self estimators_ N/A N/A s N/A fitted, start : %0.3f (s), stop : %0.3f (s) N/A N/A N/A N/A self times_ get start N/A np nan N/A N/A N/A self times_ get stop N/A np nan N/A N/A s no fit N/A N/A hasattr self y_pred_ N/A N/A s N/A , predicted %d epochs N/A len N/A N/A self y_pred_ N/A 0 N/A N/A s , no prediction N/A N/A N/A hasattr self estimators_ N/A hasattr self scores_ N/A N/A s ,
  N/A N/A s ,  N/A N/A hasattr self scores_ N/A N/A s scored N/A N/A callable N/A self scorer_ N/A N/A s N/A  (%s) N/A N/A self scorer_ __name__ N/A N/A s no score N/A N/A <TimeDecoding | %s> s N/A fit N/A N/A self epochs y N/A None N/A N/A Train a classifier on each specified time slice.

        Note. This function sets the ``picks_``, ``ch_names``, ``cv_``,
        ``y_train``, ``train_times_`` and ``estimators_`` attributes.

        Parameters
        ----------
        epochs : instance of Epochs
            The epochs.
        y : list or ndarray of int, shape (n_samples,) or None, optional
            To-be-fitted model values. If None, y = epochs.events[:, 2].

        Returns
        -------
        self : TimeDecoding
            Returns fitted TimeDecoding object.

        Notes
        -----
        If X and y are not C-ordered and contiguous arrays of np.float64 and
        X is not a scipy.sparse.csr_matrix, X and/or y may be copied.

        If X is a dense array, then the other methods will not support sparse
        matrices as input.
         N/A N/A N/A self _prep_times N/A N/A N/A N/A super TimeDecoding self fit epochs y y N/A N/A N/A self _clean_times N/A self N/A predict N/A N/A self epochs N/A N/A N/A Test each classifier on each specified testing time slice.

        .. note:: This function sets the ``y_pred_`` and ``test_times_``
                  attributes.

        Parameters
        ----------
        epochs : instance of Epochs
            The epochs. Can be similar to fitted epochs or not. See
            predict_mode parameter.

        Returns
        -------
        y_pred : list of lists of arrays of floats, shape (n_times, n_epochs, n_prediction_dims)
            The single-trial predictions at each time sample.
         N/A N/A N/A self _prep_times N/A N/A N/A N/A super TimeDecoding self predict epochs N/A N/A N/A self _clean_times N/A N/A self y_pred_ N/A score N/A N/A self epochs y N/A None None N/A N/A Score Epochs

        Estimate scores across trials by comparing the prediction estimated for
        each trial to its true value.

        Calls ``predict()`` if it has not been already.

        Note. The function updates the ``scorer_``, ``scores_``, and
        ``y_true_`` attributes.

        Parameters
        ----------
        epochs : instance of Epochs | None, optional
            The epochs. Can be similar to fitted epochs or not.
            If None, it needs to rely on the predictions ``y_pred_``
            generated with ``predict()``.
        y : list | ndarray, shape (n_epochs,) | None, optional
            True values to be compared with the predictions ``y_pred_``
            generated with ``predict()`` via ``scorer_``.
            If None and ``predict_mode``=='cross-validation' y = ``y_train_``.

        Returns
        -------
        scores : list of float, shape (n_times,)
            The scores estimated by ``scorer_`` at each time sample (e.g. mean
            accuracy of ``predict(X)``).
         N/A N/A epochs None N/A N/A N/A N/A self predict epochs N/A N/A N/A N/A hasattr self y_pred_ N/A N/A N/A RuntimeError Please predict() epochs first or pass epochs to score() N/A N/A N/A self _prep_times N/A N/A N/A N/A super TimeDecoding self score epochs None y y N/A N/A N/A self _clean_times N/A N/A self scores_ N/A plot N/A N/A self title xmin xmax ymin ymax ax show color xlabel ylabel legend chance label N/A None None None None None None True None True True True True Classif. score N/A N/A Plotting function

        Predict each classifier. If multiple classifiers are passed, average
        prediction across all classifiers to result in a single prediction per
        classifier.

        Parameters
        ----------
        title : str | None
            Figure title.
        xmin : float | None, optional,
            Min time value.
        xmax : float | None, optional,
            Max time value.
        ymin : float
            Min score value. Defaults to 0.
        ymax : float
            Max score value. Defaults to 1.
        ax : object | None
            Instance of mataplotlib.axes.Axis. If None, generate new figure.
        show : bool
            If True, the figure will be shown. Defaults to True.
        color : str
            Score line color. Defaults to 'steelblue'.
        xlabel : bool
            If True, the xlabel is displayed. Defaults to True.
        ylabel : bool
            If True, the ylabel is displayed. Defaults to True.
        legend : bool
            If True, a legend is displayed. Defaults to True.
        chance : bool | float. Defaults to None
            Plot chance level. If True, chance level is estimated from the type
            of scorer.
        label : str
            Score label used in the legend. Defaults to 'Classif. score'.

        Returns
        -------
        fig : instance of matplotlib.figure.Figure
            The figure.
         N/A N/A N/A self _prep_times N/A fig N/A plot_gat_times self train_time diagonal title title xmin xmin xmax xmax ymin ymin ymax ymax ax ax show show color color xlabel xlabel ylabel ylabel legend legend chance chance label label N/A N/A N/A self _clean_times N/A fig N/A _prep_times N/A N/A self N/A N/A N/A Auxiliary function to allow compatibility with GAT N/A N/A self test_times diagonal N/A N/A hasattr self times N/A N/A N/A self train_times N/A self times N/A N/A hasattr self times_ N/A N/A N/A self train_times_ N/A self times_ N/A N/A self test_times_ N/A _DecodingTime N/A N/A N/A self test_times_ N/A slices N/A N/A slic N/A slic N/A N/A self train_times_ N/A slices N/A N/A N/A self test_times_ N/A times N/A N/A tim N/A tim N/A N/A self train_times_ N/A times N/A N/A hasattr self scores_ N/A N/A N/A self scores_ N/A N/A score N/A score N/A self scores_ N/A N/A hasattr self y_pred_ N/A N/A N/A self y_pred_ N/A N/A y_pred N/A y_pred N/A self y_pred_ N/A _clean_times N/A N/A self N/A N/A N/A Auxiliary function to allow compatibility with GAT N/A N/A hasattr self train_times N/A N/A N/A self times N/A self train_times N/A N/A hasattr self train_times_ N/A N/A N/A self times_ N/A self train_times_ N/A attr N/A test_times train_times test_times_ train_times_ N/A N/A N/A hasattr self attr N/A N/A N/A delattr self attr N/A N/A hasattr self y_pred_ N/A N/A N/A self y_pred_ N/A N/A y_pred N/A 0 N/A y_pred N/A self y_pred_ N/A N/A hasattr self scores_ N/A N/A N/A self scores_ N/A N/A score N/A 0 N/A score N/A self scores_ N/A N/A _chunk_data N/A N/A X slices N/A N/A N/A Smart chunking to avoid memory overload.

    The parallelization is performed across time samples. To avoid overheads,
    the X data is splitted into large chunks of different time sizes. To
    avoid duplicating the memory load to each job, we only pass the time
    samples that are required by each job. The indices of the training times
    must be adjusted accordingly.
     N/A slices N/A sl N/A sl slices N/A len sl N/A selected_times N/A N/A np hstack N/A N/A N/A np ravel sl N/A sl slices N/A start N/A N/A np min selected_times N/A stop N/A N/A N/A np max selected_times 1 N/A slices_chunk N/A N/A sl start N/A sl slices N/A X_chunk N/A X N/A N/A N/A N/A start stop N/A N/A X_chunk slices_chunk N/A _set_cv N/A N/A cv clf X y N/A None None None N/A sklearn.base is_classifier N/A N/A check_version sklearn 0.18 N/A sklearn.model_selection check_cv StratifiedKFold KFold N/A N/A isinstance cv N/A int N/A np int N/A N/A XFold N/A N/A is_classifier clf StratifiedKFold KFold N/A cv N/A XFold n_folds cv N/A cv N/A check_cv cv cv y y classifier N/A is_classifier clf N/A sklearn.cross_validation check_cv StratifiedKFold KFold N/A N/A isinstance cv N/A int N/A np int N/A N/A N/A is_classifier clf N/A N/A cv N/A StratifiedKFold y y n_folds cv N/A N/A cv N/A KFold n N/A len y n_folds cv N/A cv N/A check_cv cv cv X X y y classifier N/A is_classifier clf N/A N/A hasattr cv split N/A N/A cv_splits N/A N/A train test N/A N/A train test N/A N/A cv split X N/A N/A np zeros_like y y y N/A N/A cv_splits N/A N/A train test N/A N/A train test cv N/A N/A N/A N/A np all N/A N/A len train N/A N/A train _ cv_splits N/A N/A N/A ValueError Some folds do not have any train epochs. N/A N/A cv cv_splits N/A