Visualisation¶
Dendrograms and Waveforms¶
A workflow for clustering continuous time series with a deep scattering network.
[1]:
from scatcluster.scatcluster import config_load
SC_json_file = "/Users/christopher.zerafa/Downloads/scatcluster_run/config/MN_AQU_*_3600_3600_100_4_4_2_7_1_1_avg.json"
SC = config_load(SC_json_file, verbose=False)
ScatCluster config loaded:
{
"data_savepath": "/Users/christopher.zerafa/Downloads/scatcluster_run/",
"data_client_path": "/Users/christopher.zerafa/Downloads/sds/",
"data_network": "MN",
"data_station": "AQU",
"data_location": "*",
"data_channel": "*",
"data_sample_starttime": "2022-01-01T00:00",
"data_sample_endtime": "2022-01-01T02:00",
"data_starttime": "2022-01-01T00:00",
"data_endtime": "2022-01-03T00:00",
"data_exclude_days": [],
"network_segment": 3600,
"network_step": 3600,
"network_sampling_rate": 100,
"network_banks": [
{
"octaves": 4,
"resolution": 4,
"quality": 2
},
{
"octaves": 7,
"resolution": 1,
"quality": 1
}
],
"network_pooling": "avg",
"ica_ev_limit": 0.99,
"ica_min_ICAs": 9,
"ica_max_ICAs": 10,
"ica_overwrite_previous_models": false,
"dendrogram_method": "ward",
"waveforms_n_samples": 5
}
Load precomputed ICA¶
[2]:
SC.preload_ICA(num_ICA=10)
Compressed Vectorised Scat. Coefficients Array after ICA : (48, 10)
Dendrograms¶
[3]:
SC.preload_linkage()
[4]:
SC.single_dendrogram(n_clusters=4,
print_predictions=False)
[5]:
SC.range_dendrograms(dendrogram_start=4, dendrogram_end=6)
Waveforms¶
[6]:
SC.preload_dendrogram_linkage(n_clusters = 4)
SC.plot_waveforms_per_cluster(clusters=[1, 3])
[7]:
SC.plot_all_waveforms()
ICA Contributions¶
[8]:
SC.plot_ica_contribution()
Identify cluster from time window¶
[9]:
SC.identify_predicted_cluster_from_time_window('2022-01-1 11:30:00')
[9]:
4