public void Initialize(int[] classes, bool asciiTarget = true)
{
List<int> cl = new List<int>(classes.Length);
for (int i = 0; i < classes.Length; i++)
if (classes[i] != jc())
cl.Add(classes[i]);
CharClass.AsciiTarget = asciiTarget;
//CharClass.NetNorm = true;
CharClass.Classes = cl.ToArray();
JunkClass.AsciiTarget = asciiTarget;
//JunkClass.NetNorm = true;
int[] jcl;
if (asciiTarget)
jcl = new int[] { (int)'0', (int)'1' }; // '0' - any symbol, '1' - junk
else
jcl = new int[] { 0, 1 };
JunkClass.Classes = jcl;
// create char classifier instance
CharClass.CreateLenet(CharClass.Classes.Length, CharClass.Classes,
CharClass.TanhSigmoid, CharClass.NetNorm, CharClass.AsciiTarget);
// create junk classifier instance
if (PGeti("junk") > 0)
JunkClass.CreateLenet(JunkClass.Classes.Length, JunkClass.Classes,
JunkClass.TanhSigmoid, JunkClass.NetNorm, JunkClass.AsciiTarget);
}