异常值检测与清洗:从统计方法到机器学习实战指南
最近看到一则关于数学界人才流动的讨论让我想到技术领域其实也存在类似的人才培养与流动现象。作为技术从业者我们更关注的是如何在实际开发中提升技能、解决实际问题。今天就来分享一个在数据处理和算法开发中经常遇到的技术主题——如何高效处理大规模数据集中的异常值检测与清洗。无论是数据分析师、算法工程师还是后端开发者在实际项目中都会面临数据质量问题的挑战。异常值不仅影响模型训练效果还可能导致业务决策偏差。本文将完整介绍从基础概念到实战应用的全流程包含多种场景下的代码示例和工程实践帮助大家构建完整的数据质量控制方案。1. 异常值检测的核心概念1.1 什么是异常值异常值Outlier是指数据集中与其他观测值显著不同的数据点。在统计学中异常值可能是由于测量误差、数据录入错误或真实但罕见的事件导致的。从技术角度来说异常值检测的目标是识别那些与数据整体分布模式不一致的观测值。在实际业务场景中异常值可能表现为电商平台的异常交易金额如远超正常范围的订单物联网设备的传感器读数异常如温度传感器突然飙升用户行为数据的异常模式如短时间内频繁操作1.2 异常值检测的重要性异常值检测在数据预处理阶段至关重要主要原因包括数据质量保障异常值会影响数据的统计特征如均值、方差等进而影响后续分析和建模的准确性。模型性能优化机器学习模型对异常值敏感特别是基于距离的算法如KNN、聚类算法和基于梯度下降的优化算法。业务风险识别在风控、安全等领域异常值往往对应着潜在的风险事件如欺诈交易、系统故障等。1.3 常见异常值类型根据数据特征和业务场景异常值可以分为以下几种类型点异常单个数据点与整体分布明显不同。例如在正常体温数据中突然出现60度的记录。上下文异常在特定上下文环境下才表现为异常。例如夏季35度是正常温度但出现在冬季就是异常。集体异常一组数据点集体表现为异常模式。例如网络攻击中的DDoS攻击流量模式。2. 环境准备与工具选择2.1 基础环境配置在进行异常值检测前需要准备合适的开发环境。以下是一个推荐的Python环境配置# 环境要求Python 3.8 # 推荐使用Anaconda或Miniconda进行环境管理 # 创建虚拟环境 conda create -n outlier-detection python3.8 conda activate outlier-detection # 安装核心依赖包 pip install numpy1.21.0 pip install pandas1.3.0 pip install scikit-learn1.0.0 pip install matplotlib3.4.0 pip install seaborn0.11.0 pip install scipy1.7.02.2 工具库选择依据不同的异常值检测算法适用于不同场景选择合适的工具库很重要统计分析使用Scipy和Statsmodels进行传统的统计检验机器学习使用Scikit-learn提供的多种异常检测算法可视化分析使用Matplotlib和Seaborn进行数据分布可视化深度学习对于复杂模式可以使用PyTorch或TensorFlow实现自编码器等深度检测模型2.3 项目结构规划一个完整的异常值检测项目通常包含以下模块project/ ├── data/ # 数据目录 │ ├── raw/ # 原始数据 │ └── processed/ # 处理后的数据 ├── src/ # 源代码 │ ├── detection/ # 检测算法 │ ├── utils/ # 工具函数 │ └── config.py # 配置文件 ├── tests/ # 测试用例 └── notebooks/ # Jupyter笔记本3. 基础统计检测方法3.1 3σ原则三倍标准差法3σ原则是最经典的异常值检测方法基于正态分布假设。对于服从正态分布的数据99.7%的数据点落在均值±3个标准差的范围内。import numpy as np import pandas as pd from scipy import stats def three_sigma_detection(data, threshold3): 基于3σ原则的异常值检测 if isinstance(data, pd.Series): data data.values mean_val np.mean(data) std_val np.std(data) # 计算上下边界 lower_bound mean_val - threshold * std_val upper_bound mean_val threshold * std_val # 识别异常值 outliers (data lower_bound) | (data upper_bound) outlier_indices np.where(outliers)[0] outlier_values data[outliers] return { outlier_indices: outlier_indices, outlier_values: outlier_values, bounds: (lower_bound, upper_bound), mean: mean_val, std: std_val } # 示例使用 sample_data np.random.normal(0, 1, 1000) # 故意添加一些异常值 sample_data[100] 10 sample_data[200] -8 result three_sigma_detection(sample_data) print(f检测到异常值数量: {len(result[outlier_indices])}) print(f异常值索引: {result[outlier_indices]}) print(f异常值: {result[outlier_values]})3.2 箱线图法IQR方法箱线图法不依赖于正态分布假设更适合偏态分布的数据def iqr_detection(data, multiplier1.5): 基于四分位距的异常值检测 q1 np.percentile(data, 25) q3 np.percentile(data, 75) iqr q3 - q1 lower_bound q1 - multiplier * iqr upper_bound q3 multiplier * iqr outliers (data lower_bound) | (data upper_bound) outlier_indices np.where(outliers)[0] outlier_values data[outliers] return { outlier_indices: outlier_indices, outlier_values: outlier_values, bounds: (lower_bound, upper_bound), quartiles: (q1, q3), iqr: iqr } # 实际应用示例 def comprehensive_statistical_detection(df, numerical_columns): 综合统计方法检测多列数值型数据的异常值 results {} for col in numerical_columns: col_data df[col].dropna() # 3σ检测 sigma_result three_sigma_detection(col_data) # IQR检测 iqr_result iqr_detection(col_data) results[col] { sigma_method: sigma_result, iqr_method: iqr_result, data_stats: { mean: np.mean(col_data), median: np.median(col_data), std: np.std(col_data), min: np.min(col_data), max: np.max(col_data) } } return results3.3 统计检测的局限性传统统计方法虽然简单有效但存在一些局限性分布假设3σ方法假设数据服从正态分布现实数据往往不符合敏感性对极端值敏感单个异常值可能影响整体检测效果多变量问题难以处理多变量之间的相关性模式识别无法检测集体异常和上下文异常4. 机器学习检测方法4.1 孤立森林Isolation Forest孤立森林基于异常值更容易被隔离的原理适合高维数据集from sklearn.ensemble import IsolationForest from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt def isolation_forest_detection(X, contamination0.1, random_state42): 使用孤立森林进行异常值检测 # 数据标准化 scaler StandardScaler() X_scaled scaler.fit_transform(X) # 训练模型 iso_forest IsolationForest( contaminationcontamination, random_staterandom_state, n_estimators100 ) outliers iso_forest.fit_predict(X_scaled) # -1表示异常值1表示正常值 outlier_indices np.where(outliers -1)[0] normal_indices np.where(outliers 1)[0] return { outlier_indices: outlier_indices, normal_indices: normal_indices, model: iso_forest, scaler: scaler } # 示例二维数据异常检测 def demonstrate_isolation_forest(): # 生成示例数据 np.random.seed(42) normal_data np.random.randn(300, 2) outlier_data np.random.uniform(-5, 5, (20, 2)) X np.vstack([normal_data, outlier_data]) # 检测异常值 result isolation_forest_detection(X) # 可视化结果 plt.figure(figsize(10, 6)) plt.scatter(X[result[normal_indices], 0], X[result[normal_indices], 1], cblue, label正常点) plt.scatter(X[result[outlier_indices], 0], X[result[outlier_indices], 1], cred, label异常点) plt.legend() plt.title(孤立森林异常检测结果) plt.xlabel(特征1) plt.ylabel(特征2) plt.show() return result4.2 局部异常因子LOFLOF算法考虑数据点的局部密度能有效检测局部异常from sklearn.neighbors import LocalOutlierFactor def lof_detection(X, n_neighbors20, contamination0.1): 使用局部异常因子算法进行检测 scaler StandardScaler() X_scaled scaler.fit_transform(X) lof LocalOutlierFactor( n_neighborsn_neighbors, contaminationcontamination ) outliers lof.fit_predict(X_scaled) outlier_scores lof.negative_outlier_factor_ outlier_indices np.where(outliers -1)[0] return { outlier_indices: outlier_indices, outlier_scores: outlier_scores, model: lof } # LOF参数调优示例 def optimize_lof_parameters(X, n_neighbors_list[5, 10, 20, 30]): 优化LOF算法的邻居参数 results {} for n_neighbors in n_neighbors_list: result lof_detection(X, n_neighborsn_neighbors) results[n_neighbors] { outlier_count: len(result[outlier_indices]), avg_score: np.mean(result[outlier_scores]) } return results4.3 基于聚类的异常检测使用聚类算法如DBSCAN进行异常检测from sklearn.cluster import DBSCAN def dbscan_outlier_detection(X, eps0.5, min_samples5): 使用DBSCAN聚类进行异常检测 scaler StandardScaler() X_scaled scaler.fit_transform(X) dbscan DBSCAN(epseps, min_samplesmin_samples) clusters dbscan.fit_predict(X_scaled) # 标签为-1的点被认为是异常值 outlier_indices np.where(clusters -1)[0] cluster_labels clusters return { outlier_indices: outlier_indices, cluster_labels: cluster_labels, n_clusters: len(set(clusters)) - (1 if -1 in clusters else 0) }5. 时间序列异常检测实战5.1 时间序列特征工程时间序列数据需要特殊的特征处理方法def create_time_series_features(series, window_size10): 为时间序列创建统计特征 features [] for i in range(len(series) - window_size 1): window series[i:iwindow_size] window_features { mean: np.mean(window), std: np.std(window), max: np.max(window), min: np.min(window), range: np.max(window) - np.min(window), trend: np.polyfit(range(len(window)), window, 1)[0] # 线性趋势 } features.append(window_features) return pd.DataFrame(features) # 季节性时间序列异常检测 def seasonal_time_series_detection(series, seasonal_period24): 处理具有季节性的时间序列 from statsmodels.tsa.seasonal import seasonal_decompose # 季节性分解 decomposition seasonal_decompose(series, periodseasonal_period) residual decomposition.resid.dropna() # 对残差进行异常检测 residual_features create_time_series_features(residual) # 使用孤立森林检测异常 detection_result isolation_forest_detection(residual_features.values) return { decomposition: decomposition, residual_features: residual_features, detection_result: detection_result }5.2 实时异常检测系统构建一个简单的实时异常检测流水线class RealTimeAnomalyDetector: 实时异常检测器 def __init__(self, window_size50, contamination0.05): self.window_size window_size self.contamination contamination self.data_buffer [] self.detector None def add_data_point(self, value, timestampNone): 添加新的数据点 data_point { value: value, timestamp: timestamp or pd.Timestamp.now(), is_anomaly: False, anomaly_score: 0.0 } self.data_buffer.append(data_point) # 保持窗口大小 if len(self.data_buffer) self.window_size: self.data_buffer.pop(0) # 当有足够数据时进行检测 if len(self.data_buffer) self.window_size: self._detect_anomalies() return data_point def _detect_anomalies(self): 检测当前窗口中的异常值 values np.array([point[value] for point in self.data_buffer]) # 提取特征 features self._extract_features(values) if self.detector is None: self.detector IsolationForest(contaminationself.contamination) labels self.detector.fit_predict(features.reshape(-1, 1)) else: labels self.detector.predict(features.reshape(-1, 1)) # 更新数据点的异常状态 for i, point in enumerate(self.data_buffer): point[is_anomaly] (labels[i] -1) point[anomaly_score] self.detector.decision_function( [[features[i]]])[0] def _extract_features(self, values): 提取时间序列特征 features [] # 简单特征当前值、移动平均、标准差等 if len(values) 5: features.append(values[-1]) # 当前值 features.append(np.mean(values[-5:])) # 近期均值 features.append(np.std(values[-5:])) # 近期波动 features.append(values[-1] - np.mean(values[-5:])) # 与均值的偏差 else: features.extend([values[-1]] * 4) return np.array(features) def get_recent_anomalies(self, n10): 获取最近的异常点 anomalies [point for point in self.data_buffer if point[is_anomaly]] return anomalies[-n:] # 使用示例 def demo_real_time_detection(): detector RealTimeAnomalyDetector(window_size30) # 模拟数据流 np.random.seed(42) for i in range(100): # 大部分正常数据偶尔插入异常 if i % 15 0: value np.random.normal(10, 2) # 异常 else: value np.random.normal(0, 1) # 正常 detector.add_data_point(value) anomalies detector.get_recent_anomalies() print(f检测到异常点数量: {len(anomalies)})6. 异常值处理策略6.1 异常值修正方法检测到异常值后需要根据业务场景选择合适的处理策略class OutlierProcessor: 异常值处理器 def __init__(self, strategycap, cap_methodiqr): self.strategy strategy self.cap_method cap_method def fit(self, data): 拟合数据计算处理参数 self.data_stats_ {} if self.cap_method iqr: q1 np.percentile(data, 25) q3 np.percentile(data, 75) iqr q3 - q1 self.lower_bound_ q1 - 1.5 * iqr self.upper_bound_ q3 1.5 * iqr elif self.cap_method sigma: mean_val np.mean(data) std_val np.std(data) self.lower_bound_ mean_val - 3 * std_val self.upper_bound_ mean_val 3 * std_val return self def transform(self, data): 处理异常值 if self.strategy remove: # 直接删除异常值 cleaned_data data[(data self.lower_bound_) (data self.upper_bound_)] return cleaned_data elif self.strategy cap: # 截断异常值 capped_data np.clip(data, self.lower_bound_, self.upper_bound_) return capped_data elif self.strategy impute: # 用边界值替换异常值 imputed_data data.copy() imputed_data[data self.lower_bound_] self.lower_bound_ imputed_data[data self.upper_bound_] self.upper_bound_ return imputed_data else: raise ValueError(不支持的处理策略) # 综合处理流程 def comprehensive_outlier_processing(df, numerical_columns, strategycap): 对数据框中的多列数值数据进行异常值处理 processed_df df.copy() processing_report {} for col in numerical_columns: processor OutlierProcessor(strategystrategy) original_data processed_df[col].dropna() # 拟合处理器 processor.fit(original_data) # 处理数据 processed_data processor.transform(processed_df[col].values) processed_df[col] processed_data # 记录处理情况 outlier_mask (processed_df[col].values ! df[col].values) processing_report[col] { original_count: len(df[col]), outlier_count: np.sum(outlier_mask), bounds: (processor.lower_bound_, processor.upper_bound_), strategy: strategy } return processed_df, processing_report6.2 处理策略选择指南不同场景下的异常值处理策略选择删除策略适用于异常值数量较少5%数据量足够大删除不影响统计分析异常值明显是错误数据截断策略适用于需要保持数据量不变异常值可能是真实但极端的数据机器学习模型训练场景替换策略适用于时间序列数据需要保持连续性需要保留数据分布形状业务分析需要完整的数据记录7. 工程实践与性能优化7.1 大规模数据检测优化处理海量数据时的性能优化技巧def optimized_batch_detection(data, batch_size10000, detector_classIsolationForest): 分批处理大规模数据 n_samples len(data) results [] for i in range(0, n_samples, batch_size): batch data[i:ibatch_size] # 使用更快的算法配置 detector detector_class( n_estimators50, # 减少树的数量 max_samples256, # 限制样本数量 random_state42 ) batch_results detector.fit_predict(batch) results.extend(batch_results) return np.array(results) # 内存优化版本 class MemoryEfficientDetector: 内存高效的异常检测器 def __init__(self, chunk_size5000): self.chunk_size chunk_size self.partial_results [] def partial_fit(self, data_chunk): 增量学习 # 使用支持增量学习的算法 from sklearn.linear_model import SGDOneClassSVM if not hasattr(self, detector): self.detector SGDOneClassSVM() self.detector.partial_fit(data_chunk) self.partial_results.append(data_chunk) def predict(self, data): 预测异常值 return self.detector.predict(data)7.2 生产环境部署建议在实际生产环境中部署异常检测系统时需要考虑监控与告警class AnomalyMonitoringSystem: 异常监控系统 def __init__(self, threshold0.8, window_size100): self.threshold threshold self.window_size window_size self.anomaly_history [] def check_anomaly_spike(self, recent_anomalies): 检查异常值激增 if len(recent_anomalies) self.window_size: anomaly_rate np.mean(recent_anomalies) if anomaly_rate self.threshold: return True, f异常率激增: {anomaly_rate:.2f} return False, def generate_alert(self, message, severitywarning): 生成告警 alert { timestamp: pd.Timestamp.now(), message: message, severity: severity, anomaly_rate: len(self.anomaly_history) / self.window_size } return alert8. 常见问题与解决方案8.1 检测效果不佳的排查思路当异常检测效果不理想时可以按照以下步骤排查数据质量检查检查数据分布是否满足算法假设验证特征工程是否合理确认数据预处理步骤是否正确参数调优流程def parameter_tuning_pipeline(X, y_trueNone): 参数调优流水线 from sklearn.model_selection import GridSearchCV param_grid { contamination: [0.01, 0.05, 0.1, 0.2], n_estimators: [50, 100, 200], max_samples: [0.5, 0.8, 1.0] } detector IsolationForest() grid_search GridSearchCV( detector, param_grid, scoringroc_auc, cv5 ) grid_search.fit(X) return grid_search.best_params_, grid_search.best_score_8.2 算法选择指南根据数据特征选择合适的异常检测算法数据特征推荐算法理由高维数据孤立森林计算效率高适合高维空间局部异常LOF考虑局部密度检测局部异常流式数据增量学习算法支持在线学习内存占用小时间序列季节性分解残差分析考虑时间依赖性多变量相关马氏距离考虑变量间相关性8.3 评估指标选择异常检测任务的评估需要特殊指标def evaluate_anomaly_detection(y_true, y_pred, anomaly_labels-1): 评估异常检测效果 from sklearn.metrics import precision_recall_fscore_support, roc_auc_score # 将预测结果转换为二进制标签 y_pred_binary (y_pred anomaly_labels).astype(int) y_true_binary (y_true anomaly_labels).astype(int) precision, recall, f1, _ precision_recall_fscore_support( y_true_binary, y_pred_binary, averagebinary ) # 对于有概率得分的情况计算AUC try: auc_score roc_auc_score(y_true_binary, y_pred) except: auc_score None return { precision: precision, recall: recall, f1_score: f1, auc_score: auc_score }9. 最佳实践总结9.1 异常检测流程标准化建立标准化的异常检测流程业务理解明确异常的定义和业务影响数据探索分析数据分布和特征相关性方法选择根据数据特点选择合适的检测算法参数调优使用交叉验证优化模型参数效果评估使用合适的指标评估检测效果部署监控生产环境部署和持续监控9.2 工程化注意事项版本控制保持算法和参数的版本记录可复现性确保每次检测结果可复现性能监控监控检测系统的性能和资源使用结果解释提供异常检测结果的业务解释9.3 持续改进机制建立异常检测系统的持续改进机制定期回顾检测效果调整算法参数收集误报和漏报案例优化检测规则关注新的异常检测算法和技术发展建立反馈机制不断优化检测精度异常值检测是数据质量控制的重要环节需要根据具体业务场景选择合适的检测方法和处理策略。本文介绍的方法涵盖了从传统统计到现代机器学习的多种技术在实际项目中可以组合使用构建多层次的异常检测体系。关键是要理解业务需求选择合适的技术方案并建立完善的评估和优化机制。通过系统化的异常值处理可以显著提升数据质量和模型效果为业务决策提供更可靠的数据支持。

