Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 290ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
s

scikit-learn

Recently created Least recently created Recently updated Least recently updated

timmy / 簡單線性回歸股價預測

Last active 6 hours ago linear-regression machine-learning numpy python scikit-learn stock-prediction

這段 Python 程式碼 使用 scikit-learn (sklearn) 建立簡單的線性回歸模型,根據 過去幾天蘋果公司的股價 訓練模型,並 預測未來股價變化。

0 0 0 1
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4
5 """
6 a_simple_linear_regression_model.py: 透過使用 Python 的 sklearn 套件,訓練一個簡單的線性回歸模型,並使用該模型預測蘋果公司的股價變化。
7
8 Author: Timmy
9 Copyright: Copyright 2022, Timmy
10 License: MIT