@ Deprecated public static DiscordRecords series2DiscordsDeprecated ( double [ ] series , int discordsNumToReport , int windowSize , int paaSize , int alphabetSize , SlidingWindowMarkerAlgorithm markerAlgorithm , NumerosityReductionStrategy strategy , double nThreshold ) throws Exception { Date start = new Date ( ) ; // get the SAX transform NormalAlphabet normalA = new NormalAlphabet ( ) ; SAXRecords sax = sp . ts2saxViaWindow ( series , windowSize , alphabetSize , normalA . getCuts ( alphabetSize ) , strategy , nThreshold ) ; Date saxEnd = new Date ( ) ; LOGGER . debug ( "discretized in {}, words: {}, indexes: {}" , SAXProcessor . timeToString ( start . getTime ( ) , saxEnd . getTime ( ) ) , sax . getRecords ( ) . size ( ) , sax . getIndexes ( ) . size ( ) ) ; // instantiate the hash HashMap < String , ArrayList < Integer > > hash = new HashMap < String , ArrayList < Integer > > ( ) ; // fill the hash for ( SAXRecord sr : sax . getRecords ( ) ) { for ( Integer pos : sr . getIndexes ( ) ) { // add to hash String word = String . valueOf ( sr . getPayload ( ) ) ; if ( ! ( hash . containsKey ( word ) ) ) { hash . put ( word , new ArrayList < Integer > ( ) ) ; } hash . get ( String . valueOf ( word ) ) . add ( pos ) ; } } Date hashEnd = new Date ( ) ; LOGGER . debug ( "Hash filled in : {}" , SAXProcessor . timeToString ( saxEnd . getTime ( ) , hashEnd . getTime ( ) ) ) ; DiscordRecords discords = getDiscordsWithHash ( series , windowSize , hash , discordsNumToReport , markerAlgorithm , nThreshold ) ; Date end = new Date ( ) ; LOGGER . info ( "{} discords found in {}" , discords . getSize ( ) , SAXProcessor . timeToString ( start . getTime ( ) , end . getTime ( ) ) ) ; return discords ; }
Old implementation . Nearest neighbot for a candidate subsequence is searched among all other time - series subsequences regardless of their exclusion by EXACT or MINDIST . This also accepts a marker implementation which is responsible for marking a segment as visited .