相关新闻

扩散模型在红外图像彩色化中的应用与优化

扩散模型在红外图像彩色化中的应用与优化

1. 红外图像彩色化技术背景与挑战红外热成像技术通过捕捉物体表面散发的热辐射生成图像,这种成像方式使其具备全天候工作能力,不受环境光照条件限制。在安防监控领域,红外摄像头能够清晰捕捉夜间入侵者;在自动驾驶系统中&#xff…

2026/10/14 3:54:01 阅读更多 →
OMAP3530接口时序实战:从USB/I2C参数到硬件设计可靠性

OMAP3530接口时序实战:从USB/I2C参数到硬件设计可靠性

1. 项目概述与核心价值在嵌入式硬件开发,尤其是基于TI OMAP35xx这类复杂应用处理器的设计中,接口时序参数手册往往是工程师们又爱又恨的存在。爱的是,它提供了确保系统稳定运行的“金科玉律”;恨的是,动辄上百页的表格…

2026/10/13 0:32:55 阅读更多 →
GS-Agent:基于自然语言的4D物理世界生成框架技术解析

GS-Agent:基于自然语言的4D物理世界生成框架技术解析

这次我们来看一个很有意思的项目——GS-Agent,它用生成式模拟技术来创建4D物理世界。这个项目来自清华和上海AI Lab,重点不是让你手动建模,而是通过多智能体协作自动生成带物理规律的动态场景。如果你关心物理仿真、游戏开发、自动驾驶模拟或…

