import os
import sys
import glob
import math
import random
import numpy as np
import pandas as pd
import scipy.ndimage as nd
from scipy.ndimage import zoom
# from keras.utils import to_categorical

from matplotlib import pyplot as plt
def GenerateRatios(info,idx):
    values = []
    for val in info:
        if ',' in val[idx]:
            continue
        else:
            if float(val[idx]) not in cls_map_dict.keys():
                continue
            values.append(cls_map_dict[float(val[idx])])
    counts = Counter(values)
    counts = [counts[key]/float(len(info)) for key in sorted(counts.keys())]
    return counts
