What is the meaning of the variables in the C generated code of a Linear Discriminant Analysis model trained in MATLAB?
I have trained a Linear Discriminant Analysis model in MATLAB, and I have generated the corresponding C code:
void myLDApredic(const double X[8], cell_wrap_0 label[1],double score[5])
{
static const double dv[8] = {22.242777113313874, 10091.972043688236,
18.120065167575063, 1.6703515441084688E+6,
24.467860977243351, 10578.886659888578,
19.515843697095619, 1.9037831242647208E+6};
static const double dv1[5] = {0.19444444444444445, 0.19791666666666666,
0.20254629629629631, 0.18865740740740741,
0.21643518518518517};
// rest of function body…
}
void DiagonalDiscriminant(const double X[8], double mah[5])
{
static const double dv[40] = {
92.058756510416757, 428.55436769005888, 99.445223214285761,
121.16319976993877, 28.000396891711258, 12736.000000000013,
81355.60233918138, 19612.525714285723, 16993.374233128856,
3436.1497326203244, 143.11044456845252, 72.791255482456208,
144.52926339285719, 196.37662960122714, 29.916151403743349,
5.2292266666666726E+6, 3.3097596257309979E+6, 7.8175085714285746E+6,
7.0232076564417249E+6, 894724.10695187247, 480.39411272321479,
26.045367324561425, 53.19522321428574, 239.98229006901863,
20.971883355614992, 80371.8095238096, 2976.1871345029267,
8478.720000000003, 52414.036809816, 2602.4385026737991,
325.64160156250028, 34.383543494152079, 84.338125000000034,
72.35264091257676, 33.127548462566885, 1.6916089904761918E+7,
1.5491024093567266E+6, 3.7583959771428583E+6, 4.3856852024539923E+6,
1.6065081497326223E+6};
static const double dv1[8] = {0.044958414810596169, 9.9088661331104676E-5,
0.0551874394905295, 5.9867637056829179E-7,
0.040869939588510124, 9.4527905643572937E-5,
0.051240418580971815, 5.2526991507303129E-7};
// rest of function body…
}
What is the meaning of the variables "dv", "dv1" of files "myLDApredict" and "DiagonalDiscriminant"?I have trained a Linear Discriminant Analysis model in MATLAB, and I have generated the corresponding C code:
void myLDApredic(const double X[8], cell_wrap_0 label[1],double score[5])
{
static const double dv[8] = {22.242777113313874, 10091.972043688236,
18.120065167575063, 1.6703515441084688E+6,
24.467860977243351, 10578.886659888578,
19.515843697095619, 1.9037831242647208E+6};
static const double dv1[5] = {0.19444444444444445, 0.19791666666666666,
0.20254629629629631, 0.18865740740740741,
0.21643518518518517};
// rest of function body…
}
void DiagonalDiscriminant(const double X[8], double mah[5])
{
static const double dv[40] = {
92.058756510416757, 428.55436769005888, 99.445223214285761,
121.16319976993877, 28.000396891711258, 12736.000000000013,
81355.60233918138, 19612.525714285723, 16993.374233128856,
3436.1497326203244, 143.11044456845252, 72.791255482456208,
144.52926339285719, 196.37662960122714, 29.916151403743349,
5.2292266666666726E+6, 3.3097596257309979E+6, 7.8175085714285746E+6,
7.0232076564417249E+6, 894724.10695187247, 480.39411272321479,
26.045367324561425, 53.19522321428574, 239.98229006901863,
20.971883355614992, 80371.8095238096, 2976.1871345029267,
8478.720000000003, 52414.036809816, 2602.4385026737991,
325.64160156250028, 34.383543494152079, 84.338125000000034,
72.35264091257676, 33.127548462566885, 1.6916089904761918E+7,
1.5491024093567266E+6, 3.7583959771428583E+6, 4.3856852024539923E+6,
1.6065081497326223E+6};
static const double dv1[8] = {0.044958414810596169, 9.9088661331104676E-5,
0.0551874394905295, 5.9867637056829179E-7,
0.040869939588510124, 9.4527905643572937E-5,
0.051240418580971815, 5.2526991507303129E-7};
// rest of function body…
}
What is the meaning of the variables "dv", "dv1" of files "myLDApredict" and "DiagonalDiscriminant"? I have trained a Linear Discriminant Analysis model in MATLAB, and I have generated the corresponding C code:
void myLDApredic(const double X[8], cell_wrap_0 label[1],double score[5])
{
static const double dv[8] = {22.242777113313874, 10091.972043688236,
18.120065167575063, 1.6703515441084688E+6,
24.467860977243351, 10578.886659888578,
19.515843697095619, 1.9037831242647208E+6};
static const double dv1[5] = {0.19444444444444445, 0.19791666666666666,
0.20254629629629631, 0.18865740740740741,
0.21643518518518517};
// rest of function body…
}
void DiagonalDiscriminant(const double X[8], double mah[5])
{
static const double dv[40] = {
92.058756510416757, 428.55436769005888, 99.445223214285761,
121.16319976993877, 28.000396891711258, 12736.000000000013,
81355.60233918138, 19612.525714285723, 16993.374233128856,
3436.1497326203244, 143.11044456845252, 72.791255482456208,
144.52926339285719, 196.37662960122714, 29.916151403743349,
5.2292266666666726E+6, 3.3097596257309979E+6, 7.8175085714285746E+6,
7.0232076564417249E+6, 894724.10695187247, 480.39411272321479,
26.045367324561425, 53.19522321428574, 239.98229006901863,
20.971883355614992, 80371.8095238096, 2976.1871345029267,
8478.720000000003, 52414.036809816, 2602.4385026737991,
325.64160156250028, 34.383543494152079, 84.338125000000034,
72.35264091257676, 33.127548462566885, 1.6916089904761918E+7,
1.5491024093567266E+6, 3.7583959771428583E+6, 4.3856852024539923E+6,
1.6065081497326223E+6};
static const double dv1[8] = {0.044958414810596169, 9.9088661331104676E-5,
0.0551874394905295, 5.9867637056829179E-7,
0.040869939588510124, 9.4527905643572937E-5,
0.051240418580971815, 5.2526991507303129E-7};
// rest of function body…
}
What is the meaning of the variables "dv", "dv1" of files "myLDApredict" and "DiagonalDiscriminant"? c, code, lineardiscriminantanalysis, variables, meaning MATLAB Answers — New Questions