 Container ai-scientist-python-workspace  Created
 Container ai-scientist-latex-compiler-1  Running
 Container ai-scientist-semantic-scholar-mcp-1  Running
Attaching to latex-compiler-1, ai-scientist-python-workspace, semantic-scholar-mcp-1
ai-scientist-python-workspace  | 2025-09-12 14:41:27,919 - WARNING - sklearn not available. Some baseline methods will be disabled.
ai-scientist-python-workspace  | 2025-09-12 14:41:27,977 - WARNING - sklearn not available. Using custom metric implementations.
ai-scientist-python-workspace  | 2025-09-12 14:41:28,139 - INFO - ================================================================================
ai-scientist-python-workspace  | 2025-09-12 14:41:28,139 - INFO - ENHANCED PHISHING EMAIL DETECTION EXPERIMENT
ai-scientist-python-workspace  | 2025-09-12 14:41:28,139 - INFO - ================================================================================
ai-scientist-python-workspace  | 2025-09-12 14:41:28,139 - INFO - 
ai-scientist-python-workspace  | [Step 1/5] Loading and preparing datasets...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,139 - INFO - Downloading and preparing real phishing datasets...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,140 - INFO - Generating comprehensive synthetic phishing dataset...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,143 - INFO - Note: Real dataset downloads require authentication or manual download
ai-scientist-python-workspace  | 2025-09-12 14:41:28,143 - INFO - Using enhanced synthetic data for demonstration
ai-scientist-python-workspace  | 2025-09-12 14:41:28,143 - INFO - Balanced dataset: 1002 total (501 phishing, 501 legitimate)
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - INFO - Total emails collected: 1002
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - INFO - Dataset statistics:
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - INFO -   Training samples: 701
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - INFO -   Validation samples: 150
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - INFO -   Test samples: 151
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - INFO - 
ai-scientist-python-workspace  | [Step 2/5] Initializing baseline methods...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,148 - WARNING - TF-IDF + SVM not available due to missing sklearn
ai-scientist-python-workspace  | 2025-09-12 14:41:28,149 - INFO - 
ai-scientist-python-workspace  | [Step 3/5] Initializing detection methods...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,149 - INFO -   - Original hybrid detector...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,149 - WARNING - Could not connect to Ollama: [Errno 2] No such file or directory: 'ollama'. Using rule-based only.
ai-scientist-python-workspace  | 2025-09-12 14:41:28,149 - INFO -   - Improved hybrid detector with Docker support...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,174 - INFO - Connected to Ollama at http://host.docker.internal:11434
ai-scientist-python-workspace  | 2025-09-12 14:41:28,174 - INFO -   - Enhanced multi-feature detector...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,174 - INFO - 
ai-scientist-python-workspace  | [Step 4/5] Running evaluations...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,174 - INFO - 
ai-scientist-python-workspace  | Evaluating all detection methods:
ai-scientist-python-workspace  | 2025-09-12 14:41:28,175 - INFO - 
ai-scientist-python-workspace  |   Testing Rule-based...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Accuracy: 1.000
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Precision: 1.000
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Recall: 1.000
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     F1-Score: 1.000
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Time: 0.00s
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO - 
ai-scientist-python-workspace  |   Testing TF-IDF + SVM...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Accuracy: 0.523
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Precision: 0.586
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Recall: 0.488
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     F1-Score: 0.532
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO -     Time: 0.00s
ai-scientist-python-workspace  | 2025-09-12 14:41:28,177 - INFO - 
ai-scientist-python-workspace  |   Testing Regex Pattern...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO -     Accuracy: 0.762
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO -     Precision: 1.000
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO -     Recall: 0.571
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO -     F1-Score: 0.727
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO -     Time: 0.01s
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO - 
ai-scientist-python-workspace  |   Testing Original Hybrid...
ai-scientist-python-workspace  | 2025-09-12 14:41:28,188 - INFO - Training hybrid detector...
ai-scientist-python-workspace  | 2025-09-12 14:41:29,150 - INFO - Optimized weights: {'llm_score': 0.1, 'rule_score': 0.1, 'url_analysis': 0.5, 'sender_analysis': 0.30000000000000004}
ai-scientist-python-workspace  | 2025-09-12 14:41:29,160 - INFO - Hybrid detector training complete
ai-scientist-python-workspace  | 2025-09-12 14:41:29,171 - INFO -     Accuracy: 0.821
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO -     Precision: 1.000
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO -     Recall: 0.679
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO -     F1-Score: 0.809
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO -     Time: 0.98s
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO - 
ai-scientist-python-workspace  |   Testing Improved Hybrid LLM...
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO - Training improved hybrid detector...
ai-scientist-python-workspace  | 2025-09-12 14:41:29,172 - INFO - Optimizing detection weights...
ai-scientist-python-workspace  | 2025-09-12 14:41:44,207 - WARNING - LLM API error: HTTPConnectionPool(host='host.docker.internal', port=11434): Read timed out. (read timeout=15)
ai-scientist-python-workspace  | 2025-09-12 14:43:58,090 - WARNING - LLM API error: HTTPConnectionPool(host='host.docker.internal', port=11434): Read timed out. (read timeout=15)
