Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain the convex curve for weights vs loss in a neural network [closed]

In most of the literature of Neural networks the 3D plot of weights, bias and the loss function is shown as below, enter image description here When I tried I obtained a plot like this one enter image description here

Here are more details, Here is the glimpse of the dataset, there are 15,000 training examples, enter image description here

Here is the formula of the cost function used, enter image description here

enter image description here

Here is the link to the ipython notebook with the code and visualization.

I want to obtain the curve similar to the one that's shown in the first image for demonstration purpose.

like image 647
Karthic Rao Avatar asked Jan 23 '18 11:01

Karthic Rao


1 Answers

To obtain the convex curve, do the following:

Plot coefficient w (weights) in your x axis Plot intercept b in your y axis Plot the cross entropy in your z axis.

Define a range for w and b and calculate cross entropy for each couple w, b

Plot x,y,z values in 3D. It's done.

like image 182
razimbres Avatar answered Oct 23 '22 17:10

razimbres