-
Notifications
You must be signed in to change notification settings - Fork 441
Description
Belongs under Question tag
I am working with some Mean Sea Level Pressure ('pmsl' in the original 4km HRRR NetCDF) data for a region over the midwest and I have a working SOM, but my Quantization Errors (QE) are very large ~67.0 while my Topographic Errors are lower (or at least more typical) ~0.03. Additionally my learning curve doesn't match the typical shape either. I was wondering if anyone has run into this before for SOMs using weather/climate data?
The best idea I have relates to my sample size (only 56 days, and inputs into the SOM), that each are flattened from 420x444 to 'input_len=186480'. Which is probably an oddly shaped SOM? Increasing SOM dimensions reduces QE as expected but since our dataset is quite small this is not the most desirable solution.
I'm still relatively new to SOMs so I was curious if I was missing some known SOM best practices or am overlooking something.
# Scale the data for input into SOM
scaler = MinMaxScaler()
pmsl_data_scaled = scaler.fit_transform(pmsl_data)
# SOM Hyperparemeters
som_map = (3,3)
x,y = som_map
sigma = np.sqrt(x**2 + y**2)
learning_rate = .3
ngb_function = 'gaussian'
decay_function = 'linear_decay_to_zero'
sigma_decay_function = 'linear_decay_to_one'
init = 'random' #'random' # 'pca'
train = 'batch'
iterations = 2000
topology = 'hexagonal' # could also be retangular
activation_distance = 'euclidean'
X=np.array(pmsl_data_scaled)
input_len=X.shape[1]
# create som
som = MiniSom(x=x,y=y,input_len=input_len,
sigma=sigma,learning_rate=learning_rate,
neighborhood_function=ngb_function,
topology=topology,
decay_function=decay_function,
sigma_decay_function=sigma_decay_function,
activation_distance=activation_distance,
random_seed=64)

