[
https://issues.apache.org/jira/browse/MAHOUT-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14250690#comment-14250690
]
ASF GitHub Bot commented on MAHOUT-1493:
----------------------------------------
Github user avati commented on a diff in the pull request:
https://github.com/apache/mahout/pull/32#discussion_r22009885
--- Diff: h2o/src/main/java/org/apache/mahout/h2obindings/H2OHelper.java ---
@@ -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));
--- End diff --
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 <[email protected]> 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>.
>
> Port Naive Bayes to the Spark DSL
> ---------------------------------
>
> Key: MAHOUT-1493
> URL: https://issues.apache.org/jira/browse/MAHOUT-1493
> Project: Mahout
> Issue Type: Bug
> Components: Classification
> Reporter: Sebastian Schelter
> Assignee: Andrew Palumbo
> Fix For: 1.0
>
> Attachments: MAHOUT-1493.patch, MAHOUT-1493.patch, MAHOUT-1493.patch,
> MAHOUT-1493.patch, MAHOUT-1493a.patch
>
>
> Port our Naive Bayes implementation to the new spark dsl. Shouldn't require
> more than a few lines of code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)