INNER CODE UNIT · Python

get_max_entropy_distribution

idealo/image-quality-assessment · data/TID2013/get_labels.py:17

def get_max_entropy_distribution(mean):
    SAMPLESPACE = np.arange(10)
    features = get_features()

    model = MinDivergenceModel(features, samplespace=SAMPLESPACE, algorithm='CG')

    # set the desired feature expectations and fit the model
    X = np.array([[mean]])
    model.fit(X)

    return model.probdist()


def get_dataframe(mean_raw_file):
    df = pd.read_csv(mean_raw_file, header=None, sep=' ')
    df.columns = ['mos', 'id']
    return df

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…