| 库 / 工具 | 版本建议 | 核心用途 |
|---|---|---|
| Python | ≥ 3.9 | 主力编程语言,胶水与核心 |
| Pandas | ≥ 1.5 | 数据处理、时间序列、因子拼接 |
| Scikit-learn | ≥ 1.2 | 分类/回归/聚类、特征选择、评估 |
| TensorFlow | ≥ 2.10 | 深度学习、LSTM、注意力选股 |
| NumPy / Matplotlib | 最新 | 数值计算 & 可视化 |
| Jupyter / VS Code | — | 交互式开发与实验 |
数据流与模型迭代架构
# 机器学习选股 · 必备库导入 import numpy as np import pandas as pd import matplotlib.pyplot as plt # Scikit-learn 模块 from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import classification_report # TensorFlow / Keras import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout print(f"Pandas: {pd.__version__}, Scikit-learn: {sklearn.__version__}, TF: {tf.__version__}")