Skip to main content
Skip table of contents

Tangent Databricks Python Package

The TangentWorks library serves as a central interface for advanced time-series forecasting, anomaly detection, and insights extraction. It simplifies complex data operations, enabling users to build models, make predictions, detect anomalies, and gain insights efficiently.

Class Overview

The TangentWorks class acts as the main entry point to the library, exposing APIs for:

  • Forecasting

  • Anomaly Detection

  • Insights

Each of these APIs comes with specialized methods to perform their respective operations.

Initialization

To start using the TangentWorks library, initialize the main class:

PY
from tangent_works import TangentWorks 
tw = TangentWorks()

This initializes the following components:

  1. forecasting: An instance of ForecastingAPI for time-series forecasting tasks.

  2. anomaly_detection: An instance of AnomalyDetectionAPI for identifying and analyzing anomalies.

  3. insights: An instance of Insights for interpreting model outputs and gaining data-driven insights.


Attributes and Methods

1. Forecasting

Provides a robust set of tools for building forecasting models, making predictions, performing root cause analysis (RCA), and automating the forecasting process.

Available Methods

  • build_model: Constructs a forecasting model using a configuration and dataset.

  • predict: Generates forecasts using a pre-built model.

  • rca: Identifies the root causes of anomalies or variations in time-series data.

  • auto_forecast: Builds a model and generates predictions in a single automated step.

Example Usage

PY
# Build a forecasting model 
model = tw.forecasting.build_model(configuration=config, dataset=data)

PY
# Generate predictions 
predictions = tw.forecasting.predict(configuration=config, dataset=data, model=model)

PY
# Perform Root Cause Analysis (RCA)
rca_results = tw.forecasting.rca(configuration=config, dataset=data, model=model)

PY
# Automate forecasting 
auto_result = tw.forecasting.auto_forecast(configuration=config, dataset=data)

2. AnomalyDetection

Facilitates the detection of anomalies in datasets through model building, anomaly detection, and root cause analysis (RCA).

Available Methods

  • build_model: Creates an anomaly detection model using a configuration and dataset.

  • detect: Identifies anomalies in a dataset with a specified model.

  • rca: Pinpoints the root causes of anomalies.

Example Usage

PY
# Build an anomaly detection model 
anomaly_model = tw.anomaly_detection.build_model(configuration=config, dataset=data) 

PY
# Detect anomalies 
anomalies = tw.anomaly_detection.detect(dataset=data, model=anomaly_model) 

PY
# Perform Root Cause Analysis (RCA) 
rca_results = tw.anomaly_detection.rca(configuration=config, dataset=data, model=anomaly_model)

3. Insights

Provides tools for extracting and interpreting variable properties and features from models.

Available Methods

  • properties: Retrieves and processes the variable properties of a given model, ranked by importance.

  • features: Extracts features used in the given model for interpretation and analysis.

Example Usage

PY
# Extract variable properties 
properties = tw.insights.properties(model=model)

PY
# Extract features 
features = tw.insights.features(model=model)

Key Benefits

  • Centralized Interface: Access all functionalities via a single class.

  • Scalability: Perform advanced operations on large-scale datasets.

  • Flexibility: Tailor configurations for specific use cases.

Dependencies

  • Ensure the following modules are properly installed:

    • pandas

    • Tangent Works library components

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.