670. NeurIPS - Ariel Data Challenge 2025 | ariel-data-challenge-2025
基于物理的波长预测与基于机器学习的 Sigma 预测
我要感谢 Kaggle 和伦敦大学学院举办这次比赛。我学到了很多,这真是一次激动人心的经历。
mask_hot_dead 函数。remove_outlier 函数使用局部均值修改数据中的异常值。remove_outlier 函数的效果可以在下图中确认。def remove_outlier(data, window = 100, threshold = 5.0):
df = pd.DataFrame(data)
mean = df.rolling(window = window, center = True, min_periods = 1).mean()
std = df.rolling(window = window, center = True, min_periods = 1).std()
mask = (df - mean).abs() > (threshold * std)
df[mask] = mean[mask]
data = df.to_numpy()
return data
least_squares 对所有通道进行全局拟合,参数包括:rp, c1, c2, c3, c4, P, sma, i, t0。jac_sparsity 以预定义参数相关性并加速收敛。with Pool(processes = os.cpu_count()) as pool:
res = least_squares(
fun = fun,
x0 = x0,
bounds = bounds,
method = 'trf',
jac_sparsity = jac_sparsity,
args = (time, star_info, param_info, targets),
workers = pool.map,
verbose = 2 if plot else 0,
)
np.linspace(5e-5, 2e-3, 500) 计算。inputs = np.concatenate([
T,
T[:, 3:4] - T[:, 0:1],
T[:, 2:3] - T[:, 1:2],
rp[:, :-1].mean(1, keepdims = True),
c1[:, :-1].mean(1, keepdims = True),
c2[:, :-1].mean(1, keepdims = True),
c3[:, :-1].mean(1, keepdims = True),
c4[:, :-1].mean(1, keepdims = True),
rp[:, :-1].std(1, keepdims = True),
c1[:, :-1].std(1, keepdims = True),
c2[:, :-1].std(1, keepdims = True),
c3[:, :-1].std(1, keepdims = True),
c4[:, :-1].std(1, keepdims = True),
cost,
nfev,
star_info.values,
], axis = 1)