顯示具有 Machine Learning 標籤的文章。 顯示所有文章
顯示具有 Machine Learning 標籤的文章。 顯示所有文章

2019年7月28日 星期日

SQL Server 2017 Machine Learning


1.啟動 SQL Server Launchpad service


2.檢查並啟用 external scripts enabled
    預設 SQL Server的external scripts enabled是停用的





執行以下語法啟用 external scripts enabled
EXEC sp_configure  'external scripts enabled', 1
RECONFIGURE WITH OVERRIDE 
 
    如果檢查run_value不是1,則需要重新啟動SQL Server讓設定生效


若正常啟用,run_value是1

3.請確認有 Python
   執行Python Script檢查Python版本

    若出現錯誤Msg 39011,可能是SQL Server Launchpad service服務沒有啟動,
 
   或是需要重新啟動一次

     若出現錯誤,可能是找不到Python
    Msg 39021, Level 16, State 1, Line 0
    Unable to launch runtime for 'Python' script. Please check the configuration of the 'Python' runtime.
    Msg 39019, Level 16, State 2, Line 0
    An external script error occurred:
    Unable to launch the runtime. ErrorCode 0x80070490: 1168(元素找不到。).

    或是SQL Server沒有安裝Machine Learning Services(In-Database)>Python

4.Run a Hello World script
    執行用Python Script Hello World

    若用R語言Hello World

5.確認revoscalepy可供使用
下列指令碼會示範如何擷取包含在 revoscalepy 內建的範例.xdf 資料檔案。


6.查看預先安裝的Python 套件清單
Microsoft 預先安裝在SQL Server執行個體的機器學習服務 Python 套件




Revoscalepy
維基百科
revoscalepy是由Microsoft創建的Python中的機器學習包。它作為Microsoft SQL Server 2017和Machine Learning Server 9.2.0及更高版本中的機器學習服務的一部分提供。[1]
該軟件包包含用於創建線性模型,邏輯回歸,隨機森林,決策樹和提升決策樹的功能,以及用於檢查數據的一些摘要功能。[2] 其他機器學習算法,如神經網絡,是在microsoftm中提供的,這是一個單獨的軟件包,它是MicrosoftML的Python版本。[3]
revoscalepy還包含用於在不同計算環境中運行機器學習算法的函數,包括SQL Server,Apache Spark和Hadoop。[2]

Next Step:
Quickstart: Create, train, and use a Python model with stored procedures in SQL Server
https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/quickstart-python-train-score-in-tsql?view=sql-server-2017

Use Python with revoscalepy to create a model that runs remotely on SQL Server
https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/use-python-revoscalepy-to-create-model?view=sql-server-2017


Reference:
SQL Server Machine Learning tutorials in R and Python
https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/machine-learning-services-tutorials?view=sql-server-2017

Quickstart: Verify Python exists in SQL Server
https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/quickstart-python-verify?view=sql-server-2017

revoscalepy (Python module in SQL Server)
https://docs.microsoft.com/zh-tw/sql/advanced-analytics/python/ref-py-revoscalepy?view=sql-server-2017

2019年7月6日 星期六

Python與機器學習的學習資源

Python與機器學習的學習資源

Python 新手 100 天學習計劃

jackfrued/Python-100-Days
https://github.com/jackfrued/Python-100-Days
第一階段,Python 語言基礎(學習週期 15 天)
第二階段,Python 語言進階(週期 15 天)
第三階段, Web 前端入門(週期 10 天)
第四階段,玩轉 Linux 操作系統(週期 5 天)
第五階段,數據庫基礎和進階(週期 5 天)
第六階段,實戰 Django(週期 15 天)
第七階段,實戰  Flask(週期 5 天)
第八階段,實戰 Tornado(週期 5 天)
第九階段,爬蟲開發(週期 10 天)
第十階段, 數據處理和機器學習(週期 15 天)
第十一階段, 團隊專案開發(週期 10 天)

Tableau整合Python

Python-Tableau Integration
https://medium.com/@vishal152715/python-tableau-integration-9139bcadaf5
tableau/TabPy
https://github.com/tableau/TabPy
如何在Tableau中用Python
https://kknews.cc/zh-tw/other/g86kbpl.html
Python Integration with Tableau And Running Python Scripts inside Tableau
https://www.technicaljockey.com/tableau-training-consultant/python-integration-with-tableau/

機器學習

  • 監督式學習(Supervised Learning)
  • 非監督式學習(Unsupervised Learning)
  • 增強式學習 (Reinforcement Learning)
    • 模型已知(Model Based)
    • 模型未知(Model Free)
    • 近似強化學習的基本方法,包括帶值函數的TD學習、近似值疊代、近似策略疊代和最小二乘策略疊代。
       三大類機器學習:監督式、強化式、非監督式
       https://en.wikipedia.org/wiki/Machine_learning
       模型匯總19 強化學習(Reinforcement Learning)算法基礎及分類
       https://kknews.cc/tech/6p248pv.html

圖解機器學習
http://www.r2d3.us/圖解機器學習第一章/
機器學習:使用Python
https://machine-learning-python.kspax.io/
用 Python 自學資料科學與機器學習入門實戰:Scikit Learn 基礎入門
https://blog.techbridge.cc/2017/11/24/python-data-science-and-machine-learning-scikit-learn-basic-tutorial/
[資料分析&機器學習] 第1.1講:Python懶人包 Anaconda 介紹&安裝
https://medium.com/jameslearningnote/medium-com-jameslearningnote/home
Python 科學計算入門(來自 UCSB Engineering 的 M. Scott Shell)
Python's documentation, tutorials, and guides
https://www.python.org/doc/

影片

機器學習入門
http://moocs.nccu.edu.tw/media/17901
線性回歸的基本概念
http://moocs.nccu.edu.tw/media/17893
Google Developer Python Course
https://www.youtube.com/playlist?list=PLfZeRfzhgQzTMgwFVezQbnpc1ck0I6CQl


深度學習

深度學習英語:deep learning)是機器學習的分支,是一種以人工神經網路為架構,對資料進行表徵學習的演算法
https://zh.wikipedia.org/wiki/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0

人工智慧、機器學習與深度學習間有什麼區別?
日期:Jul 29, 2016
https://blogs.nvidia.com.tw/2016/07/whats-difference-artificial-intelligence-machine-learning-deep-learning-ai/
[自學課程]成為 Python AI 深度學習達人的第一堂課
http://moocs.nccu.edu.tw/course/172/intro

CNN(卷積神經網絡)、RNN(循環神經網絡)、DNN(深度神經網絡)的內部網絡結構的區別
https://kknews.cc/zh-tw/news/6n84mm3.html

其他

機器學習跟統計學差在哪?哈佛博士:機器學習重視預測結果,統計學在乎因果推理
Posted on 2019/05/02
https://buzzorange.com/techorange/2019/05/02/difference-between-statistics-and-machine-learning/
機器學習和統計的主要區別在於它們的目的。機器學習模型旨在使最準確的預測成為可能。統計模型是為推斷變數之間的關係而設計的。

資料治理實施

資料治理實施