2026/10/12 19:14:43 阅读更多 →

最新新闻

卡尔曼滤波从原理到实战:行人多目标追踪与检测框平滑全解析

卡尔曼滤波从原理到实战:行人多目标追踪与检测框平滑全解析

目标追踪是个看着简单、做着上头的问题。想象一个监控摄像头,一个人从画面左侧走到右侧,中间被柱子挡住两秒,再出现时,系统要能认出还是同一个人,把轨迹连续画出来。就这么个场景,背后其实压着两个问题&…

2026/10/14 8:13:51 阅读更多 →
滑动窗口算法:高效解决字符串子区间问题

滑动窗口算法:高效解决字符串子区间问题

1. 滑动窗口算法核心思想解析滑动窗口(Sliding Window)是解决字符串和数组子区间问题的高效算法范式。它的核心在于维护一个动态变化的窗口,通过左右指针的协同移动来避免重复计算,将时间复杂度从暴力解法的O(n)优化到O(n)。1.1 算…

2026/10/14 8:13:51 阅读更多 →
AnyPS5项目暂无法生成技术内容

AnyPS5项目暂无法生成技术内容

项目标题是“AnyPS5”,但提供的输入内容中,项目正文为空、关键词未列出、摘要描述缺失,仅有一个孤立的标题和两行无效占位符(“相关热搜词:”“最新网络热词:”后均无实际内容),且后…

