![]() Jtplot.style(context='poster', fscale=1.4, spines=False, gridlines='-')įrom blackjacksim.data import DefaultGameConfig # Loop over data dimensions and create text annotations.Ĭolor="white" if cm > thresh else "black")Ĭomparison of House Rules from blackjacksim.simulations import Game Plt.setp(ax.get_xticklabels(), rotation=45, ha="right", # Rotate the tick labels and set their alignment. Xticklabels=classes, yticklabels=classes, ![]() and label them with the respective list entries Im = ax.imshow(cm, interpolation='nearest', cmap=cmap)Ĭax = divider.append_axes("right", size="5%", pad=0.05) Print('Confusion matrix, without normalization') ![]() #classes = classesĬm = cm.astype('float') / cm.sum(axis=1) # Only use the labels that appear in the data Title = 'Confusion matrix, without normalization' Normalization can be applied by setting `normalize=True`. This function prints and plots the confusion matrix. Tools from trics import confusion_matrixįrom import unique_labelsįrom mpl_toolkits.axes_grid1 import make_axes_locatableĭef plot_confusion_matrix(y_true, y_pred, classes, If you want to try it the code is linked above or if you want to run blackjacksim directly install it with: pip3 install git+ It was a neat project that really hits home that even if you can count cards perfectly…the deck isn’t stacked in your favor. I worked with Gukyeong Kwon and Jinsol Lee on this project for our Convex Optimization course.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |