日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python机器学习、数据分析常用第三方库(实时更新)

發布時間:2023/12/4 python 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python机器学习、数据分析常用第三方库(实时更新) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

常用鏡像源:

清華:https://pypi.tuna.tsinghua.edu.cn/simple
阿里:http://mirrors.aliyun.com/pypi/simple/
豆瓣:http://pypi.douban.com/simple/
華中理工大學:http://pypi.hustunique.com/
山東理工大學:http://pypi.sdutlinux.org/
中國科學技術大學:http://pypi.mirrors.ustc.edu.cn/

以豆瓣鏡像為例,使用如下命令安裝你想要的模塊:

pip install 模塊名 -i http://pypi.douban.com/simple

pip升級到7.0以后,在使用http鏡像進行包安裝及升級的時候往往會有如下提示:

Collecting beautifulsoup4
The repository located at xxx.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with ‘–trusted-host xxx.com’.

這時候根據提示在最后添加–trusted-host + 鏡像官網即可。例如:

pip install 模塊名 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

決策樹可視需要安裝包和插件:pip install graphviz (還需要配置環境)

pip install graphviz
pip install pydotplus
pip install six

import graphviz
import pydotplus
from six import StringIO
為了解決export_graphviz畫決策樹圖時中文亂碼的問題,需要使用sklearn.externals.six包里的StringIO
查閱資料后發現sklearn 0.23版本已經刪掉了這個包。
因此直接安裝six包:

mysql第三方數據庫模塊

pip install pymysql

import pymysql

科學計算庫

pip install numpy
pip install pandas

數據缺失

pip install missingno
import missingno as msno

boosting集成學習

pip install xgboost
pip install lightgbm

import xgboost as xgb
import lightgbm as lgb

語音播放相關

playsound

機器學習深度學習框架

pip install tensorflow
pip install keras

pip3 install torch torchvision torchaudio
注意:安裝Pytorch最好進入官網根據自己的需求選擇合適的版本
官網:(https://pytorch.org/)

圖片相關

pip install scikit-image

結巴分詞

pip install jieba

畫圖

pip install matplotlib

關聯規則

pip install apyori

from apyori import apriori

不平衡樣本處理

pip install imbalanced-learn
pip install imblearn

使用SMOTE進行過采樣

from imblearn.over_sampling import SMOTE

注意:處理不平衡數據集,也可以先SMOTE過采樣,再進行下采樣

數理統計時間序列

pip install statsmodels

時間序列特征提取

pip install tsfresh

總結

以上是生活随笔為你收集整理的python机器学习、数据分析常用第三方库(实时更新)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。