-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distance-based Features #5
Comments
Implementation def extract_distance(x):
feature_name = lambda s, x: f"{s}_{str(x).zfill(2)}"
coor = np.argwhere(x==2)-(np.array(x.shape)//2)
radius = np.linalg.norm(coor, ord=2, axis=1)
dist = {}
# polar accumulate
dist_y, _ = np.histogram(radius)
dist_x = np.linspace(1, dist_y.size, dist_y.size)
dist_interpolate = interp1d(dist_x, dist_y, kind='cubic')
new_dist_x = np.linspace(1, dist_y.size, 20)
new_dist_y = dist_interpolate(new_dist_x)/np.linspace(1, new_dist_x.size, new_dist_x.size)
for i in range(20):
dist[feature_name('dist_value', i+1)] = new_dist_y[i]
dist[feature_name('dist', 'mean')] = np.mean(new_dist_y)
dist[feature_name('dist', 'std')] = np.std(new_dist_y)
dist[feature_name('dist', 'max')] = np.max(new_dist_y)
dist[feature_name('dist', 'min')] = np.min(new_dist_y)
dist[feature_name('dist', 'argmax')] = np.argmax(new_dist_y)
dist[feature_name('dist', 'argmin')] = np.argmin(new_dist_y)
return pd.Series(dist) |
Evaluation Control: Density-based + Radon-based + Geometry-based Experiment: Density-based + Radon-based + Geometry-based + *Distance-based |
Analysis Showed minor improvement in all estimators and major improvement on the logistic regression classifier. |
제 결과표(Evaluation)에 위의 Evaluation을 포함하여 적도록 하겠습니다 |
Align the failure points according to their Euclidean distance from the center. Then extract following features:
Altogether 26 features were extracted.
The text was updated successfully, but these errors were encountered: