How to exactly use the filter function in DeepLabCut?

----> 1 deeplabcut.filterpredictions(’/scratch3/3d_pose/animalpose/mouse/mouse-mona-2019-11-13’,’/scratch3/3d_pose/animalpose/mouse/mouse-mona-2019-11-13/videos’, videotype=’.mp4’,filtertype= ‘arima’,ARdegree=5,MAdegree=2)

/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deeplabcut/post_processing/filtering.py in filterpredictions(config, video, videotype, shuffle, trainingsetindex, filtertype, windowlength, p_bound, ARdegree, MAdegree, alpha, save_as_csv, destfolder)
92 Returns filtered pandas array with the same structure as normal output of network.
93 “”"
—> 94 cfg = auxiliaryfunctions.read_config(config)
95 DLCscorer,DLCscorerlegacy=auxiliaryfunctions.GetScorerName(cfg,shuffle,trainFraction = cfg[‘TrainingFraction’][trainingsetindex])
96 Videos=auxiliaryfunctions.Getlistofvideos(video,videotype)

/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deeplabcut/utils/auxiliaryfunctions.py in read_config(configname)
117 cfg = ruamelFile.load(f)
118 except Exception as err:
–> 119 if err.args[2] == “could not determine a constructor for the tag ‘!!python/tuple’”:
120 with open(path, ‘r’) as ymlfile:
121 cfg = yaml.load(ymlfile,Loader=yaml.SafeLoader)

IndexError: tuple index out of range

is this correct? it doesn’t output anything:
In [8]: deeplabcut.filterpredictions(’/scratch3/3d_pose/animalpose/mouse/mouse-mona-2019-11-13/config.yaml’,’/scratch3/3d_pose/animalpose/mouse/mouse-mona-2019-11-13/videos/m3v1mp4.mp4’, videotype=’.mp4’,filtert
…: ype= ‘arima’,ARdegree=5,MAdegree=2)

In [9]: print(deeplabcut.version)
2.1.1

this is incorrect. The first argument is for the config.yaml file path. and video needs brackets:

ie:

deeplabcut.filterpredictions(’/scratch3/3d_pose/animalpose/mouse/mouse-mona-2019-11-13/config.yaml’,[’/scratch3/3d_pose/animalpose/mouse/mouse-mona-2019-11-13/videos’], videotype=’.mp4’,filtertype= ‘arima’,ARdegree=5,MAdegree=2)

Here is the docstring: https://github.com/AlexEMG/DeepLabCut/wiki/DOCSTRINGS#filterpredictions

which has examples:

deeplabcut.filterpredictions(r'C:\myproject\reaching-task\config.yaml',[r'C:\myproject\trailtracking-task\test.mp4'],shuffle=3,filterype='arima',ARdegree=5,MAdegree=2)