How to switch off the prwarning messages?

It is possible to avoid the prwarning messages, just give

prwarning off

However, do this only when you are very confident what you are doing. The warnings generated by PRTools may be generated to inform you that there might be something wrong. PRTools can continue, but results may be sub-optimal or inappropriate. There are three levels of warnings:

  1. These are the warnings intended for users who want to find a solution for a pattern recognition problem. A typical example is a conflict between the classes of the objects in the available test set and the classes that are defined for the classifier. This will cause that the estimated error is not appropriate for the evaluated classifier.
  2. This level is informative for designers in the study and evaluation of procedures. Typical warnings are the fallback to more simple procedures due to small sample sizes or an insufficient accuracy.  Also the early stopping of optimization procedures due to a time limit set by prtime is reported on this levels.
  3. These are all other warnings intended for programmers: a default that is used, a regularization that is applied, etcetera.

Warnings of the levels 1 and 2 are reported on level 3 as well. Warnings of level 1 are reported on level 2 as well. The warning level is by default level 2. It may be changed by a statement

prwarning (1)

Warning messages may irritate the user in long experiments. A well known warning like:

No priors found in dataset, class frequencies are used.

can easily be avoided by setting the class priors, e.g. by

A = setprior(A,getprior(A));

which sets the class frequencies as priors in the dataset definition. In all further references of the dataset A the prior is now found. This will still generate a single warning. This may be suppressed as well by:

A = setprior(A,getprior(A,0));

but now a new user, running a routine with this statement, is not informed at all.

 

Print Friendly, PDF & Email