<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## MLPClassifier 多層感知器(MLP)是一種前饋人工神經網絡模型,它將輸入數據集映射到一組適當的輸出上。 ### 構造函數參數 `$inputLayerFeatures`(int) - 輸入圖層要素的數量 `$hiddenLayers`(array) - 具有隱藏層配置的數組,每個值表示每層中的神經元數 `$classes`(array) - 具有不同訓練集類的數組(忽略數組鍵) `$iterations`(int) - 訓練迭代次數 `$learningRate`(float) - 學習率 `$activationFunction`(ActivationFunction) - 神經元激活功能 ``` use Phpml\Classification\MLPClassifier; $mlp = new MLPClassifier(4, [2], ['a', 'b', 'c']); // 4 nodes in input layer, 2 nodes in first hidden layer and 3 possible labels. ``` ***** ### 激活函數也可以與每個單獨的隱藏層一起傳遞。例: ``` use Phpml\NeuralNetwork\ActivationFunction\PReLU; use Phpml\NeuralNetwork\ActivationFunction\Sigmoid; $mlp = new MLPClassifier(4, [[2, new PReLU], [2, new Sigmoid]], ['a', 'b', 'c']); ``` 它們也可以配置Layer對象,而不是將每個隱藏層配置為array。例: ``` use Phpml\NeuralNetwork\Layer; use Phpml\NeuralNetwork\Node\Neuron; $layer1 = new Layer(2, Neuron::class, new PReLU); $layer2 = new Layer(2, Neuron::class, new Sigmoid); $mlp = new MLPClassifier(4, [$layer1, $layer2], ['a', 'b', 'c']); ``` ### 訓練 訓練MLP只需提供隊列樣本和標簽(如array)。例: ``` $mlp->train( $samples = [[1, 0, 0, 0], [0, 1, 1, 0], [1, 1, 1, 1], [0, 0, 0, 0]], $targets = ['a', 'a', 'b', 'c'] ); ``` ### 使用partialTrain方法批量訓練。例: ``` $mlp->partialTrain( $samples = [[1, 0, 0, 0], [0, 1, 1, 0]], $targets = ['a', 'a'] ); $mlp->partialTrain( $samples = [[1, 1, 1, 1], [0, 0, 0, 0]], $targets = ['b', 'c'] ); ``` ***** 您可以更新partialTrain運行之間的學習率: ``` $mlp->setLearningRate(0.1); ``` ### 預測 預測樣本標簽使用預測方法。您可以提供一個樣本或樣本數組: ### 激活功能 * BinaryStep * Gaussian * HyperbolicTangent * Parametric Rectified Linear Unit * Sigmoid (default) * Thresholded Rectified Linear Unit
                  <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>

                              哎呀哎呀视频在线观看