Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

ReliabilityTools

Guides

  • Reliability Tools

Tech Notes

  • Outlier detection for financial time series

Symbols

  • AnomalyDetectionInterface
  • AnomalyFinder
  • CrowAMSAAForecast
  • GNNMonAnomalyDetection
  • GNNMonAnomalyDetector
  • GrowthTrackingPlot
  • IngestSeeqData
  • IngestXMLData
  • SimpleAnomalyDetection
AntonAntonov`ReliabilityTools`
AnomalyFinder
​
AnomalyFinder[data]
finds anomalies in
data
.
​
​
AnomalyFinder[trainingData,newData]
finds anomalies in
newData
based on observations from
trainingData
.
​
​
AnomalyFinder[trainingData,newData,props]
gives the specified properties.
​
Details and Options

Examples  
(3)
Basic Examples  
(1)
Here is a time series and its length:
In[1]:=
tsData=TimeSeries
Time:
05 Mar 2024
to
08 Mar 2024
Data points: 288
Regular: True
Output dimension: 1
Metadata: None
Minimum increment: {15,Minute}
Resampling: {Interpolation,1}
;
Here is a date list plot with a vertical grid line that marks the training and testing split date:
In[2]:=
splitDate=DateObject[{2024,3,7,12,0,0}];​​pl=DateListPlot[tsData,AspectRatio1/3,ImageSizeLarge,PlotLabel"Failures",GridLines{{splitDate},Automatic}]
Out[2]=
Here we split the data into training and testing parts:
In[3]:=
splitPos=Length@Select[tsData["Times"],#≤AbsoluteTime[splitDate]&];​​{training,testing}=TakeDrop[QuantityMagnitude[tsData["Path"]],splitPos];​​Length/@{training,testing}
Out[3]=
{173,115}
Here we get the positions of the anomalies:
In[4]:=
AnomalyFinder
[{training〚All,2〛,testing〚All,2〛},Method{Automatic,"OutlierIdentifier""Quartile"}]
In[5]:=
AnomalyFinder
[{training〚All,2〛,testing〚All,2〛},"OutlierIdentifier""Quartile"]
In[6]:=
pos=
AnomalyFinder
[{training〚All,2〛,testing〚All,2〛},"AnomalyPositions",Method{"GNNMon","NumberOfNearestNeighbors"10,"OutlierIdentifier""Quartile"}];​​Shallow[pos]
Out[6]//Shallow=
{1,2,3,4,5,6,7,8,9,10,98}
Here is a plot of the time series and the found outliers:
In[7]:=
Append[pl,Epilog{Red,PointSize[0.012],Point[testing〚pos〛]}]
Out[7]=
Options  
(2)

SeeAlso
GNNMonAnomalyDetector
RelatedGuides
▪
Reliability Tools
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com