Skip to Content

Analysis Endpoints and Logic

This page details the technical parts of our math and AI engine.


Math API Controllers (ViewSets)

Analysis Runner (AnalysisViewSet)

This is the main entry point for all math tasks.

  • run: This routes data to the right math processor (like SWOT or Cluster analysis).
  • chat: This is the gateway for the AI chat sidebar. It combines the math results with the AI prompt.
  • export_pptx: Sends the data to the engine that creates PowerPoint files.

Drill-Down Explorer (DrillDownViewSet)

Used for deep-diving into specific data segments.

  • query: Runs a deep math check on a specific group of data to find patterns.

Internal Math Functions (processors.py)

These are the Python functions that do the hard work.

  • Isolation Forest Outliers: Finds the “weirdest” 5% of your data rows automatically.
  • AI Insight Clusters: Groups your data into themes (clusters) and then asks the AI to name them.
  • Sentiment Polarity: Decides if a piece of text is positive, negative, or neutral.

Data Storage

The AnalysisResult Model

This is where we save the results of every heavy math task.

  • Why?: We save the results so that if two users look at the same thing, the server doesn’t have to do the math twice.

Last updated on