<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I obtain the BIC and AIC form -log likelihood for neural network ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37355#M21919</link>
    <description>Dear David,&lt;BR /&gt;&lt;BR /&gt;It is good for me. I will wait Monday.&lt;BR /&gt;&lt;BR /&gt;Thank you so much,&lt;BR /&gt;Angelo&lt;BR /&gt;</description>
    <pubDate>Sat, 18 Mar 2017 17:51:02 GMT</pubDate>
    <dc:creator>AngeloF88</dc:creator>
    <dc:date>2017-03-18T17:51:02Z</dc:date>
    <item>
      <title>How can I obtain the BIC and AIC form -log likelihood for neural network ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37318#M21892</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the JMP pro 12. &amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know,&amp;nbsp;how can I obtain the AIC or the BIC from -likelihood, in neural network analysis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 01:22:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37318#M21892</guid>
      <dc:creator>AngeloF88</dc:creator>
      <dc:date>2017-03-17T01:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I obtain the BIC and AIC form -log likelihood for neural network ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37335#M21905</link>
      <description>&lt;P&gt;I have some code that I can share with you to do this - unfortunately I'm travelling at the moment - if you don't get a reply from someone else I'll be able to post it on Monday.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 15:24:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37335#M21905</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2017-03-17T15:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I obtain the BIC and AIC form -log likelihood for neural network ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37355#M21919</link>
      <description>Dear David,&lt;BR /&gt;&lt;BR /&gt;It is good for me. I will wait Monday.&lt;BR /&gt;&lt;BR /&gt;Thank you so much,&lt;BR /&gt;Angelo&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Mar 2017 17:51:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37355#M21919</guid>
      <dc:creator>AngeloF88</dc:creator>
      <dc:date>2017-03-18T17:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I obtain the BIC and AIC form -log likelihood for neural network ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37372#M21932</link>
      <description>&lt;P&gt;Sorry I was pretty sure I'd done it for neural nets, but it was actually for the nonlinear platform. &amp;nbsp;Here's the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dt = Open("$SAMPLE_DATA/Nonlinear Examples/Chemical Kinetics.jmp");
fit = dt &amp;lt;&amp;lt; Nonlinear( 
	Y( :Name( "Velocity (y)" ) ), 
		X( :Name( "Model (x)" ) ), 
		Newton, 
		Finish			
);
rep = fit &amp;lt;&amp;lt; Report;
matRmse = rep[NumberColBox(5)] &amp;lt;&amp;lt; Get As Matrix;


/***************************************************
/          calculate AICc                          /
***************************************************/

	// AIC = N.ln(SS/N) + 2k
	// where N = # data points
	// 		k = # parameters + 1
	//		SS = sum of squares for the residuals
	
	// AICc = AIC + [ 2k(k+1) / (N-k-1) ]
	

N = NRows(dt);
nParameters = 2;
k = nParameters + 1;
rmse = matRmse[1];
dfSS = N - nParameters;
MS = rmse^2;
SS = dfSS * MS; // this is correct compared to fit model
LL = N*Log(2*Pi()*e()*SS/N);
AIC = LL + 2*k;
AICc = AIC + ( (2*k*(k+1))/(N-k-1) );

/***************************************************
/          calculate BIC                           /
***************************************************/
BIC = LL + k*Log(N);
&lt;/PRE&gt;
&lt;P&gt;In this code I had to determine the log-likelihood value whereas the neural net gives you this so it should be easier. &amp;nbsp;I think you just need to think about what is the value of k. &amp;nbsp;I assume it would be 1 plus the number of weights that are being estimated (for a single layer network that would be #factors x #nodes);&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 22:39:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/37372#M21932</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2017-03-20T22:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I obtain the BIC and AIC form -log likelihood for neural network ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/241455#M47699</link>
      <description>&lt;P&gt;Is there a way to get k just from a fast column formula for a neural?&amp;nbsp;Or do I have to know how the model was created? For instance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
dt = open("$SAMPLE_DATA/Boston Housing.jmp");
nn = dt &amp;lt;&amp;lt; Neural(
	Y( :mvalue ),
	X(
		:crim,
		:zn,
		:indus,
		:chas,
		:nox,
		:rooms,
		:age,
		:distance,
		:radial,
		:tax,
		:pt,
		:b,
		:lstat
	),
	Informative Missing( 0 ),
	Validation Method( "Holdback", 0.3333 ),
	Fit( NTanH( 3 ), NLinear( 2 ), NLinear2( 1 ), NGaussian2( 1 ) )
);

nn &amp;lt;&amp;lt; (Fit[1] &amp;lt;&amp;lt; Save Fast Formulas);
pred = Column(dt, ncols(dt));
pred &amp;lt;&amp;lt; Get Formula();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Returns:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;T#1 = Matrix(
	{{:crim, :zn, :indus, Design Nom( :chas, [0 1], &amp;lt;&amp;lt;Else Missing ), :nox, :rooms,
	:age, :distance, :radial, :tax, :pt, :b, :lstat, [1]}}
);
T#2 = Matrix(
	{{T#1 * [0.0255351134390746, -0.0182659064376583, -0.0133657385920784,
	0.147341979132032, 4.23887426583154, -0.4759713227295, -0.00456605888120198,
	0.26468295131318, -0.0848679297282956, 0.00131989077607407, 0.179512094612108,
	0.000822977008301723, 0.19096622684487, -6.88253368570889],
	Exp(
		-(0.5 * (T#1 * [-0.0381871935060958, -0.0555904841384534,
		-0.0411067081795327, -0.0895161828161914, -1.57902743275984,
		-0.411055020789087, 0.0078474002018379, 0.0101959901834069,
		-0.0847563310399709, 0.00315505316787576, -0.120404341355212,
		-0.011567453308019, -0.0508784652936048, 10.3295713240773]) ^ 2)
	), 1}}
);
T#3 = Matrix(
	{{TanH( 0.5 * T#2 * [0.35672808282841, -0.17630023981386, 0.271293314269094] ),
	TanH( 0.5 * T#2 * [-0.622667700216216, 0.120210664201856, 0.530160002865065] ),
	TanH( 0.5 * T#2 * [0.841925648920495, 0.63556140976371, -0.0364323446544486] ),
	T#2 * [-0.329754708259113, 0.052504565555951, 0.050660282817552], T#2 * [
	-1.44800816791098, 1.36833970880568, 0.980670022307775], 1}}
);
T#3 * [-5.78972326240828, -30.0242107869451, -2.5668761531561, 0.482110229175916,
5.9163758026328, 14.9646328172308];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 22:44:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-obtain-the-BIC-and-AIC-form-log-likelihood-for-neural/m-p/241455#M47699</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-01-15T22:44:30Z</dc:date>
    </item>
  </channel>
</rss>

