OptimAIze Analysis
AI-powered analysis to identify impossible demographic combinations and optimize your synthetic panel
isLoggedIn()) { redirectTo('login.php'); } $currentUser = $auth->getCurrentUser(); $db = Database::getInstance(); // Get current analysis state $stateQuery = $db->query("SELECT * FROM optimization_analysis_state ORDER BY id DESC LIMIT 1"); $analysisState = $stateQuery ? $stateQuery->fetch_assoc() : null; // Get analysis statistics $stats = [ 'total' => 0, 'processed' => 0, 'possible' => 0, 'impossible' => 0, 'pending' => 0 ]; $totalQuery = $db->query("SELECT COUNT(*) as count FROM panel_directives"); $stats['total'] = $totalQuery ? $totalQuery->fetch_assoc()['count'] : 0; $processedQuery = $db->query("SELECT COUNT(*) as count FROM panel_directives WHERE llm_checked = 1"); $stats['processed'] = $processedQuery ? $processedQuery->fetch_assoc()['count'] : 0; $possibleQuery = $db->query("SELECT COUNT(*) as count FROM panel_directives WHERE llm_checked = 1 AND is_impossible = 0"); $stats['possible'] = $possibleQuery ? $possibleQuery->fetch_assoc()['count'] : 0; $impossibleQuery = $db->query("SELECT COUNT(*) as count FROM panel_directives WHERE llm_checked = 1 AND is_impossible = 1"); $stats['impossible'] = $impossibleQuery ? $impossibleQuery->fetch_assoc()['count'] : 0; $stats['pending'] = $stats['total'] - $stats['processed']; // Calculate progress percentage $progress = $stats['total'] > 0 ? ($stats['processed'] / $stats['total']) * 100 : 0; ?>
AI-powered analysis to identify impossible demographic combinations and optimize your synthetic panel