Classification is a fundamental machine learning task where we predict discrete categories rather than continuous values. This demo explores binary classification in one dimension, comparing linear models with and without sigmoid activation.
                    In civil engineering, classification problems include failure prediction, quality assessment, safety categorization, and risk classification for structures and systems.
                    Threshold selection: While this demo uses the standard threshold of 0.5 (predict class 1 if ), in practice we often adjust this threshold based on application requirements. For safety-critical applications (e.g., structural failure detection), we might lower the threshold to  to increase sensitivity—accepting more false alarms to avoid missing critical cases. The handout discusses this practical consideration in detail.
                
                
                    • Adjust  (slope) and  (position) sliders, and toggle sigmoid activation to compare linear vs sigmoid models
                    • Click above/below y=0.5 to add class 1/0 points, or use "Generate New Data" and "Clear All Data" buttons
                    • Observe how sigmoid activation changes predictions, loss functions, and decision boundaries
                    How does the sigmoid activation change the model behavior? Which loss function is more appropriate for classification?
                
                
                    • Decision boundary: The point where the model switches between classes
                    • Sigmoid benefits: Outputs probabilities (0-1 range) and smooth transitions
                    • Linear vs sigmoid: Linear can predict outside [0,1], sigmoid cannot
                    • Accuracy: Percentage of correctly classified points (same for both modes)
                    • Cross-entropy loss: More appropriate for classification than MSE
                    • Parameter interpretation:  controls steepness,  controls position