Comments (4)
as far as I can tell you are just selecting the value from the last col aka 'volume_deviation'
from hmm_market_behavior.
You should get the last value, because model.predict(...) returns the list of predictions. The length of this list is the number of rows in a dataset. We are interested in the current hidden state, then you should take the last one.
from hmm_market_behavior.
from the documentation: https://hmmlearn.readthedocs.io/en/latest/api.html#hmmlearn.base._BaseHMM.predict
Parameters: | X (array-like, shape (n_samples, n_features)) – Feature matrix of individual samples.lengths (array-like of integers, shape (n_sequences, ), optional) – Lengths of the individual sequences in X. The sum of these should be n_samples. |
---|---|
state_sequence – Labels for each sample from X. | |
array, shape (n_samples, ) |
does this suggest that its not the current hidden state?
Just trying to understand it more as its some great stuff you have put out here
from hmm_market_behavior.
In my case, model.predict(...) returns the list like this:
[1 0 0 0 0 0]
It represents the hidden state for each sample (row) in the input dataframe. The list contains 6 values because 6 is the number of rows in the dataframe after dropna().
from hmm_market_behavior.
Related Issues (2)
- new HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hmm_market_behavior.