mattharrison / ml_pocket_reference

Resources for Machine Learning Pocket Reference
238 stars 136 forks source link

ch07.ipynb Cell #10 #3

Closed SSJUSA closed 3 years ago

SSJUSA commented 4 years ago

ch07.ipynb Cell #10 ModuleNotFoundError: No module named 'fastai.structured' 1 X3 = X2.copy() ----> 2 from fastai.structured import scale_vars 3 scale_vars(X3, mapper=None) 4 X3.std() 5 X3.mean()

mattharrison commented 3 years ago

Fastai removed this feature :(

SSJUSA commented 3 years ago

Chapter 18, Cell 8 is giving the following error.

Thanks, SSJ

TypeError Traceback (most recent call last) in 2 fig, ax = plt.subplots(figsize=(6, 4)) 3 dend = hierarchy.dendrogram(----> 4 hierarchy.linkage(X_std, method="ward") 5 ) 6

fig.savefig("images/mlpr_1804.png", dpi=300)

C:\ProgramData\Anaconda3\lib\site-packages\scipy\cluster\hierarchy.py in dendrogram(Z, p, truncate_mode, color_threshold, get_leaves, orientation, labels, count_sort, distance_sort, show_leaf_counts, no_plot, no_labels, leaf_font_size, leaf_rotation, leaf_label_func, show_contracted, link_color_func, ax, above_threshold_color) 3273 print(np.asarray(Z, order='c').shape) 3274 print(labels is not None)-> 3275 print(Z.shape[0] + 1, len(labels)) 3276 print(Z.shape[0] + 1 != len(labels)) 3277 print(labels is not None and Z.shape[0] + 1 != len(labels)) TypeError: object of type 'NoneType' has no len()