This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [a_out, b_out]=dl_kelo(varargin) | |
% DL_KELO Mean of the diagonal line lengths and their distribution - | |
% Correction for border lines: KEep LOngest diagonal line (kelo) | |
% A=dl_kelo(X) computes the mean of the length of the diagonal | |
% line structures in a recurrence plot X. In this correction, just the | |
% longest border line (in each triangle) of the RP is counted. All other | |
% border lines are discarded. | |
% | |
% A=dl_kelo(X,'semi') computes the mean of the length of the diagonal | |
% line structures in a recurrence plot X using the mentionded correction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [X_new,dl_new] = rp_diagonal(varargin) | |
% RP_DIAGONAL RP with corrected lines ... | |
% | |
% [RP_new, dl_new] = rp_diagonal(RP) | |
% computes a new recurrence plot 'RP_new' by altering diagonal line structures | |
% in the input recurrence plot 'RP': Slubs, but also block structures, | |
% are deleted in favour of the longest diagonal lines (skeletonization). | |
% Whenever a diagonal line (starting with the longest lines contained in | |
% the diagonal line length histogram) encounters an adjacent diagonal | |
% line, this adjacent line and - recursively - all its consecutive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### exercise 4 2te teil | |
language, text = hamlets.iloc[0] | |
counted_text = count_words_fast(text) | |
data = pd.DataFrame({ | |
"word": list(counted_text.keys()), | |
"count": list(counted_text.values()) | |
}) |