hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myui <...@git.apache.org>
Subject [GitHub] incubator-hivemall pull request #63: [HIVEMALL-90] Refine incomplete AUC UDA...
Date Sun, 09 Apr 2017 22:03:13 GMT
Github user myui commented on a diff in the pull request:

    https://github.com/apache/incubator-hivemall/pull/63#discussion_r110553873
  
    --- Diff: core/src/main/java/hivemall/evaluation/AUCUDAF.java ---
    @@ -204,21 +256,53 @@ public void merge(AggregationBuffer agg, Object partial) throws
HiveException {
                     return;
                 }
     
    -            Object aObj = internalMergeOI.getStructFieldData(partial, aField);
    -            Object scorePrevObj = internalMergeOI.getStructFieldData(partial, scorePrevField);
    +            Object indexScoreObj = internalMergeOI.getStructFieldData(partial, indexScoreField);
    +            Object areaObj = internalMergeOI.getStructFieldData(partial, areaField);
                 Object fpObj = internalMergeOI.getStructFieldData(partial, fpField);
                 Object tpObj = internalMergeOI.getStructFieldData(partial, tpField);
                 Object fpPrevObj = internalMergeOI.getStructFieldData(partial, fpPrevField);
                 Object tpPrevObj = internalMergeOI.getStructFieldData(partial, tpPrevField);
    -            double a = PrimitiveObjectInspectorFactory.writableDoubleObjectInspector.get(aObj);
    -            double scorePrev = PrimitiveObjectInspectorFactory.writableDoubleObjectInspector.get(scorePrevObj);
    +            Object areaPartialMapObj = internalMergeOI.getStructFieldData(partial, areaPartialMapField);
    +            Object fpPartialMapObj = internalMergeOI.getStructFieldData(partial, fpPartialMapField);
    +            Object tpPartialMapObj = internalMergeOI.getStructFieldData(partial, tpPartialMapField);
    +            Object fpPrevPartialMapObj = internalMergeOI.getStructFieldData(partial,
fpPrevPartialMapField);
    +            Object tpPrevPartialMapObj = internalMergeOI.getStructFieldData(partial,
tpPrevPartialMapField);
    +
    +            double indexScore = PrimitiveObjectInspectorFactory.writableDoubleObjectInspector.get(indexScoreObj);
    +            double area = PrimitiveObjectInspectorFactory.writableDoubleObjectInspector.get(areaObj);
                 long fp = PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(fpObj);
                 long tp = PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(tpObj);
                 long fpPrev = PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(fpPrevObj);
                 long tpPrev = PrimitiveObjectInspectorFactory.writableLongObjectInspector.get(tpPrevObj);
     
    +            Map<Double, Double> areaPartialMap = (Map<Double, Double>) ObjectInspectorFactory.getStandardMapObjectInspector(
    --- End diff --
    
    ```java
    ObjectInspectorFactory.getStandardMapObjectInspector(
      PrimitiveObjectInspectorFactory.writableDoubleObjectInspector,
      PrimitiveObjectInspectorFactory.writableLongObjectInspector
    )
    ```
    
    Invalid casting `Map<DoubleWritable, LongWritable>` to `Map<Double, Double>`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message