GithubHelp home page GithubHelp logo

Comments (5)

LoLei avatar LoLei commented on July 17, 2024

Interesting, thanks for reporting. spmf-py is largely untested for algorithms other than sequential pattern mining, such as association rule mining, although in theory the wrapper should work the same.

Could you please post the calls you make to both spmf-py and the jar itself, so I can reproduce it?

from spmf-py.

Choneke avatar Choneke commented on July 17, 2024

I tried to run this on spmf-py

spmf = Spmf("TopKClassRules", input_filename="Input.txt",
output_filename="output.txt", arguments=[10, 0.05, 1, 101, 2])

from spmf-py.

LoLei avatar LoLei commented on July 17, 2024

Could you also post how you call the jar itself?

from spmf-py.

Choneke avatar Choneke commented on July 17, 2024

This is how jar is called in init.py file which is under spmf folder.

class Spmf:
    def __init__(self,
                 algorithm_name,
                 input_direct=None,
                 input_type="normal",
                 input_filename="",
                 output_filename="spmf-output.txt",
                 arguments=[],
                 spmf_bin_location_dir=".",
                 memory=0):
        self.executable_dir_ = spmf_bin_location_dir
        self.executable_ = "spmf.jar"

And below picture shows how the file is arranged, and I run example2.py to get my output

image

from spmf-py.

LoLei avatar LoLei commented on July 17, 2024

Thanks, but I was thinking about this:

But when I run in jar file with the same input parameter the output which I expected is what I get.

Am I not understanding it correctly? That you also ran the spmf.jar file without spmf-py to get the correct output? I'm interested in that call.

Btw, one thing that seems suspicious is that in the documentation it says to run the jar like this: java -jar spmf.jar run TopKClassRules contextIGB.txt output.txt 7 80% 1,2, with 80% instead of 0.8, even though further below it says:

parameter minconf representing the minimum confidence that the association rules should have (a value in [0,1] representing a percentage).

Also I see in spmf-py, you're passing the "required items" parameter as multiple parameters. Try passing it differently. E.g. as one string, instead of separate parameters. I.e. like this: spmf = Spmf("TopKClassRules", input_filename="Input.txt", output_filename="output.txt", arguments=[10, 0.05, '1,101,2']).

from spmf-py.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.