<s> import numpy as np <EOL> import orthAE as ae <EOL> import scipy as sp <EOL> t = np . arange ( - <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT> ) <EOL> x = np . sin ( <NUM_LIT:2> * np . pi * t ) <EOL> x_noise = <NUM_LIT> * np . sin ( <NUM_LIT> * np . pi * t ) <EOL> z1 = np . cos ( np . pi * np . pi * t ) <EOL> z2 = np . cos ( <NUM_LIT:5> * np . pi * t ) <EOL> m1 = np . vstack ( ( x , z1 ) ) ; <EOL> m2 = np . vstack ( ( x , z2 ) ) ; <EOL> m1 = np . dot ( np . random . rand ( <NUM_LIT:20> , <NUM_LIT:2> ) , m1 ) <EOL> m2 = np . dot ( np . random . rand ( <NUM_LIT:20> , <NUM_LIT:2> ) , m2 ) <EOL> m1 = m1 + np . random . randn ( * m1 . shape ) * <NUM_LIT> ; <EOL> m2 = m2 + np . random . randn ( * m2 . shape ) * <NUM_LIT> ; <EOL> m1 = np . vstack ( ( m1 , x_noise ) ) <EOL> m2 = np . vstack ( ( m2 , x_noise ) ) <EOL> m1 = m1 - np . mean ( m1 , axis = <NUM_LIT:0> ) <EOL> m2 = m2 - np . mean ( m2 , axis = <NUM_LIT:0> ) <EOL> x2 = np . concatenate ( ( m1 , m2 , ) ) <EOL> print ( '<STR_LIT>' ) <EOL> obj2 = ae . OrthdAE ( np . array ( [ <NUM_LIT> , <NUM_LIT> ] ) , np . array ( [ <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ] ) , x2 ) <EOL> new_weights = obj2 . tune ( ) <EOL> print ( '<STR_LIT>' ) <EOL> import scipy as sp <EOL> import scipy . io <EOL> obj2 . weightSplit ( new_weights ) <EOL> obj2 . x = x2 <EOL> obj2 . feedforward ( ) <EOL> sp . io . savemat ( '<STR_LIT>' , mdict = { '<STR_LIT:y>' : obj2 . h , '<STR_LIT:t>' : t } ) </s>
