mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <>
Subject Re: question about input format for bayes classification
Date Wed, 18 Jul 2012 11:17:50 GMT
Cardinality is the logical size of the vector, its number of dimensions.
You can only add vectors with the same cardinality -- it's not defined what
the result is to add, say, a 2D and 3D vector. So yes this vector needs to
have a cardinality equal to number of features, it seems.

On Wed, Jul 18, 2012 at 1:09 PM, Lu arsenal <> wrote:

> Hi,
>     When I try to use bayes in mahout. I'm confused by a property of Vector
> , "cardinality".
>     My question is when I prepare the input data for bayes, I must set the
> Vector size of input data to the number of features?
>     Because in function,
> "weightsPerFeature.assign(instance,
> Functions.PLUS);" may throws CardinalityException if first vector of
> records is not with the same size of later on vectors.
> --
> Luke

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message