2026/10/14 8:13:51 阅读更多 →
ES6箭头函数:核心特性与最佳实践指南

ES6箭头函数:核心特性与最佳实践指南

1. 箭头函数基础概念解析箭头函数(Arrow Function)是ES6标准中引入的一种函数表达式简写语法,它用">"符号定义函数,因此得名"箭头函数"。这种语法糖的出现彻底改变了JavaScript中函数定义的书写方式。我第…

2026/10/14 8:13:51 阅读更多 →
AnyPS5:面向PS5开发的声明式工作流编排工具

AnyPS5:面向PS5开发的声明式工作流编排工具

项目标题:“AnyPS5”这个名称本身带有强烈的指向性与模糊性并存的特征——它既像一个技术代号,又像一句口号;既暗示兼容性、泛用性(“Any”),又锚定在特定硬件生态(“PS5”)。但问题…

2026/10/14 8:13:51 阅读更多 →
Spring AI Alibaba Graph:企业级AI流程编排从ReAct Agent到Workflow实战

Spring AI Alibaba Graph:企业级AI流程编排从ReAct Agent到Workflow实战

1. 从“能聊”到“能干”:企业级AI流程编排的真实痛点很多团队在2024年前后都经历过这样一个阶段:用大模型API搭一个对话机器人,演示效果惊艳,但一旦要接入真实业务系统,立刻原形毕露。用户问“帮我查一下上个月的订单…

