<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 并行學習指南 這是一篇 LightGBM 的并行學習教程. 點擊 [快速入門](./Quick-Start.rst) 來學習怎樣使用 LightGBM. ## 選擇合適的并行算法 LightGBM 現已提供了以下并行學習算法. | **Parallel Algorithm** | **How to Use** | | --- | --- | | Data parallel | `tree_learner=data` | | Feature parallel | `tree_learner=feature` | | Voting parallel | `tree_learner=voting` | 這些算法適用于不同場景,如下表所示: | ? | **#data is small** | **#data is large** | | --- | --- | --- | | **#feature is small** | Feature Parallel | Data Parallel | | **#feature is large** | Feature Parallel | Voting Parallel | 在 [optimization in parallel learning](./Features.rst#optimization-in-parallel-learning) 了解更多并行算法的細節. ## 構建并行版本 默認的并行版本支持基于 socket 的并行學習. 如果你想構建基于 MPI 的并行版本, 請參考 [安裝指南](./Installation-Guide.rst#build-mpi-version). ## 準備工作 ### Socket 版本 它需要收集所有想要運行并行學習的機器的所有 IP 并且指定一個 TCP 端口號 (假設是 12345 ) , 更改防火墻使得這個端口可以被訪問 (12345). 然后把這些 IP 和端口寫入一個文件中 (假設是 `mlist.txt`), 如下所示: ``` machine1_ip 12345 machine2_ip 12345 ``` ### MPI 版本 它需要收集所有想要運行并行學習機器的 IP (或 hostname) . 然后把這些IP寫入一個文件中 (例如 `mlist.txt`) 如下所示: ``` machine1_ip machine2_ip ``` **Note**: 對于 windows 用戶, 需要安裝 “smpd” 來開啟 MPI 服務. 更多細節點擊 [here](https://blogs.technet.microsoft.com/windowshpc/2015/02/02/how-to-compile-and-run-a-simple-ms-mpi-program/). ## 運行并行學習 ### Socket 版本 1. 在配置文件中編輯以下參數: `tree_learner=your_parallel_algorithm`, 在這里編輯 `your_parallel_algorithm` (e.g. feature/data) . `num_machines=your_num_machines`, 在這里編輯 `your_num_machines` (e.g. 4) . `machine_list_file=mlist.txt`, `mlist.txt` 在 [準備工作](#preparation) 生成. `local_listen_port=12345`, `12345` 在 [準備工作](#preparation) 分配. 2. 拷貝數據文件, 可執行文件, 配置文件和 `mlist.txt` 到所有機器. 3. 在所有機器上運行以下命令, 你需要更改 `your_config_file` 為真實配置文件. Windows: `lightgbm.exe config=your_config_file` Linux: `./lightgbm config=your_config_file` ### MPI 版本 1. 在配置中編輯以下參數: `tree_learner=your_parallel_algorithm`, 在這里編輯 `your_parallel_algorithm` (e.g. feature/data) . `num_machines=your_num_machines`, 在這里編輯 `your_num_machines` (e.g. 4) . 2. 拷貝數據文件, 可執行文件, 配置文件和 `mlist.txt` 到所有機器. **Note**: MPI 需要運行在 **所有機器的相同路徑上**. 3. 在機器上運行以下命令 (不需要運行所有機器), 需要更改 `your_config_file` 為真實的配置文件. Windows: ``` mpiexec.exe /machinefile mlist.txt lightgbm.exe config=your_config_file ``` Linux: ``` mpiexec --machinefile mlist.txt ./lightgbm config=your_config_file ``` ### 例子 * [A simple parallel example](https://github.com/Microsoft/lightgbm/tree/master/examples/parallel_learning)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看