Package: luminaire
A hands-off Anomaly Detection LibraryTable of contentsWhat is LuminaireQuick StartTime Series Outlier Detection WorkflowAnomaly Detection for High Frequency Time SeriesExamplesContributingCitingOther Useful ResourcesBlogsDevelopment TeamWhat is LuminaireLuminaireis a python package that provides ML-driven solutions for monitoring time series data. Luminaire provides several anomaly detection and forecasting capabilities that incorporate correlational and seasonal patterns as well as uncontrollable variations in the data over time.Quick StartInstall Luminaire fromPyPIusingpippipinstallluminaireImportluminairemodule in pythonimportluminaireSeeExamplesto get started. Also, refer to theLuminaire documentationfor detailed description of methods and usage.Time Series Outlier Detection WorkflowLuminaire outlier detection workflow can be divided into 3 major components:Data Preprocessing and Profiling ComponentThis component can be called to prepare a time series prior to training an anomaly detection model on it. This step applies a number of methods that make anomaly detection more accurate and reliable, including missing data imputation, identifying and removing recent outliers from training data, necessary mathematical transformations, and data truncation based on recent change points. It also generates profiling information (historical change points, trend changes, etc.) that are considered in the training process.Profiling information for time series data can be used to monitor data drift and irregular long-term swings.Modeling ComponentThis component performs time series model training based on the user-specified configuration OR optimized configuration (see Luminaire hyperparameter optimization). Luminaire model training is integrated with different structural time series models as well as filtering based models. SeeLuminaire outlier detectionfor more information.The Luminaire modeling step can be called after the data preprocessing and profiling step to perform necessary data preparation before training.Configuration Optimization ComponentLuminaire's integration with configuration optimization enables a hands-off anomaly detection process where
the user needs to provide very minimal configuration for monitoring any type of time series data. This step can be combined with the preprocessing and modeling for any auto-configured anomaly detection use case. Seefully automatic outlier detectionfor a detailed walkthrough.Anomaly Detection for High Frequency Time SeriesLuminaire can also monitor a set of data points over windows of time instead of tracking individual data points. This approach is well-suited for streaming use cases where sustained fluctuations are of greater concern than individual fluctuations. Seeanomaly detection for streaming datafor detailed information.ExamplesBatch Time Series Monitoringimportpandasaspdfromluminaire.optimization.hyperparameter_optimizationimportHyperparameterOptimizationfromluminaire.exploration.data_explorationimportDataExplorationdata=pd.read_csv('Path to input time series data')# Input data should have a time column set as the index column of the dataframe and a value column named as 'raw'# Optimizationhopt_obj=HyperparameterOptimization(freq='D')opt_config=hopt_obj.run(data=data)# Profilingde_obj=DataExploration(freq='D',**opt_config)training_data,pre_prc=de_obj.profile(data)# Identify Modelmodel_class_name=opt_config['LuminaireModel']module=__import__('luminaire.model',fromlist=[''])model_class=getattr(module,model_class_name)# Trainingmodel_object=model_class(hyper_params=opt_config,freq='D')success,model_date,trained_model=model_object.train(data=training_data,**pre_prc)# Scoringtrained_model.score(100,'2021-01-01')Streaming Time Series Monitoringimportpandasaspdfromluminaire.model.window_densityimportWindowDensityHyperParams,WindowDensityModelfromluminaire.exploration.data_explorationimportDataExplorationdata=pd.read_csv('Path to input time series data')# Input data should have a time column set as the index column of the dataframe and a value column named as 'raw'# Configuration Specs and Profilingconfig=WindowDensityHyperParams().paramsde_obj=DataExploration(**config)data,pre_prc=de_obj.stream_profile(df=data)config.update(pre_prc)# Trainingwdm_obj=WindowDensityModel(hyper_params=config)success,training_end,model=wdm_obj.train(data=data)# Scoringscore,scored_window=model.score(scoring_data)# scoring_data is data over a time-window instead of a datapointContributingWant to help improve Luminaire? Check out ourcontributing documentation.CitingPlease cite the following article if Luminaire is used for any research purpose or scientific publication:Chakraborty, S., Shah, S., Soltani, K., Swigart, A., Yang, L., & Buckingham, K. (2020, December). Building an
Automated and Self-Aware Anomaly Detection System. In 2020 IEEE International Conference on Big Data (Big Data)
(pp. 1465-1475). IEEE.(arxiv link)Other Useful ResourcesChakraborty, S., Shah, S., Soltani, K., & Swigart, A. (2019, December). Root Cause Detection Among Anomalous Time
Series Using Temporal State Alignment. In 2019 18th IEEE International Conference On Machine Learning And Applications
(ICMLA) (pp. 523-528). IEEE.(arxiv link)BlogsZillow Tech Hub:Automatic and Self-aware Anomaly Detection at Zillow Using LuminaireDevelopment TeamLuminaire is developed and maintained bySayan Chakraborty,Smit Shah,Kiumars Soltani,Luyao Yang,Anna Swigart,Kyle Buckinghamand many other contributors from the Zillow Group A.I. team.