3it-inpaqt / line-classification-slope

Classification task from experimental charge stability diagrams to recognize angles of lines.
0 stars 0 forks source link

Resampling data #8

Closed ChrisZeThird closed 1 year ago

ChrisZeThird commented 1 year ago

As shown in issue #7 the angles are not well distributed with a strong imbalance for angles between 0.41 and 0.48. This issue explores resampling for better training. image

ChrisZeThird commented 1 year ago

Average is 0.424: The network learns by heart and it learns the average value.

ChrisZeThird commented 1 year ago

Method to find angle occurrence:

# Find angle occurrence
unique_angles, counts = np.unique(np.around(angle_list, 3), return_counts=True)
stat = [(angle, count) for angle, count in zip(unique_angles, counts) if count > threshold]

Can be useful.

ChrisZeThird commented 1 year ago

Resampling is successful, still need to test to train the network on it. image

ChrisZeThird commented 1 year ago

Results on training and testing

MSE is now bigger than before

image

Resampling not enough to avoid network to learn by heart

image

ChrisZeThird commented 1 year ago

Experimenting with parameters

MSE still at 0.01: image

Changed the parameter for resampling: image

Network still learns by heart: image

ChrisZeThird commented 1 year ago

I can't resample too much otherwise I won't have enough data to train the network on. Need to explore other issues.