|
import json |
|
import matplotlib.pyplot as plt |
|
|
|
|
|
file_path = 'reazonspeech-all-wada-snr.json' |
|
with open(file_path, 'r', encoding='utf-8') as file: |
|
data = json.load(file) |
|
|
|
|
|
snr_values = [item['SNR値'] for item in data] |
|
|
|
|
|
plt.figure(figsize=(8, 6)) |
|
plt.hist(snr_values, bins=200, edgecolor='black') |
|
plt.xlabel('SNR value') |
|
plt.ylabel('Number of occurrences') |
|
plt.title('Histogram of SNR values') |
|
plt.grid(True) |
|
|
|
|
|
output_path = 'histogram_snr_values.png' |
|
plt.savefig(output_path) |
|
print(f"Histogram image saved as: {output_path}") |
|
|
|
count_snr_above_100 = sum(1 for item in data if item['SNR値'] >= 100) |
|
|
|
print(f"SNR値が100以上のデータの数: {count_snr_above_100}") |