I have the following data generated using:
from scipy.stats import skewnorm
import matplotlib.pyplot as plt
import numpy as np
numValues = 10000
maxValue = 100
skewness = -5
data = skewnorm.rvs(a = skewness,loc=maxValue, size=numValues)
for guassian model, I have calculated the AIC from below:
from sklearn.mixture import GaussianMixture
gmm = GaussianMixture(n_components = 1).fit(X=np.expand_dims(data,1))
gmm_aic = gmm.aic(X=np.expand_dims(data,1))
gmm_bic = gmm.bic(X=np.expand_dims(data,1))
for lognormal model, I took the logarithm of data and fitted a guassian from below:
log_gmm = GaussianMixture(n_components = 1).fit(X=np.expand_dims(np.log(data),1))
and calculated AIC for this model on the data and not on np.log(data)
log_gmm_aic = log_gmm.aic(X=np.expand_dims(data,1))
log_gmm_bic = log_gmm.bic(X=np.expand_dims(data,1))
This way, my AIC and BIC values in both the cases are:
Guassian - AIC: 18790.27 BIC:18804.69
lognormal - AIC: 2231500479614.06 BIC:2231500479628.48
The values seem incomparable. What am I doing wrong if I want to calculate lognormal model's AIC and BIC?