You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@samoa.apache.org by asp188 <gi...@git.apache.org> on 2015/04/27 16:32:16 UTC

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

GitHub user asp188 opened a pull request:

    https://github.com/apache/incubator-samoa/pull/24

    Fix the ArffLoader bug in processing

    the "numAttribute" in ArffLoader must be added for each loop.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/asp188/incubator-samoa SAMOA-26

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-samoa/pull/24.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #24
    
----
commit a1f6efca70f6f4ff44bf7ca0a23b7922dda35bbf
Author: qibaoyuan <qi...@126.com>
Date:   2015-04-27T14:28:14Z

    Fix the ArffLoader bug in processing

----


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by asp188 <gi...@git.apache.org>.
Github user asp188 commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-101575448
  
    Seems something was wrong because  the travis system did not run correctly a  moment ago. Now everything is ok.


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by asp188 <gi...@git.apache.org>.
Github user asp188 commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-101569520
  
    weird Travis  exit "The command "./gradlew s4-tools::installApp" failed and exited with 1 during ." I am not sure what happend


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by gdfm <gi...@git.apache.org>.
Github user gdfm commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-97352811
  
    Unfortunately the patch doesn't seem to solve the issue.
    First, it would be good to write a test to isolate the issue.
    By debugging the example in the Jira, I get the following metadata in Instances:
    ```
    [@attribute Dur NUMERIC, @attribute Proto NUMERIC, @attribute Dir NUMERIC, @attribute State NUMERIC, @attribute sTos NUMERIC, @attribute dTos NUMERIC, @attribute TotPkts NUMERIC, @attribute TotBytes NUMERIC, @attribute SrcBytes NUMERIC, @attribute class NUMERIC]
    ```
    There are several issues:
    1) There is an issue with the toString method in Attribute (it always returns NUMERIC)
    2) The ArffLoader does not handle well newlines before the definition of the set of values for a nominal attribute. By putting the attribute definition on a single line I managed to get the header parsed correctly.
    ```
    [@attribute Dur NUMERIC, @attribute Proto NOMINAL, @attribute Dir NOMINAL, @attribute State NOMINAL, @attribute sTos NUMERIC, @attribute dTos NUMERIC, @attribute TotPkts NUMERIC, @attribute TotBytes NUMERIC, @attribute SrcBytes NUMERIC, @attribute class NOMINAL]
    ```
    3) The characters '<->' and so on are not recognized as words by line 97 in ArffLoader
    ```
    else if (streamTokenizer.sval != null && (streamTokenizer.ttype == StreamTokenizer.TT_WORD
                  || streamTokenizer.ttype == 34)) {
    ```
    The ttype value is 39, which corresponds to the single quote '.
    By modifying the test arff file I managed to make it work.
    I guess we could add an OR to the statement checking also for single quotes.


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by asp188 <gi...@git.apache.org>.
Github user asp188 commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-101568004
  
    all tests passed given your test case.


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-samoa/pull/24


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by abifet <gi...@git.apache.org>.
Github user abifet commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-101564711
  
    I added a test of ArffLoader in
    
    https://github.com/abifet/incubator-samoa/commit/60a8541580ee21dfd052547e4ddd366e0ec7ab40
    
    Please @asp188, can you add it to this pull request and check that it works?



---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by gdfm <gi...@git.apache.org>.
Github user gdfm commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-97330331
  
    Oh, I guess this fixes SAMOA-26.


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by abifet <gi...@git.apache.org>.
Github user abifet commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-97053435
  
    +1 (Please start the pull request with SAMOA-xx:)


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by gdfm <gi...@git.apache.org>.
Github user gdfm commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-102303434
  
    +1
    Merged.
    Thanks for the contribution!


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by abifet <gi...@git.apache.org>.
Github user abifet commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-101595198
  
    +1


---
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.
---

[GitHub] incubator-samoa pull request: Fix the ArffLoader bug in processing

Posted by gdfm <gi...@git.apache.org>.
Github user gdfm commented on the pull request:

    https://github.com/apache/incubator-samoa/pull/24#issuecomment-97330030
  
    Thanks, could you please also open a Jira issue on https://issues.apache.org/jira/browse/SAMOA ?


---
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.
---