September 2019
Intermediate to advanced
420 pages
10h 29m
English
By referring to the following steps, you will be able to visualize conditional probabilities:
In [18]: def plot_proba(model, X_test, y_test):... # create a mesh to plot in... h = 0.02 # step size in mesh... x_min, x_max = X_test[:, 0].min() - 1, X_test[:, 0].max() + 1... y_min, y_max = X_test[:, 1].min() - 1, X_test[:, 1].max() + 1... xx, yy = np.meshgrid(np.arange(x_min, x_max, h),... np.arange(y_min, y_max, h))
... X_hypo = np.column_stack((xx.ravel().astype(np.float32), ...
Read now
Unlock full access