<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          KeystoneML機(jī)器學(xué)習(xí)框架

          聯(lián)合創(chuàng)作 · 2023-09-26 03:45

          KeystoneML 是一個(gè)用 Scala 編寫(xiě)的軟件框架,來(lái)自伯克利大學(xué) AMPLab 實(shí)驗(yàn)室。該項(xiàng)目主要目的是簡(jiǎn)化構(gòu)造大規(guī)模、端到端的機(jī)器學(xué)習(xí)管道,基于 Apache Spark 構(gòu)建。

          示例代碼:

          val trainData = NewsGroupsDataLoader(sc, trainingDir)
          
          val predictor = Trim.then(LowerCase())
            .then(Tokenizer())
            .then(new NGramsFeaturizer(1 to conf.nGrams))
            .then(TermFrequency(x => 1))
            .thenEstimator(CommonSparseFeatures(conf.commonFeatures))
            .fit(trainData.data)
            .thenLabelEstimator(NaiveBayesEstimator(numClasses))
            .fit(trainData.data, trainData.labels)
            .then(MaxClassifier)

          測(cè)試:

          val test = NewsGroupsDataLoader(sc, testingDir)
          val predictions = predictor(test.data)
          val eval = MulticlassClassifierEvaluator(predictions, test.labels, numClasses)
          
          println(eval.summary(newsgroupsData.classes))

          輸出:

          Avg Accuracy:    0.980
          Macro Precision:0.816
          Macro Recall:    0.797
          Macro F1:    0.797
          Total Accuracy:    0.804
          Micro Precision:0.804
          Micro Recall:    0.804
          Micro F1:    0.804
          瀏覽 25
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  欧美日韩电影一区二区三区 | 亚洲免费视频24 | 欧日韩黄色视频 | 婷婷丁香五月亚洲 | 翔田千里av无码 翔田千里无码av |