MAHOUT-1493 Port Naive Bayes to Scala DSL 

Created this PR to review the patch provided by Christoph Viebig and team, Students of TU, Berlin.  It is based on Sebastian's code from before the DSL was abstracted away from Spark. 
I am looking into this. Have been a bit busy, will get back on this soon.

On Wed, Dec 17, 2014, 14:22 Andrew Palumbo <notifications@github.com> wrote:

> In h2o/src/main/java/org/apache/mahout/h2obindings/H2OHelper.java
> <https://github.com/apache/mahout/pull/32#discussion-diff-22009635>:
>
> > @@ -327,9 +327,11 @@ public static H2ODrm drmFromMatrix(Matrix m, int minHint, int exactHint) {
> >        labels = frame.anyVec().makeZero();
> >        Vec.Writer writer = labels.open();
> >        Map<Integer,String> rmap = reverseMap(map);
> > -
> > -      for (long r = 0; r < m.rowSize(); r++) {
> > -        writer.set(r, rmap.get(r));
> > +      // TODO: fix BUG here... h20 water.fvec.Vec does not accept String values
> > +      // TODO: need a new distributed data structure for storing String keys.
> > +      for (int r = 0; r < m.rowSize(); r++) {
> > +        //writer.set(r, rmap.get(r));
> > +        labels.chunkForRow(r).set(r, rmap.get(r));
>
> looks like the exception is being thrown here:
>
> water.fvec.Chunk.set_impl(Chunk.java:189)
> boolean set_impl (int idx, String str) { throw new IllegalArgumentException("Not a String"); }
>
> I've been looking through some of the more recent code and it seems that
> the Vec.Writer.set( long i, String str) signature has been phased out.
>
> We should probably address this as a separate issue since we have to
> update to a newer h2o-core artifact, and there may be some other issues in
> there too.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/mahout/pull/32/files#r22009635>.
>