基于机器学习的天气预测
文章目录
里面用的算法是一些简单的算法。
数据集放到了gitee上面:
https://gitee.com/wavelet-aa/jar.git
开始:
#处理日期
from datetime import datetime, timedelta
import time
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import numpy as np
from pandas import Series,DataFrame
from sklearn import metrics
import warnings
time: 458 µs
1、数据导入与预处理
In [14]:
#导入数据
weather = pd.read_csv('/home/mw/input/weather2295/weather.csv')