On Sun, Feb 12, 2012 at 5:14 AM, Christian Herta (Commented) (JIRA) < j...@apache.org> wrote:
> .... > The implementation of public Vector classifyFull(Vector r, Vector > instance) in AbstractVectorClassifier assumes that the probabilities of > the n elements of the output vector sum to 1. This is only valid if there > are n mutually exclusive classes. e.g. for the target vectors like (0 0 1 > 0), (0 0 0 1), (1 0 0 0), .... > Fine. That assumption is based on the fact that we only really had classifiers that had this property. Over-ride it and comment that the assumption doesn't hold. > The other posibility is, that there are n (here 4)independent targets > like: (1 0 0 1), (0 0 0 0), (0 1 1 1), (1 1 1 1) > Here the method "Vector classify(..)" and the implementation "public > Vector classifyFull(Vector r, Vector instance)" of AbstractVectorClassfier > makes no sense. Therefore using "Vector classify(..)" should throw an > exception and "Vector classifyFull" must be overwritten. > The method classify makes a lot of sense. ClassifyFull becomes the primitive and classify() just adds a maxIndex to find the largest value. It is true that finding the largest value doesn't make sense for some problems, but you can say the same thing of addition. The classify() method definitely does make sense for some problems. > P.S.: Depending on the "flag" the cost function and the activation > function for the output units will be set, to get probabilities as outputs > e.g. C. Bishop: "Pattern Recognition and Machine Learning", chapter 5.2. I am on the road and I don't have my copy of Bishop handy and others haven't read it. Do you mean you will offset the activation function to avoid negative values and L_1 normalize the result? > Also, this simplifies the implementation because the natural pairing > between cost and activation function yields for the output deltas "y - t". > This sounds like an implementation detail. Implementation details should not be exposed to users, even indirectly. If there is a user expectation of a certain behavior, then it is fine to expose some behavior. But if the user expectation conflicts with the simple implementation then you really need to do the translation internally so that the user has the easier time of it.