顯示具有 Python 標籤的文章。 顯示所有文章
顯示具有 Python 標籤的文章。 顯示所有文章

2019年7月26日 星期五

Set up python development environment 設定Python開發環境

Set up python development environment 設定Python開發環境

1.安裝Visual Studio或Visual Studio Core

or

2.安裝Python


3.確認Python安裝成功

4.啟動Visual Studio Core,安裝Python extension

5.選取 [Python 解譯器]
opening the Command Palette (Ctrl+Shift+P), start typing the command Python: Select Interpreter to search, then select the command

6.第一次啟動Python: Select Interpreter需要一些時間偵測此台主機已安裝的Python環境

7.選擇Python環境

https://code.visualstudio.com/docs/python/environments

8.在VS Code 終端機執行Python程式
   啟動終端機方法1,Terminal > New Terminal
    啟動終端機方法2,View > Terminal

9.若出現無法辨識conda命令
   輸入python若出現無法辨識python命令


    解決方法: 設定環境變數,在Path變數加入以下兩個路徑
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts
    C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64
 
    正常啟動終端機的畫面如下

10.執行python,進入Python環境
     輸入印出Hello world的Python程式碼 print("Hello World")

11.測試執行python script檔
   新增一個py檔,並輸入以下Python script
   msg = "Hello World"
   print(msg)
   儲存後,按右鍵選擇[ Run Python File in Terminal]
 
    執行結果如下


SQL Server Machine Learning - Python client:

1.下載PowerShell script安裝Python for SQL Server Machine Learning Service/Server
https://aka.ms/mls93-py
or
https://aka.ms/mls-py

The script installs Anaconda 4.2.0, which includes Python 3.5.2, along with all packages listed previously.
Microsoft Python packages common to both client and server systems include the following:

  • revoscalepy
  • microsoftml
  • azureml-model-management-sdk
  • pre-trained models

This article describes how to install a Python interpreter (Anaconda) and Microsoft's Python packages locally on a client machine. Once installed, you can use all of the Python modules in Anaconda, Microsoft's packages, and any third-party packages that are Python 3.5 compliant. For remote compute context, you can only call the Python functions from packages in the above list.



2.若沒有指定安裝路徑,預設安裝在 C:\ProgramFiles\Microsoft\PyForMLS


3.設定環境Path變數
C:\Program Files\Microsoft\PyForMLS


4.IDE開發工具才能偵測到安裝號的Python環境
    Visual Studio Code

    Visual Studio須自訂這個新的Python環境


Reference:
 Get started using Python on Windows for beginners
 https://docs.microsoft.com/en-us/windows/python/get-started/python-for-education
 Getting Started with Python in VS Code
 https://code.visualstudio.com/docs/python/python-tutorial
 How to install Python client libraries for remote access to a Machine Learning Server
 https://docs.microsoft.com/en-us/machine-learning-server/install/python-libraries-interpreter

Learn Python from Microsoft


Get started using Python on Windows for beginners
https://docs.microsoft.com/en-us/windows/python/get-started/python-for-education

Introduction to Python
https://docs.microsoft.com/en-us/learn/modules/intro-to-python/

Visual Studio | Python
https://docs.microsoft.com/en-us/visualstudio/python/?view=vs-2019



基本上,一個Module就是一個py檔
將多個py檔包在一個目錄下,且包含一個__init__.py檔,就是一個Package

MyPackage1/
├── __init__.py
├── module1.py
└── module1_import.py

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/
機器學習和統計的主要區別在於它們的目的。機器學習模型旨在使最準確的預測成為可能。統計模型是為推斷變數之間的關係而設計的。

資料治理實施

資料治理實施