Module ImportFrom alias Assign NameStore Str ImportFrom alias alias alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assert Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpMult AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num Assign NameStore SubscriptLoad NameLoad Index TupleLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr SubscriptLoad AttributeLoad NameLoad attr Index Str For NameStore Call NameLoad Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str ExtSlice Slice SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Slice Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str ExtSlice Slice SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Slice AugAssignAdd NameStore Num For NameStore Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice BinOpSub NameLoad NameLoad NameLoad Slice Assign NameStore SubscriptLoad NameLoad ExtSlice Index BinOpSub NameLoad Num Slice Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AugAssignAdd NameStore Num Expr Call NameLoad TupleLoad Str Call NameLoad NameLoad Expr Call NameLoad TupleLoad Str BinOpMult NameLoad NameLoad Expr Call NameLoad TupleLoad Str BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call NameLoad TupleLoad Str BinOpMult Call NameLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Slice Num attr NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index BinOpSub NameLoad Num Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num While CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad body AugAssignAdd NameStore Num AugAssignAdd NameStore ListLoad Num Num orelse AugAssignAdd NameStore Num AugAssignAdd NameStore ListLoad Num Num AugAssignAdd NameStore Num AugAssignAdd NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpDiv BinOpMult Num NameLoad BinOpAdd NameLoad NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad TupleLoad Str BinOpDiv BinOpMult Num Call NameLoad Call AttributeLoad CompareGtE NameLoad Num attr AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr IfExp CompareEq NameLoad Str NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr attr NameLoad Slice Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr BinOpDiv BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpAdd NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpAdd BinOpMult BinOpSub NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str If CompareLtE AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign NameStore SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Index Num If CompareNotEq AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign NameStore SubscriptLoad NameLoad Index NameLoad If AttributeLoad NameLoad attr body For NameStore Call NameLoad NameLoad body Assign NameStore IfExp CompareGt SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad BinOpDiv BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad orelse For NameStore Call NameLoad NameLoad body Assign NameStore IfExp Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad BinOpAdd BinOpMult BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad Num Num Str body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Index Num If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr keyword Num orelse Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr keyword Num Assign AttributeStore NameLoad attr BinOpDiv BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num decorator_list decorator_list
N/A __future__ print_function N/A __author__ Martin Felder numpy r_ array isfinite pybrain.datasets SequentialDataSet convertSequenceToTimeWindows N/A N/A DSseq NewClass winsize N/A N/A N/A  Converts a sequential classification dataset into time windows of fixed length.
    Assumes the correct class is given at the last timestep of each sequence. Incomplete windows at the
    sequence end are pruned. No overlap between windows.

    :arg DSseq: the sequential data set to cut up
    :arg winsize: size of the data window
    :arg NewClass: class of the windowed data set to be returned (gets initialised with indim*winsize, outdim) N/A N/A isinstance DSseq SequentialDataSet N/A DSwin N/A NewClass N/A N/A DSseq indim winsize N/A DSseq outdim N/A nsamples 0 N/A nseqs 0 N/A si N/A r_ N/A N/A N/A N/A N/A DSseq N/A sequence_index flatten N/A N/A DSseq endmarker N/A sequence_index N/A i N/A range N/A N/A DSseq getNumSequences N/A N/A input N/A N/A DSseq N/A input N/A N/A N/A si N/A i N/A si N/A N/A i 1 N/A N/A target N/A N/A DSseq N/A target N/A N/A N/A si N/A i N/A si N/A N/A i 1 N/A N/A nseqs 1 N/A k N/A range winsize N/A N/A input shape N/A 0 winsize N/A N/A inp_win N/A input N/A N/A N/A k winsize k N/A N/A tar_win N/A target N/A N/A N/A k 1 N/A N/A N/A N/A DSwin addSample N/A N/A inp_win flatten N/A N/A tar_win flatten N/A nsamples 1 N/A N/A print N/A samples in original dataset:  N/A len DSseq N/A N/A print N/A window size * nsamples =  N/A winsize nsamples N/A N/A print N/A total data points in original data:  N/A N/A len DSseq N/A DSseq indim N/A N/A print N/A total data points in windowed dataset:  N/A N/A len DSwin N/A DSwin indim N/A DSwin N/A windowSequenceEval N/A N/A DS winsz result N/A N/A N/A  take results of a window-based classification and assess/plot them on the sequence
    WARNING: NOT TESTED! N/A si_old 0 N/A idx 0 N/A x N/A N/A y N/A N/A seq_res N/A N/A N/A i si N/A enumerate N/A N/A N/A N/A DS N/A sequence_index N/A 1 astype int N/A N/A tar N/A N/A DS N/A target N/A N/A si 1 N/A curr_x si_old N/A correct 0.0 N/A wrong 0.0 N/A N/A curr_x si N/A N/A N/A N/A x append curr_x N/A N/A N/A result N/A idx tar N/A N/A correct 1.0 N/A y N/A 1.0 1.0 N/A N/A wrong 1.0 N/A y N/A 0.0 0.0 N/A idx 1 N/A curr_x winsz N/A N/A N/A x append curr_x N/A N/A N/A seq_res append N/A N/A 100.0 correct N/A correct wrong N/A N/A print N/A sequence %d correct: %g12.2%% N/A i N/A seq_res N/A -1 N/A seq_res N/A array seq_res N/A N/A print N/A total fraction of correct sequences:  N/A N/A 100.0 N/A float N/A N/A N/A seq_res 0.5 sum N/A seq_res size N/A DataSetNormalizer N/A object N/A N/A  normalize a dataset according to a stored LIBSVM normalization file  __init__ N/A N/A self fname meanstd N/A None False N/A N/A N/A self dim 0 N/A N/A self meanstd meanstd N/A N/A fname None N/A N/A N/A N/A self load fname N/A load N/A N/A self fname N/A N/A N/A f N/A open fname N/A c N/A N/A x N/A N/A f readline N/A N/A self meanstd N/A N/A x x False True N/A bounds N/A N/A N/A array N/A N/A N/A N/A f readline split astype float N/A line f N/A N/A N/A N/A c append N/A N/A N/A N/A array N/A N/A line split astype float N/A 1 N/A N/A self dim N/A len c N/A c N/A array c N/A N/A self par1 N/A c N/A N/A N/A 0 N/A N/A self par2 N/A c N/A N/A N/A 1 N/A N/A self scale N/A N/A N/A bounds N/A 1 N/A bounds N/A 0 N/A N/A c N/A N/A N/A 1 N/A c N/A N/A N/A 0 N/A N/A self newmin N/A bounds N/A 0 N/A N/A self newmax N/A bounds N/A 1 N/A save N/A N/A self fname N/A N/A N/A f N/A open fname w+ N/A N/A N/A f write x
 N/A N/A N/A f write N/A %g %g N/A N/A self newmin N/A self newmax N/A i N/A range N/A self dim N/A N/A N/A N/A f write N/A %d %g %g N/A N/A i 1 N/A N/A self par1 N/A i N/A N/A self par2 N/A i N/A N/A N/A f close N/A normalizePattern N/A N/A self y N/A N/A N/A N/A N/A N/A y N/A self par1 N/A self scale N/A self newmin N/A normalize N/A N/A self ds field N/A input N/A N/A  normalize dataset or vector wrt. to stored min and max  N/A N/A N/A self dim 0 N/A N/A N/A IndexError No normalization parameters defined! N/A dsdim N/A N/A N/A ds N/A field shape N/A 1 N/A N/A N/A self dim dsdim N/A N/A N/A IndexError Dimension of normalization params does not match DataSet field! N/A newfeat N/A ds N/A field N/A N/A self meanstd N/A N/A i N/A range dsdim N/A N/A divisor N/A N/A N/A N/A self par2 N/A i 0 N/A N/A self par2 N/A i 1.0 N/A N/A newfeat N/A N/A N/A i N/A N/A N/A newfeat N/A N/A N/A i N/A N/A self par1 N/A i divisor N/A N/A i N/A range dsdim N/A N/A scale N/A N/A isfinite N/A N/A self scale N/A i N/A N/A self scale N/A i 1.0 N/A N/A newfeat N/A N/A N/A i N/A N/A N/A N/A newfeat N/A N/A N/A i N/A N/A self par1 N/A i scale N/A self newmin N/A N/A N/A ds setField field newfeat N/A calculate N/A N/A self ds bounds field N/A N/A -1 1 input N/A N/A N/A self dim N/A N/A N/A ds N/A field shape N/A 1 N/A N/A self meanstd N/A N/A N/A self par1 N/A N/A N/A ds N/A field mean axis 0 N/A N/A self par2 N/A N/A N/A ds N/A field std axis 0 N/A N/A N/A self par1 N/A N/A N/A ds N/A field min axis 0 N/A N/A self par2 N/A N/A N/A ds N/A field max axis 0 N/A N/A self scale N/A N/A N/A bounds N/A 1 N/A bounds N/A 0 N/A N/A self par2 N/A self par1 N/A N/A self newmin N/A bounds N/A 0 N/A N/A self newmax N/A bounds N/A 1 N/A N/A