摘要
预测股票涨跌是机器学习分类算法的重要应用场景之一,根据以往实践中的经验,不同种类的股票由于数据特征不同,所以需要用携带不同参数的KNN分类模型来预测。用基于交叉熵的损失函数据训练KNN模型,以此确定KNN模型关键参数的做法,在此基础上给出能根据不同股票数据动态调整KNN算法关键参数的预测股票涨跌的模型。实践表明,这个模型在预测数据特征不同的股票涨跌情况时,均能表现出较高的准确性。
Predicting stock price fluctuations is one of the important application scenarios of machine learning classification algorithms.According to the experience,since the data features of different stocks are not the same,the key parameter of KNN algorithm is adjusted when the prediction model is built.This study provides one mechanism to confirm the key parameter of KNN by the history stock data,and provides a perdition model by KNN algorithm with dynamic parameters.This model is verified by different stock data,which is more accurate than any other models that all use the same parameter.
作者
曹宇
鲁明旭
CAO Yu;LU Mingxu(School of Artificial Intelligence Application,Shanghai Urban Construction Vocational College,Shanghai 201415,China)
出处
《微型电脑应用》
2024年第4期1-4,共4页
Microcomputer Applications
基金
中国高校产学研创新基金(2022BC097,2022IT230)。
关键词
KNN
机器学习
股票预测模型
KNN
machine learning
model for stock prediction