bluesheeptoken / subseq Goto Github PK
View Code? Open in Web Editor NEWSuccinct BWT based sequence prediction: a lossless model for sequence prediction
License: MIT License
Succinct BWT based sequence prediction: a lossless model for sequence prediction
License: MIT License
One example input of the predictor seems to be model.fit([["A", "B", "C"], ["A", "C"], ["A", "B"]])
, here "A", "B", "C" can be products purchased by three customers and each sublist is a ordered sequence of each customer's purchase history. But your model seems unable to deal with model.fit([["A", {"B", "C"}, "D"], ["A", {"A", "B"} "C"], ["A", "B"]])
where each set is a basket of products that are purchased at the same timestamp. How can I do sequence prediction with the input data that have the form like this: http://philippe-fournier-viger.com/spmf/CPTPlus.php
great code thanks
but do you have example that your code is better than neural networks based code ?
Hi,
Thanks for this package. I was wondering if there was an option to access the top k predictions or least get the probabilities.
thanks !
Hi! Is there any way I can see the probability? Something like:
model = Subseq(1)
model.probability()
Hi!
First of all thank you for this package - model produces great results.
But we faced with problem that the model can't be saved. We can't neither pickle nor dill it as it has non-serializable object 'thisptr'.
Example:
from dill import dumps
from subseq.subseq import Subseq
model = Subseq(1)
model.fit([['hello', 'world']])
dumps(model)
execs with exception
File "<input>", line 1, in <module>
File "\lib\site-packages\dill\_dill.py", line 304, in dumps
dump(obj, file, protocol, byref, fmode, recurse, **kwds)#, strictio)
File "\lib\site-packages\dill\_dill.py", line 276, in dump
Pickler(file, protocol, **_kwds).dump(obj)
File "\lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File "\lib\pickle.py", line 437, in dump
self.save(obj)
File "\lib\pickle.py", line 524, in save
rv = reduce(self.proto)
File "stringsource", line 2, in subseq.subseq.Subseq.__reduce_cython__
TypeError: self.thisptr cannot be converted to a Python object for pickling
Do you have any solution how to store the resulting model in storage?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.