We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parentsa442663 +d3cddaf commit9c3282bCopy full SHA for 9c3282b
LogisticRegression/LogisticRegression.cpp
@@ -22,7 +22,7 @@ std::tuple<Eigen::MatrixXd, double, double> LogisticRegression::Propagate(Eigen:
22
23
double cost =static_cast<constdouble>((cross_entropy.array()[0])) + l2_reg_cost;
24
25
- Eigen::MatrixXd dw = (Eigen::MatrixXd)(((Eigen::MatrixXd)(clearA-y.transpose()) * X)/m) + ((Eigen::MatrixXd)(lambda/m*W)).transpose();
+ Eigen::MatrixXd dw = (Eigen::MatrixXd)(((Eigen::MatrixXd)(A-y.transpose()) * X)/m) + ((Eigen::MatrixXd)(lambda/m*W)).transpose();
26
27
double db = (A-y.transpose()).array().sum()/m;
28
@@ -73,4 +73,4 @@ Eigen::MatrixXd LogisticRegression::Predict(Eigen::MatrixXd W, double b, Eigen::
73
}
74
75
return y_pred.transpose();
76
-}
+}