trink / symtseries Goto Github PK
View Code? Open in Web Editor NEWC Library providing means of symbolic analysis on time series data currently based on iSAX paper (http://www.cs.ucr.edu/~eamonn/iSAX/iSAX.html)
License: Mozilla Public License 2.0
C Library providing means of symbolic analysis on time series data currently based on iSAX paper (http://www.cs.ucr.edu/~eamonn/iSAX/iSAX.html)
License: Mozilla Public License 2.0
However, the real problem is in dist.info
otherwise I have to duplicate the word to get at the string
sax.word.new({1/0, 1/0, 1/0, 0, 0, 0, -1/0, -1/0, -1/0}, 9, 5) -- expect "ECA" gets "CCC"
sax.word.new({1/0, 1/0, 5, 0, 0, 0, -1/0, -1/0, -5}, 9, 5) -- correctly gets "ECA"
sax.word.new({0/0, 1/0, 1/0, 0, 0, 0, 0/0, -1/0, -1/0}, 9, 5) -- expect "ECA" gets "CCC"
sax.word.new({0/0, 5, 5, 0, 0, 0, 0/0, -5, -5}, 9, 5) -- correctly gets "ECA"
By default mingw uses the Windows CRT's printf, which lacks %z
, and using %lu
would also be problematic as it isn't ISO C and causes an error when using -Werror
.
This build configuration is required for Heka
D:\work\symtseries\mingw32>mingw32-make
Scanning dependencies of target sts_test
[ 16%] Building C object src/CMakeFiles/sts_test.dir/symtseries.c.obj
D:\work\symtseries\src\symtseries.c: In function 'get_symbol':
D:\work\symtseries\src\symtseries.c:214:5: error: 'for' loop initial declarations are only allowed in C99 mode
D:\work\symtseries\src\symtseries.c:214:5: note: use option -std=c99 or -std=gnu99 to compile your code
D:\work\symtseries\src\symtseries.c: In function 'apply_sax_transform':
word.new[(v, n, w, c), (s, c)]
sw = sax.word.new("", 5)
This leads to implementation defined behaviour here: https://github.com/Quadrocube/symtseries/blob/Lua/cleanup/src/symtseries.c#L394
The library is pretty small so it would be nice to get rid of the extra dependency
ldd modules/sax.so
linux-vdso.so.1 => (0x00007ffe82340000)
libluasb.so.0 => /usr/lib/libluasb.so.0 (0x00007f009c544000)
libluasandbox.so.0 => /usr/lib/libluasandbox.so.0 (0x00007f009c33a000)
libsymtseries.so => /usr/local/lib/libsymtseries.so (0x00007f009c12f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f009bd6a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f009ba64000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f009b860000)
/lib64/ld-linux-x86-64.so.2 (0x00007f009c982000)
If there isn't one it can be removed.
[ 16%] Building C object src/CMakeFiles/sts_test.dir/symtseries.c.obj
symtseries.c
D:\work\symtseries\src\symtseries.c(20) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(21) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(22) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(23) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(24) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(25) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(26) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(27) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(28) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(29) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(31) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(33) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(35) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(37) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(39) : warning C4056: overflow in floating-point constant arithmetic
D:\work\symtseries\src\symtseries.c(227) : error C2275: 'size_t' : illegal use of this type as an expression
D:\work\symtseries\src\symtseries.c : see declaration of 'size_t'
D:\work\symtseries\src\symtseries.c(227) : error C2146: syntax error : missing ';' before identifier 'actual_n_values'
D:\work\symtseries\src\symtseries.c(227) : error C2065: 'actual_n_values' : undeclared identifier
D:\work\symtseries\src\symtseries.c(227) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
D:\work\symtseries\src\symtseries.c(241) : error C2065: 'actual_n_values' : undeclared identifier
D:\work\symtseries\src\symtseries.c(246) : error C2065: 'actual_n_values' : undeclared identifier
D:\work\symtseries\src\symtseries.c(253) : error C2065: 'actual_n_values' : undeclared identifier
D:\work\symtseries\src\symtseries.c(257) : error C2065: 'actual_n_values' : undeclared identifier
D:\work\symtseries\src\symtseries.c(318) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible lo
ss of data
D:\work\symtseries\src\symtseries.c(353) : warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss o
f data
D:\work\symtseries\src\symtseries.c(369) : error C2275: 'size_t' : illegal use of this type as an expression
D:\work\symtseries\src\symtseries.c : see declaration of 'size_t'
D:\work\symtseries\src\symtseries.c(369) : error C2146: syntax error : missing ';' before identifier 'start'
D:\work\symtseries\src\symtseries.c(369) : error C2065: 'start' : undeclared identifier
D:\work\symtseries\src\symtseries.c(370) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
D:\work\symtseries\src\symtseries.c(371) : error C2065: 'start' : undeclared identifier
D:\work\symtseries\src\symtseries.c(393) : error C2275: 'size_t' : illegal use of this type as an expression
D:\work\symtseries\src\symtseries.c : see declaration of 'size_t'
D:\work\symtseries\src\symtseries.c(393) : error C2146: syntax error : missing ';' before identifier 'w'
D:\work\symtseries\src\symtseries.c(393) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(393) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
D:\work\symtseries\src\symtseries.c(394) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(396) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(398) : warning C4267: '=' : conversion from 'size_t' to 'sts_symbol', possible loss of data
D:\work\symtseries\src\symtseries.c(400) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(400) : warning C4267: 'function' : conversion from 'size_t' to 'short', possible loss of data
D:\work\symtseries\src\symtseries.c(414) : warning C4267: '=' : conversion from 'size_t' to 'char', possible loss of data
D:\work\symtseries\src\symtseries.c(423) : error C2275: 'size_t' : illegal use of this type as an expression
D:\work\symtseries\src\symtseries.c : see declaration of 'size_t'
D:\work\symtseries\src\symtseries.c(423) : error C2146: syntax error : missing ';' before identifier 'w'
D:\work\symtseries\src\symtseries.c(423) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(423) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
D:\work\symtseries\src\symtseries.c(427) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible lo
ss of data
D:\work\symtseries\src\symtseries.c(433) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(442) : error C2065: 'w' : undeclared identifier
D:\work\symtseries\src\symtseries.c(473) : error C2275: 'sts_symbol' : illegal use of this type as an expression
D:\work\symtseries\include\symtseries.h(18) : see declaration of 'sts_symbol'
D:\work\symtseries\src\symtseries.c(473) : error C2065: 'sts_symbols' : undeclared identifier
D:\work\symtseries\src\symtseries.c(473) : error C2100: illegal indirection
D:\work\symtseries\src\symtseries.c(474) : error C2065: 'sts_symbols' : undeclared identifier
D:\work\symtseries\src\symtseries.c(474) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 1
D:\work\symtseries\src\symtseries.c(474) : error C2100: illegal indirection
D:\work\symtseries\src\symtseries.c(475) : warning C4267: 'function' : conversion from 'size_t' to 'short', possible loss of data
D:\work\symtseries\src\symtseries.c(475) : error C2065: 'sts_symbols' : undeclared identifier
D:\work\symtseries\src\symtseries.c(475) : warning C4047: 'function' : 'sts_symbol *' differs in levels of indirection from 'int'
D:\work\symtseries\src\symtseries.c(475) : warning C4024: 'new_word' : different types for formal and actual parameter 4
D:\work\symtseries\src\symtseries.c(492) : warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss o
f data
D:\work\symtseries\src\symtseries.c(494) : warning C4013: 'snprintf' undefined; assuming extern returning int
D:\work\symtseries\src\symtseries.c(502) : warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss o
f data
D:\work\symtseries\src\symtseries.c(517) : warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss o
f data
D:\work\symtseries\src\symtseries.c(518) : warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss o
f data
D:\work\symtseries\src\symtseries.c(573) : warning C4267: 'function' : conversion from 'size_t' to 'unsigned int', possible loss o
f data
D:\work\symtseries\src\symtseries.c(637) : warning C4056: overflow in floating-point constant arithmetic
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~4.0\VC\bin\amd64\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(46) : error C2220: 警告被视为错误 - 没有生成“object”文件
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(46) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(54) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(61) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(69) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(78) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(88) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(99) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(111) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(124) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(138) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(153) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(169) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(186) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(204) : warning C4305: “初始化”: 从“double”到“const float”截断
F:\developing\c\lua_sandbox\release\ep_base\Source\lua_sax\src\symtseries.c(223) : warning C4305: “初始化”: 从“double”到“const float”截断
The current window output is binary dump of a struct and the word output appears to be a Lua table. I would prefer just the SAX string e.g. ABBAC
.
However, it would be nice to account for the cardinality so I am open to other suggestion. The iSAX binary representation isn't unambiguous since we aren't restricted to powers of 2. The exponentiation representation wasn't bad but overkill on every symbol, maybe just tack it onto the end ABBAC^4
?
Currently the word looks like this: BBBB######
it should look like this: ######BBBB
Check out whether dumping the normalization_buffer would be worse it
If yes, screw it and merge normalization with symbol estimation
It should be faster, smaller, and produce consistent output
_G["win"]:add({16.000000,18.000000,12.000000,24.000000,11.000000,15.000000,16.000000,12.000000,17.000000})
Set runtime path of "/usr/local/bin/libsymtseries.so" to "$ORIGIN/../lib"
Also, the .so should not be installed in bin
/work/git/lua_sandbox/release/ep_base/Source/lua_sax/lua/lua_sax.c: In function ‘output_sax’:
/work/git/lua_sandbox/release/ep_base/Source/lua_sax/lua/lua_sax.c:347:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/work/git/lua_sandbox/release/ep_base/Source/lua_sax/lua/lua_sax.c: In function ‘serialize_sax’:
/work/git/lua_sandbox/release/ep_base/Source/lua_sax/lua/lua_sax.c:324:1: error: control reaches end of non-void function [-Werror=return-type]
}
trink@trink-x230:/work/git/symtseries/release$ cpack -G DEB
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: symtseries
CPack: - Install project: symtseries
CPack: Create package
CMake Error at /usr/local/stow/cmake-3_0_2/share/cmake-3.0/Modules/CPackDeb.cmake:370 (message):
CPackDeb: Debian package requires a maintainer for a package, set
CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER
This prevents replacement copies from being created and saves GC
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.