1
$\begingroup$

I have an outlier detection code snippet in R which I need to convert into python. Folloing is the code snippet-

tso(ts(monVolumes[[repli]]$vol[which(!is.na(monVolumes[[repli]]$vol))]/10^9,frequency=1), tsmethod ="arima",types = c("LS","TC","IO","AO") ,maxit.iloop = 50, maxit.oloop = 50)), error=function(e) TRUE, finally = FALSE)

So I know that there are various packages in python which can be used for outlier detection such as PyOD, alibi-detect etc. However, I am very much a beginner and dont quite understand the maths used in these packages. Is there any equivalent package in python that can do the job for me and whose paramters and structure resemble the tso function of the forecast package in R as much as possible.

What I have tried till now- I tried to install the python port of tsoutliers package but it is not available on PyPI (Python Package Index) and it throws up errors whenever I try to install it any other way.

NOTE- I know how ARIMA modeling works but I have no clue what maxit.iloop and maxit.oloop does in the above snippet.

$\endgroup$

0

Browse other questions tagged or ask your own question.