Example #1
0
def compare_clement():
    """
  Comparaison des attributs de Clément avec ceux que j'ai recalculés.
  """

    from options import MultiOptions
    opt = MultiOptions()
    opt.opdict['channels'] = ['Z']

    # Mes calculs
    opt.opdict['feat_list'] = ['Dur', 'AsDec', 'RappMaxMean', 'Kurto', 'KRapp']
    opt.opdict['feat_log'] = ['AsDec', 'RappMaxMean', 'Kurto']
    #opt.opdict['feat_list'] = ['Ene']
    #opt.opdict['feat_log'] = ['Ene']
    opt.do_tri()
    opt.x = opt.xs[0]
    opt.y = opt.ys[0]
    opt.x.columns = opt.opdict['feat_list']
    opt.compute_pdfs()
    my_gauss = opt.gaussians

    if 'Kurto' in opt.opdict['feat_list'] and 'RappMaxMean' in opt.opdict[
            'feat_list']:
        fig = plt.figure()
        fig.set_facecolor('white')
        plt.plot(np.log(opt.x.Kurto), np.log(opt.x.RappMaxMean), 'ko')
        plt.xlabel('Kurto')
        plt.ylabel('RappMaxMean')
        plt.show()

    # Les calculs de Clément
    #opt.opdict['feat_list'] = ['Dur','AsDec','RappMaxMean','Kurto','Ene']
    opt.opdict['feat_log'] = []
    opt.opdict['feat_train'] = 'clement_train.csv'
    opt.opdict['feat_test'] = 'clement_test.csv'
    opt.do_tri()
    opt.x = opt.xs[0]
    opt.y = opt.ys[0]
    opt.compute_pdfs()

    # Trait plein --> Clément
    # Trait tireté --> moi
    opt.plot_superposed_pdfs(my_gauss, save=False)
Example #2
0
def compare_clement():
  """
  Comparaison des attributs de Clément avec ceux que j'ai recalculés.
  """

  from options import MultiOptions
  opt = MultiOptions()
  opt.opdict['channels'] = ['Z']

  # Mes calculs
  opt.opdict['feat_list'] = ['Dur','AsDec','RappMaxMean','Kurto','KRapp']
  opt.opdict['feat_log'] = ['AsDec','RappMaxMean','Kurto']
  #opt.opdict['feat_list'] = ['Ene']
  #opt.opdict['feat_log'] = ['Ene']
  opt.do_tri()
  opt.x = opt.xs[0]
  opt.y = opt.ys[0]
  opt.x.columns = opt.opdict['feat_list']
  opt.compute_pdfs()
  my_gauss = opt.gaussians

  if 'Kurto' in opt.opdict['feat_list'] and 'RappMaxMean' in opt.opdict['feat_list']:
    fig = plt.figure()
    fig.set_facecolor('white')
    plt.plot(np.log(opt.x.Kurto),np.log(opt.x.RappMaxMean),'ko')
    plt.xlabel('Kurto')
    plt.ylabel('RappMaxMean')
    plt.show()

  # Les calculs de Clément
  #opt.opdict['feat_list'] = ['Dur','AsDec','RappMaxMean','Kurto','Ene']
  opt.opdict['feat_log'] = []
  opt.opdict['feat_train'] = 'clement_train.csv'
  opt.opdict['feat_test'] = 'clement_test.csv'
  opt.do_tri()
  opt.x = opt.xs[0]
  opt.y = opt.ys[0]
  opt.compute_pdfs()

  # Trait plein --> Clément
  # Trait tireté --> moi
  opt.plot_superposed_pdfs(my_gauss,save=False)