Skip to main content
. 2022 May 3;12(5):1134. doi: 10.3390/diagnostics12051134
Algorithm 2 Logistic regression Algorithm to differentiate Benign or Malignant tumor
  • 1:

    Identification: Disease

  • 2:

    Data-set: WBCD from Kaggle

  • 3:

    D ← Dataset (699 entries)

  • 4:

    Input: Training set x1,y1,,xm,ym, learning rate η>0, maximum number of iterations T, initial hyper-plane w1, initial bias b1

  • 5:

    Set w˜1=b1w1Rd+1

  • 6:

    Construct augmented training features: x˜1,,x¯m

  • 7:

    for  t=1,2,,T  do

  • 8:

       Calculate value of objective function: objt=i=11mln1+expyiw˜tx¯i

  • 9:

       Compute gradient: g˜t=i=1myi1+expx_i,x¯iRd+1

  • 10:

       Gradient descent step: w˜t+1=w˜tηgt

  • 11:

    end for

  • 12:

    return Output: Extract wT+1 and bT+1 from w¯T+1 and return them