Normalize neural base inputs with frozen learning-pool statistics

This commit is contained in:
Frank14f committed 2026-11-14 22:59:46 +08:00
1 parent bb09e8e164
commit f3532962b0
10 files changed
+326 -15

No files matched your search

+3 -2
View File
@@ -145,10 +145,11 @@ def r2_features(points, tets, wall_distance, gate, t_set):
BASE_COLUMNS = ("x_star", "y_star", "z_star", "d_over_t", "gate_distance_over_Rg",
"geodesic_over_Rg", "Rg", "volume", "t_part", "t_set")
"geodesic_over_Rg", "log_Rg", "log_volume", "log_t_part", "log_t_set")
def base_features(points, wall_distance, geodesic_distance, gate, center, rg, volume, t_part, t_set):
"""Ten columns before learning-pool standardisation; scales use natural log."""
x = finite_array(points, name="points")
if x.ndim != 2 or x.shape[1] != 3 or not len(x):
raise ValueError("invalid node coordinates")
@@ -159,7 +160,7 @@ def base_features(points, wall_distance, geodesic_distance, gate, center, rg, vo
if np.any(scales <= 0) or np.any(dw < 0) or np.any(dg < 0):
raise ValueError("nonpositive scale or negative distance")
return np.column_stack([(x-center)/rg, dw/t_part, np.linalg.norm(x-gate, axis=1)/rg,
dg/rg, np.tile(scales, (len(x), 1))])
dg/rg, np.tile(np.log(scales), (len(x), 1))])
def histgbrt_grid():