Code Monkey home page Code Monkey logo

Comments (7)

skadio avatar skadio commented on June 19, 2024

Thank you @NaifahNurya for your interest.

The easiest would be to find the frequent patterns using Seq2Pat and then to do a quick post-processing to remove undesired patterns based on custom preferences like the above.

from seq2pat.

NaifahNurya avatar NaifahNurya commented on June 19, 2024

@skadio , Thank you for quick reply, let me work on it.

Also I have another issue, when I use the Seq2Pat on few dataset (with short length in each sequence) i can get the result. However in a large dataset (with many sequences having long length in some sequences) I got the following error:

patterns = seq2pat.get_patterns(min_frequency=65)
File "C:\Users\NaifahNurya\anaconda3\envs\Seq2Pat\lib\site-packages\sequential\seq2pat.py", line 411, in get_patterns
 patterns = self._cython_imp.mine()
File "sequential\backend\seq_to_pat.pyx", line 31, in sequential.backend.seq_to_pat.PySeq2pat.mine
**RuntimeError: bad allocation**

Can you help to Identify the cause for this.
If you give me your email I can send to you a sample txt file.

from seq2pat.

takojunior avatar takojunior commented on June 19, 2024

Thanks @NaifahNurya .

This might be caused by the memory exhaust issue when dataset contains many long sequences. It seems relevant to a previous discussion #14.

To alleviate such memory issues, I would suggest to add constraints to further reduce the number of search paths. Also what we can do is to limit the number of columns, or apply data sampling before the mining, to better work with the memory resources.

from seq2pat.

skadio avatar skadio commented on June 19, 2024

Sampling the columns/limiting columns sound reasonably and might be required. You can start with small samples 10-20 columns and see how it behaves in your application before including more.

@takojunior you have an interesting suggestion on adding a span constraint to limit the search on columns. Do we have an example of how to add that constrained somewhere?

from seq2pat.

takojunior avatar takojunior commented on June 19, 2024

Right, so one way is to enforce a span constraint to an attribute created by the order of items, e.g. [A, B, C, D] has the attribute [0, 1, 2, 3]. Enforcing a maximum span constraint will control the length of mined patterns in mining, and thus reduce the search space.

How to enforce such constraint can be referred to this example notebook: dichotomic_pattern_mining.ipynb. @skadio @NaifahNurya

from seq2pat.

NaifahNurya avatar NaifahNurya commented on June 19, 2024

@takojunior and @skadio , Thank you very much for this suggestion, let me work on it then I will share the feedback.

from seq2pat.

skadio avatar skadio commented on June 19, 2024

Closing the issue per discussion. Hope this helped!

from seq2pat.

Related Issues (18)

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.