Merge pull request #6345 from eduardohenriquearnold:master
This commit is contained in:
commit
8f6e102331
@ -2093,7 +2093,7 @@ public:
|
|||||||
<< "alpha" << "[:";
|
<< "alpha" << "[:";
|
||||||
fs.writeRaw("d", (const uchar*)&df_alpha[df.ofs], sv_count*sizeof(df_alpha[0]));
|
fs.writeRaw("d", (const uchar*)&df_alpha[df.ofs], sv_count*sizeof(df_alpha[0]));
|
||||||
fs << "]";
|
fs << "]";
|
||||||
if( class_count > 2 )
|
if( class_count >= 2 )
|
||||||
{
|
{
|
||||||
fs << "index" << "[:";
|
fs << "index" << "[:";
|
||||||
fs.writeRaw("i", (const uchar*)&df_index[df.ofs], sv_count*sizeof(df_index[0]));
|
fs.writeRaw("i", (const uchar*)&df_index[df.ofs], sv_count*sizeof(df_index[0]));
|
||||||
@ -2235,11 +2235,11 @@ public:
|
|||||||
df_index.resize(ofs + sv_count);
|
df_index.resize(ofs + sv_count);
|
||||||
df_alpha.resize(ofs + sv_count);
|
df_alpha.resize(ofs + sv_count);
|
||||||
dfi["alpha"].readRaw("d", (uchar*)&df_alpha[ofs], sv_count*sizeof(df_alpha[0]));
|
dfi["alpha"].readRaw("d", (uchar*)&df_alpha[ofs], sv_count*sizeof(df_alpha[0]));
|
||||||
if( class_count > 2 )
|
if( class_count >= 2 )
|
||||||
dfi["index"].readRaw("i", (uchar*)&df_index[ofs], sv_count*sizeof(df_index[0]));
|
dfi["index"].readRaw("i", (uchar*)&df_index[ofs], sv_count*sizeof(df_index[0]));
|
||||||
decision_func.push_back(df);
|
decision_func.push_back(df);
|
||||||
}
|
}
|
||||||
if( class_count <= 2 )
|
if( class_count < 2 )
|
||||||
setRangeVector(df_index, sv_total);
|
setRangeVector(df_index, sv_total);
|
||||||
if( (int)fn["optimize_linear"] != 0 )
|
if( (int)fn["optimize_linear"] != 0 )
|
||||||
optimize_linear_svm();
|
optimize_linear_svm();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user