def make_selection(self, use_all_notes=False, refresh_user_data=True): self.refresh_user_data = refresh_user_data self.use_all_notes = use_all_notes self.all_notes = [x for x in note_mapping if x['clef'] in self.clef] if self.use_all_notes: self.selection = self.all_notes else: try: u = User_data('45') u.get_data(self.refresh_user_data) u.calc_hitrate() u.get_bad_performance() u.make_selection(self.all_notes) self.selection = u.selection except: print ('Couldn\'t load user data') print ('using all notes') self.selection = self.all_notes else: print ('Using only notes with poor user performance') return u
def make_selection(self, use_all_notes=False, refresh_user_data=True): self.refresh_user_data = refresh_user_data self.use_all_notes = use_all_notes self.all_notes = [x for x in note_mapping if x['clef'] in self.clef] if self.use_all_notes: self.selection = self.all_notes else: try: u = User_data('45') u.get_data(self.refresh_user_data) u.calc_hitrate() u.get_bad_performance() u.make_selection(self.all_notes) self.selection = u.selection except: print('Couldn\'t load user data') print('using all notes') self.selection = self.all_notes else: print('Using only notes with poor user performance') return u
import pandas as pd import matplotlib as plt from ggplot import * from use_user_history import User_data #plt.style.use('ggplot') #p = ggplot(aes(x='new', y='perc'), data=h) + geom_bar() #p = ggplot(aes(x='', y='rt', fill='note'), data=Processing.data) u = User_data('45') u.get_data() u.calc_hitrate() u.get_bad_performance()