Single Neuron

Neural Units & Activations DS practice problem on Onlearn.

Difficulty: easy.

Topics: Understanding Single Neuron, Dot Product, Sigmoid Function, Mean Squared Error, Binary Classification, Bias-Weight Summation, Linear Algebra, Calculus, Probability Theory, Optimization Theory, Computational Statistics, Vector Operations, Activation Functions, Loss Metrics, Supervised Learning, Matrix Transformations.

Write a Python function that simulates a single neuron with a sigmoid activation function for binary classification, handling multidimensional input features. The function should take a list of feature vectors (each vector representing multiple features for an example), associated true binary labels, and the neuron's weights (one for each feature) and bias as input. It should return the predicted probabilities after sigmoid activation and the mean squared error between the predicted probabilities and the true labels, both rounded to four decimal places.