本文整理汇总了C++中DataTable::discretize方法的典型用法代码示例。如果您正苦于以下问题:C++ DataTable::discretize方法的具体用法?C++ DataTable::discretize怎么用?C++ DataTable::discretize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataTable
的用法示例。
在下文中一共展示了DataTable::discretize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
int
main (int argc, char *argv[])
{
/* if (strcmp (argv[0], "mutualinfo"))
{
printf ("The program MUST has the name 'mutualinfo'.\n");
return 0;
}
*/
if (argc <= 1)
{
printHelp ();
return 1;
}
double t_discretize = 9999;
int nfea = 50; //default 50 features
char *input_dfile = NULL;
char *s_thres = NULL;
int select_method = MID;
long i, j;
int c;
static char optstring[] = "ht:i:n:m:";
opterr = 0;
while ((c = getopt (argc, argv, optstring)) != -1)
{
switch (c)
{
case 'h':
printHelp ();
return 1;
break;
case 't':
// fprintf(stderr,"[%s]-> ",optarg);
if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-')
{
fprintf (stderr,
"Found illegal or NULL parameter for the option -t.\n");
return 1;
}
t_discretize = atof (optarg);
break;
case 'i':
// fprintf(stderr,"[%s]-> ",optarg);
if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-')
{
fprintf (stderr,
"Found illegal or NULL parameter for the option -i.\n");
return 1;
}
input_dfile = optarg;
break;
case 'm':
// fprintf(stderr,"[%s]-> ",optarg);
if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-')
{
fprintf (stderr,
"Found illegal or NULL parameter for the option -i.\n");
return 1;
}
if (strcmp (optarg, "MID") == 0)
select_method = MID;
else if (strcmp (optarg, "MIQ") == 0)
select_method = MIQ;
else
{
fprintf (stderr,
"Found invalid method name %s, use MID instead.\n",
optarg);
select_method = MID;
}
break;
case 'n':
// fprintf(stderr,"[%s]-> ",optarg);
if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-')
{
fprintf (stderr,
"Found illegal or NULL parameter for the option -i.\n");
return 1;
}
nfea = atoi (optarg);
break;
case '?':
fprintf (stderr, "Unknown option `-%c'.\n", optopt);
return 1;
// default: abort ();
}
}
if (optind < argc)
printf ("Stop parsing arguments list. Left off at %s\n", argv[optind]);
//.........这里部分代码省略.........