Time Series Indexing by Mihalis Tsoukalos
Author:Mihalis Tsoukalos
Language: eng
Format: epub
Publisher: Packt
Published: 2023-11-15T00:00:00+00:00
The variables.py file
This subsection presents the contents of the updated variables.py file, which contains variables that are accessible from anywhere in the code.
How much functionality is enough?
Keep in mind that sometimes we might need to include functionality that is going to help with debugging or might be needed in the future, and therefore, we might need to include variables or implement functions that are not going to be used right away or all the time. Just remember to keep a good balance between wanting to support everything and please everyone, which is impossible, and wanting to support the absolute minimum functionality, which usually lacks flexibility.
The contents of the variables.py file are the following:
# This file includes all variables for the isax package # maximumCardinality = 32 breakpointsFile = "SAXalphabet" # Breakpoints in breakpointsFile elements = "" slidingWindowSize = 16 segments = 0 # Maximum number of time series in a terminal node threshold = 100 # Keeps number of splits nSplits = 0 # Keep number of accesses of subsequences nSubsequences = 0 # Currently supporting TWO promotion strategies defaultPromotion = True # Number of overflows overflow = 0 # Floating point precision precision = 5 # Segment to promote promote = 0
The variables.promote variable defines the SAX word that is going to be promoted next if there is such a need. Put simply, we create the SAX representation of the two nodes of a split based on the value of variables.promote â we promote the segment defined by the value of variables.promote. Every time we have a split, variables.promote is updated according to the promotion (splitting) strategy and gets ready for the next split.
Should you wish to see the changes between two versions of the same file, you can use the diff(1) utility. In our case, the difference between the variables.py file found in the ch03 directory and the current version is the following:
2c2 < # This file includes all variables for the sax package --- > # This file includes all variables for the isax package 13a14,16 > # Breakpoints in breakpointsFile > elements = "" > 20,21c23,24 < # Breakpoints in breakpointsFile < elements = "" --- > # Maximum number of time series in a terminal node > threshold = 100 22a26,37 > # Keeps number of splits > nSplits = 0 > > # Keeps number of accesses of subsequences > nSubsequences = 0 > > # Currently supporting TWO promotion strategies > defaultPromotion = True > > # Number of overflows > overflow = 0 > 24a40,42 > > # Segment to promote > promote = 0
Lines beginning with > show the contents of ch04/isax/variables.py, whereas lines beginning with < show statements from ch03/sax/variables.py.
The next subsection discusses sax.py, which did not change that much.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
American National Standards Institute (ANSI) Publications | Architecture |
History | Measurements |
Patents & Inventions | Research |
Whiskies Galore by Ian Buxton(41489)
Introduction to Aircraft Design (Cambridge Aerospace Series) by John P. Fielding(32857)
Small Unmanned Fixed-wing Aircraft Design by Andrew J. Keane Andras Sobester James P. Scanlan & András Sóbester & James P. Scanlan(32534)
Craft Beer for the Homebrewer by Michael Agnew(17902)
Turbulence by E. J. Noyes(7660)
The Complete Stick Figure Physics Tutorials by Allen Sarah(7097)
Kaplan MCAT General Chemistry Review by Kaplan(6548)
The Thirst by Nesbo Jo(6407)
Bad Blood by John Carreyrou(6245)
Modelling of Convective Heat and Mass Transfer in Rotating Flows by Igor V. Shevchuk(6205)
Learning SQL by Alan Beaulieu(5995)
Weapons of Math Destruction by Cathy O'Neil(5779)
Man-made Catastrophes and Risk Information Concealment by Dmitry Chernov & Didier Sornette(5593)
Digital Minimalism by Cal Newport;(5325)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(5147)
iGen by Jean M. Twenge(5125)
Secrets of Antigravity Propulsion: Tesla, UFOs, and Classified Aerospace Technology by Ph.D. Paul A. Laviolette(4863)
Design of Trajectory Optimization Approach for Space Maneuver Vehicle Skip Entry Problems by Runqi Chai & Al Savvaris & Antonios Tsourdos & Senchun Chai(4807)
Electronic Devices & Circuits by Jacob Millman & Christos C. Halkias(4701)
