# -*- coding: utf-8 -*-
from numpy import *
from numpy.random import *
from scipy.fftpack import *
import matplotlib.pyplot as plt

# сравнение количества коэффициэнтов для Kmeans
# tree = 100, max_depth = 50
a = [[13,72.8],
    [14,77.9],
    [15,81],
    [16,84.1],
    [17,86.7],
    [18,87.9],
    [19,88.6],
    [20,90],
    [21,90.5],
    [22,92],
    [23,92.7],
    [24,93.6],
    [25,92.8],
    [26,94.8],
    [27,93.9],
    [28,93.5],
    [29,93.9]]

#сравнение количества деревьев для vecaver
#max_depth = 50, MFCC=13
a = [[10,58.4,99.7],
    [20,65.0,99.9],
    [30,68.6,100],
    [40,68.3,99.9],
    [50,69.7,100],
    [60,70.5,100],
    [70,72.5,100],
    [80,71.6,100],
    [90,70.6,100],
    [100,71.9,100]]


#сравнение количества деревьев для kmeans
#max_depth = 50, MFCC=13
a = [[10,66.5],
    [20,74.8],
    [30,76.9],
    [40,79.2],
    [50,80.9],
    [60,82.1],
    [70,83.2],
    [80,84],
    [90,83],
    [100,83.7]]


#сравнение максимальной глубины для kmeans
#trees = 100, MFCC=13
a = [[5,42.1, 48.5],
    [10,66.9,87.2],
    [15,76.8,99.1],
    [20,80,99.9],
    [25,82.1,100],
    [30,81.2,100],
    [35,80.1,100],
    [40,81.6,100],
    [45,81.8,100]]



#сравнение максимальной глубины для vecaver
#trees = 100, MFCC=13
a = [[5,44.1,48.8],
    [10,62.6,83],
    [15,69.1,99.4],
    [20,70.8,100],
    [25,71.2,100],
    [30,69.3,100],
    [35,69.4,100],
    [40,69.7,100],
    [45,69.6,100]]


#сравнение количества деревьев для vecaver
#max_depth = 50, MFCC=13, measure_quality_of_split=gini
a = [[10,58],
    [20,63.5],
    [30,68.3],
    [40,68.1],
    [50,68.8],
    [60,70.3],
    [70,70.1],
    [80,73.3],
    [90,73.1],
    [100,72.2]]


#сравнение количества деревьев для vecaver
#max_depth = 50, MFCC=13, measure_quality_of_split=entropy
a = [[10,55.7],
    [20,63.1],
    [30,63.5],
    [40,67.5],
    [50,67.5],
    [60,68.9],
    [70,68.2],
    [80,68.1],
    [90,69.3],
    [100,69.5]]


#сравнение количества кластеров для kmeans
#tree=100, max_depth = 50, MFCC=26
a = [[1,94],
    [2,95],
    [3,91.7],
    [4,84.7],
    [5,77.3],
    [6,73],
    [7,67.8],
    [8,65.5],
    [9,60.2]]


#сравнение количества деревьев для других оптимальных характеристик
#max_depth = 25, MFCC=26, kmeans-2
a = [[10,76.2],
    [20,86.2],
    [30,89.7],
    [40,91.6],
    [50,93.8],
    [60,92.6],
    [70,93.7],
    [80,94.1],
    [90,95],
    [100,95.5],
    [110,95.4],
    [120,95.3],
    [130,95.2],
    [140,95.1],
    [150,95.7]]


#сравнение количества деревьев для других оптимальных характеристик
#сравнение пола
#max_depth = 25, MFCC=26, kmeans-2
a = [[10,98.2],
    [20,97.9],
    [30,98.3],
    [40,98.7],
    [50,98.5],
    [60,98.5],
    [70,98.6],
    [80,98.6],
    [90,98.7],
    [100,98.7]]


#сравнение количества деревьев для других оптимальных характеристик
#сравнение возраста
#max_depth = 25, MFCC=26, kmeans-2
a = [[10,73.5],
    [20,77.6],
    [30,79.6],
    [40,81.2],
    [50,82.4],
    [60,82.0],
    [70,82.8],
    [80,82.4],
    [90,82.5],
    [100,81.9]]

#сравнение количества деревьев для других оптимальных характеристик
#сравнение акцент
#max_depth = 25, MFCC=26, kmeans-2
a = [[10,75.9],
    [20,80.5],
    [30,83.5],
    [40,83.9],
    [50,83.7],
    [60,83.9],
    [70,83.3],
    [80,84.1],
    [90,85.2],
    [100,84.9]]


#сравнение количества деревьев для других оптимальных характеристик
#сравнение регион
#max_depth = 25, MFCC=26, kmeans-2
a = [[10,75],
    [20,83.5],
    [30,88.8],
    [40,89.9],
    [50,91.2],
    [60,91.1],
    [70,92.9],
    [80,93.5],
    [90,92.9],
    [100,93.1]]


aparam=[]
ares=[]
aerr=[]

for an in b:
    aparam.append(an[0])
    ares.append(an[1])

print aparam, ares
plt.plot(aparam,ares)
plt.xlabel('Number of trees')
plt.ylabel('Identification percentage')
plt.text(15,90,'supervec=vecaver\nmax_depth=50\nMFCCs=13\nmeasure_quality_of_split=entropy')
#plt.legend()
plt.show()