2026/10/14 8:12:51 阅读更多 →

日新闻

AnyPS5通用适配层设计:兼容性与性能的工程取舍

AnyPS5通用适配层设计:兼容性与性能的工程取舍

1. 从"AnyPS5"这个名字说起:它到底想解决什么问题第一次看到"AnyPS5"这个标题,我脑子里冒出来的第一个念头是:这大概率是一个围绕"跨平台运行"或者"通用适配"做文章的项目。名字里的"Any"…

2026/10/14 0:00:41 阅读更多 →
Flutter跨平台开发实战:二手交易应用与HarmonyOS适配

Flutter跨平台开发实战:二手交易应用与HarmonyOS适配

1. 项目概述:Flutter跨平台二手交易应用开发作为一名长期从事移动应用开发的工程师,我最近完成了一个基于Flutter框架的二手物品交易平台项目。这个项目最吸引我的地方在于它完美结合了Flutter的跨平台优势与HarmonyOS的生态特性,实现了"…

2026/10/14 0:00:41 阅读更多 →
DFS算法解决飞机降落调度问题实战

DFS算法解决飞机降落调度问题实战

1. 项目背景与核心思路飞机降落问题是一个经典的调度优化场景,也是算法竞赛和面试中的高频题目。这个题目要求我们合理安排多架飞机的降落顺序和时间,确保所有飞机都能安全着陆而不发生冲突。在实际航空管制中,这类问题直接关系到飞行安全和机…

2026/10/14 0:00:41 阅读更多 →

周新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/14 3:30:28 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/13 16:22:04 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/14 3:29:58 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/13 22:01:27 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/13 14:57:39 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/14 7:53:34 阅读更多 →