def pumadyn(seed=default_seed, data_set='<STR_LIT>'):
if not data_available(data_set):<EOL><INDENT>import tarfile<EOL>download_data(data_set)<EOL>path = os.path.join(data_path, data_set)<EOL>tar = tarfile.open(os.path.join(path, '<STR_LIT>'))<EOL>print('<STR_LIT>')<EOL>tar.extractall(path=path)<EOL>tar.close()<EOL><DEDENT>data = np.loadtxt(os.path.join(data_path, data_set, '<STR_LIT>', '<STR_LIT>'))<EOL>indices = permute(data.shape[<NUM_LIT:0>])<EOL>indicesTrain = indices[<NUM_LIT:0>:<NUM_LIT>]<EOL>indicesTest = indices[<NUM_LIT>:-<NUM_LIT:1>]<EOL>indicesTrain.sort(axis=<NUM_LIT:0>)<EOL>indicesTest.sort(axis=<NUM_LIT:0>)<EOL>X = data[indicesTrain, <NUM_LIT:0>:-<NUM_LIT:2>]<EOL>Y = data[indicesTrain, -<NUM_LIT:1>][:, None]<EOL>Xtest = data[indicesTest, <NUM_LIT:0>:-<NUM_LIT:2>]<EOL>Ytest = data[indicesTest, -<NUM_LIT:1>][:, None]<EOL>return data_details_return({'<STR_LIT:X>': X, '<STR_LIT:Y>': Y, '<STR_LIT>': Xtest, '<STR_LIT>': Ytest, '<STR_LIT>': seed}, data_set)<EOL>
Data from a simulation of the Puma robotic arm generated by Zoubin Ghahramani.