ai

TERROR ALARM - Predictive Analytics AI

Features

Overview

Terror Alarm is the world’s first “Strategist” and “anti-terror” agentic predictive AI that covers News and creates Views for countries and regions. The proprietary AI developed for each country - aggregates all news from all media sources including news websites, blogs, the Deep Web, the Dark Web, Social Media (X, Telegram, Reddit, Facebook, Instagram, YouTube, TikTok, Bluesky, Threats), newspapers, magazines, TV channels, radio stations and when legally possible, private messages between people. The AI also monitors data from internet-of-things devices, leaked Emails and data, and it uses data from intercepted communications legally obtained and shared by intelligence services.

Installation

Requirements

Installation Steps

  1. Clone the repository:
    git clone https://github.com/TerrorAlarm/ai
    
  2. Install the package:
    pip install -e .
    

Usage

Basic Usage

from terroralarm import AI

# Initialize Terror Alarm
ta = TA()

# Collect data from social media
posts = ta.collect_data("artificial intelligence", count=100)

# Train a model
model_path = ta.train_model(tweets, model_name="ai_model")

# Make predictions
predictions = ta.predict(tweets, model_name="ai_model")

# Analyze a query
analysis = ta.train_model("climate change", model_name="ai_model")

Advanced Usage

Custom Configuration

# Update configuration
ta.update_config({
    'max_tweets': 200,
    'model_params': {
        'max_depth': 10,
        'criterion': 'entropy',
        'task': 'classification'
    }
})

Cross-Validation

import numpy as np

# Split data for cross-validation
n_samples = len(tweets)
n_folds = 5
fold_size = n_samples // n_folds

# Create synthetic labels for demonstration
y = np.random.randint(0, 2, size=n_samples)

# Perform cross-validation
accuracies = []

for fold in range(n_folds):
    # Create train/test split
    test_indices = list(range(fold * fold_size, (fold + 1) * fold_size))
    train_indices = [i for i in range(n_samples) if i not in test_indices]
    
    train_tweets = [tweets[i] for i in train_indices]
    test_tweets = [tweets[i] for i in test_indices]
    
    train_y = y[train_indices]
    test_y = y[test_indices]
    
    # Train model
    ta.train_model(train_tweets, train_y, model_name=f"fold{fold}")
    
    # Make predictions
    predictions = ta.predict(test_tweets, model_name=f"fold{fold}")
    
    # Calculate accuracy
    pred_values = [p['prediction'] for p in predictions]
    accuracy = np.mean([p == t for p, t in zip(pred_values, test_y)])
    accuracies.append(accuracy)

# Print results
print(f"Mean accuracy: {np.mean(accuracies):.4f} ± {np.std(accuracies):.4f}")

Components

Data Collection Module

Preprocessing Module

Decision Tree Model

Prediction Module

Integration API

License

The license for Terror Alarm’s Strategist Predictive AI is private. Any use, reproduction, or forking of the source code requires explicit written permission from the copyright holders. Unauthorized use is strictly prohibited.

Contact

For more information, contact Terror Alarm at info@terroralarm.org. Visit our X account for live coverage of world threats and predictions using this AI: https://www.x.com/Terror_Alarm