Skip to content

FeatureBased: plot_feature_3d plots feature 2 on the z-axis; second 3D plot has mismatched axis labels #18

Description

@jonfroehlich

Found in the #16 correctness/prose/comments audit (verified against plot_feature_3d's source).

Two related bugs in the 3D feature-exploration plots in GestureRecognizer-FeatureBased.ipynb.

1. plot_feature_3d never plots the third feature. In the helper (cell defining plot_feature_1d/2d/3d):

x = list(extract_feature_func1(trial.accel) for trial in trials)
y = list(extract_feature_func2(trial.accel) for trial in trials)
z = list(extract_feature_func2(trial.accel) for trial in trials)   # <-- BUG: func2, should be func3

extract_feature_func3 is accepted as a parameter but never used, so the z-axis duplicates the y-axis — every "3D" scatter is secretly 2D-on-a-diagonal. Fix: z = list(extract_feature_func3(trial.accel) for trial in trials).

2. Mislabeled axes in the second 3D call. The cell plotting std_mag, max_mag, num_peaks_mag_p passes axis labels copied from the previous cell:

plot_feature_3d(selected_gesture_set, extract_feature_std_mag, extract_feature_max_mag, extract_feature_num_peaks_mag_p,
                xlabel="top_mag_freq2", ylabel="max_mag", zlabel="std_mag", ...)   # <-- labels don't match the data

The title ("Std mag vs. max mag vs. num peaks mag_p") is right, but the labels should be xlabel="std_mag", ylabel="max_mag", zlabel="num_peaks_mag_p".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions