s="dv">1</span> -<span class="st"> </span>y_i) *<span class="st"> </span><span class="kw">log</span>(<span class="dv">1</span> -<span class="st"> </span>pihat_ij))
        logLoss[iter] =<span class="st"> </span>logLoss[iter] +<span class="st"> </span><span class="dv">1</span> /<span class="st"> </span><span class="kw">length</span>(yTest) *<span class="st"> </span>LogPred_curr
    }
}
<span class="kw">library</span>(ggplot2)
plotFrame =<span class="st"> </span><span class="kw">data.frame</span>(<span class