You are analyzing a dataset of N=100 protein-protein interaction (PPI) samples. Each interaction is represented by 3 numerical features: X=[X(1),X(2),X(3)], where X(1),X(2),X(3)∈R. The binary target variable y represents whether an interaction occurs (y=1) or not (y=0).
You aim to train a logistic regression model with L2 regularization (ridge regression) to predict interactions based on these features. The regularized cost function, J(θ), is defined as:
J(θ)=J′(θ)+λ∑i=13θi2
where, J′(θ) is the cross entropy loss as seen in lecture videos.
J(θ) penalizes large weights to avoid overfitting using the following settings:
- Regularization strength λ=0.1
- Initial parameters: θ0=0.5, θ1=−0.5, θ2=0.3, θ3=−0.2
- Learning rate: α=0.01
Compute the regularized cost function J(θ), for a single protein interaction sample xuv=[2,3,1] with target yuv=1.
Note: Use λ/2m as the constant in regularization term of the cost function, where m is the batch size.