Hi, I am new to HTM. I love your project and I download your Java library to see if it could be of any use for some field in finance (predicting stock return??) I was trying to use the scalar encoder to code a periodicity element (time minutes for intraday data). I realised that I got an exception when data = maxValue. Is it supposed to work like that? I though the scalar should throw an exception if input max (but extremes should be included). Is it a small bug or am I getting it wrong? (line 330 of ScalarEncode.java)
Thanks Enrico
Hi @Enrico_Michelotti !
Iâm very happy that you are enjoying HTM.Java and also welcome! More than it being any select groupâs or single individualâs library, Iâd like to mention that it is a community sourced and driven project for which we all can have a sense of ownership. In fact, you bringing up questions over some of the functionality is by all means a contribution in its own right, and we are all better off for it!
Now to your specific question. maxValue
is a âboundâ marking the upper bound and by convention most often is not inclusive, and that is the case here. For example, a bound of 0-15 usually (by convention) means anything in the range of 0 (inclusive), and 14 (15 being the not-included [excluded] bound).
You are however correct that it is not very clear, and I think it should be documented that minVal and maxVal are inclusive, noninclusive (in that order).
That is both here in the Python version and here in the Java version.
If youâd like to open an issue to have that documentation improved, that would be great (also if youâd like to submit a PR to fix it - that would be great also⌠)
Anyway, welcomeâŚ
Also, something of a more helpful comment would be that if you know the range of your data, make sure maxVal is set to one unit higher than the maximum value of your data. Otherwise, a good option would be to use the RandomDistributedScalarEncoder which can operate on data whoâs range is not known previously and is very useful for adjusting to software requiring encoding that must adjust to different ranges possibly. Hope that helpsâŚ
Also, predicting the Stock Market requires prediction of a vast number of variables and may not be an application within the current scope of todayâs HTMs?
Hi, thank you very much for your prompt response. It is clear now (even though I dont get why maxValue should not be include
you said:
Also, predicting the Stock Market requires prediction of a vast number of variables and may not be an application within the current scope of todayâs HTMs?
Why is that? For difficulty or time consuming of the model to manage/deal with many variable at the same time? Or for other issues embedded in the model? Your answer/opinion would be very interesting to me. I found a paper online on HTM vs classical neural networks saying HTM could âat leastâ do a good job in predicting financial data as other neural networks do. So there is space to explore that? What am I missing?
Thanks for your time
Enrico