{"id":159967,"date":"2019-10-04T12:29:56","date_gmt":"2019-10-04T04:29:56","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=159967"},"modified":"2019-09-27T14:31:16","modified_gmt":"2019-09-27T06:31:16","slug":"sklearn-sk-dist","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/sklearn-sk-dist.html","title":{"rendered":"\u7f8e\u56fd\u300c\u8fd4\u5229\u7f51\u300d\u5f00\u6e90sk-dist\u6846\u67b6\u5c06sklearn\u8bad\u7ec3\u901f\u5ea6\u63d0\u5347\u6570\u500d"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728\u672c\u6587\u4e2d\uff0cIbotta\uff08\u7f8e\u56fd\u7248\u300c\u8fd4\u5229\u7f51\u300d\uff09\u673a\u5668\u5b66\u4e60\u548c\u6570\u636e\u79d1\u5b66\u7ecf\u7406 Evan Harris \u4ecb\u7ecd\u4e86\u4ed6\u4eec\u7684\u5f00\u6e90\u9879\u76ee sk-dist\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u5728\u672c\u6587\u4e2d\uff0cIbotta\uff08\u7f8e\u56fd\u7248\u300c\u8fd4\u5229\u7f51\u300d\uff09\u673a\u5668\u5b66\u4e60\u548c\u6570\u636e\u79d1\u5b66\u7ecf\u7406 Evan Harris \u4ecb\u7ecd\u4e86\u4ed6\u4eec\u7684\u5f00\u6e90\u9879\u76ee sk-dist\u3002\u8fd9\u662f\u4e00\u4e2a\u5206\u914d scikit-learn \u5143\u4f30\u8ba1\u5668\u7684 Spark \u901a\u7528\u6846\u67b6\uff0c\u5b83\u7ed3\u5408\u4e86 Spark \u548c scikit-learn \u4e2d\u7684\u5143\u7d20\uff0c\u53ef\u4ee5\u5c06 sklearn \u7684\u8bad\u7ec3\u901f\u5ea6\u63d0\u5347 100 \u591a\u500d\u3002<\/p>\n

\u5728 Ibotta\uff0c\u6211\u4eec\u8bad\u7ec3\u4e86\u8bb8\u591a\u673a\u5668\u5b66\u4e60\u6a21\u578b\u3002\u8fd9\u4e9b\u6a21\u578b\u4e3a\u6211\u4eec\u7684\u63a8\u8350\u7cfb\u7edf\u3001\u641c\u7d22\u5f15\u64ce\u3001\u5b9a\u4ef7\u4f18\u5316\u5f15\u64ce\u3001\u6570\u636e\u8d28\u91cf\u7b49\u63d0\u4f9b\u4e86\u652f\u6301\uff0c\u5728\u4e0e\u6211\u4eec\u7684\u79fb\u52a8 app \u4e92\u52a8\u7684\u540c\u65f6\u4e3a\u6570\u767e\u4e07\u7528\u6237\u505a\u51fa\u9884\u6d4b\u3002<\/p>\n

\u867d\u7136\u6211\u4eec\u4f7f\u7528 Spark \u8fdb\u884c\u5927\u91cf\u7684\u6570\u636e\u5904\u7406\uff0c\u4f46\u6211\u4eec\u9996\u9009\u7684\u673a\u5668\u5b66\u4e60\u6846\u67b6\u662f scikit-learn\u3002\u968f\u7740\u8ba1\u7b97\u6210\u672c\u8d8a\u6765\u8d8a\u4f4e\u4ee5\u53ca\u673a\u5668\u5b66\u4e60\u89e3\u51b3\u65b9\u6848\u7684\u4e0a\u5e02\u65f6\u95f4\u8d8a\u6765\u8d8a\u91cd\u8981\uff0c\u6211\u4eec\u5df2\u7ecf\u8e0f\u51fa\u4e86\u52a0\u901f\u6a21\u578b\u8bad\u7ec3\u7684\u4e00\u6b65\u3002\u5176\u4e2d\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\u662f\u5c06 Spark \u548c scikit-learn \u4e2d\u7684\u5143\u7d20\u7ec4\u5408\uff0c\u53d8\u6210\u6211\u4eec\u81ea\u5df1\u7684\u878d\u5408\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n

\u4f55\u4e3a sk-dist<\/strong><\/div>\n

\u6211\u4eec\u5f88\u9ad8\u5174\u63a8\u51fa\u6211\u4eec\u7684\u5f00\u6e90\u9879\u76ee sk-dist\u3002\u8be5\u9879\u76ee\u7684\u76ee\u6807\u662f\u63d0\u4f9b\u4e00\u4e2a\u5206\u914d scikit-learn \u5143\u4f30\u8ba1\u5668\u7684 Spark \u901a\u7528\u6846\u67b6\u3002\u5143\u4f30\u8ba1\u5668\u7684\u5e94\u7528\u5305\u62ec\u51b3\u7b56\u6811\u96c6\u5408\uff08\u968f\u673a\u68ee\u6797\u548c extra randomized trees\uff09\u3001\u8d85\u53c2\u6570\u8c03\u4f18\uff08\u7f51\u683c\u641c\u7d22\u548c\u968f\u673a\u641c\u7d22\uff09\u548c\u591a\u7c7b\u6280\u672f\uff08\u4e00\u5bf9\u591a\u548c\u4e00\u5bf9\u4e00\uff09\u3002<\/p>\n

\"\"
\n\u6211\u4eec\u7684\u4e3b\u8981\u76ee\u7684\u662f\u586b\u8865\u4f20\u7edf\u673a\u5668\u5b66\u4e60\u6a21\u578b\u5206\u5e03\u9009\u62e9\u7a7a\u95f4\u7684\u7a7a\u767d\u3002\u5728\u795e\u7ecf\u7f51\u7edc\u548c\u6df1\u5ea6\u5b66\u4e60\u7684\u7a7a\u95f4\u4e4b\u5916\uff0c\u6211\u4eec\u53d1\u73b0\u8bad\u7ec3\u6a21\u578b\u7684\u5927\u90e8\u5206\u8ba1\u7b97\u65f6\u95f4\u5e76\u672a\u82b1\u5728\u5355\u4e2a\u6570\u636e\u96c6\u4e0a\u7684\u5355\u4e2a\u6a21\u578b\u8bad\u7ec3\u4e0a\uff0c\u800c\u662f\u82b1\u5728\u7528\u7f51\u683c\u641c\u7d22\u6216\u96c6\u6210\u7b49\u5143\u4f30\u8ba1\u5668\u5728\u6570\u636e\u96c6\u7684\u591a\u6b21\u8fed\u4ee3\u4e2d\u8bad\u7ec3\u6a21\u578b\u7684\u591a\u6b21\u8fed\u4ee3\u4e0a\u3002<\/p>\n

\u5b9e\u4f8b<\/strong><\/div>\n

\u4ee5\u624b\u5199\u6570\u5b57\u6570\u636e\u96c6\u4e3a\u4f8b\u3002\u6211\u4eec\u7f16\u7801\u4e86\u624b\u5199\u6570\u5b57\u7684\u56fe\u50cf\u4ee5\u4fbf\u4e8e\u5206\u7c7b\u3002\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u4e00\u53f0\u673a\u5668\u5728\u6709 1797 \u6761\u8bb0\u5f55\u7684\u6570\u636e\u96c6\u4e0a\u5feb\u901f\u8bad\u7ec3\u4e00\u4e2a\u652f\u6301\u5411\u91cf\u673a\uff0c\u53ea\u9700\u4e0d\u5230\u4e00\u79d2\u3002\u4f46\u662f\uff0c\u8d85\u53c2\u6570\u8c03\u4f18\u9700\u8981\u5728\u8bad\u7ec3\u6570\u636e\u7684\u4e0d\u540c\u5b50\u96c6\u4e0a\u8fdb\u884c\u5927\u91cf\u8bad\u7ec3\u3002<\/p>\n

\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u6211\u4eec\u5df2\u7ecf\u6784\u5efa\u4e86\u4e00\u4e2a\u53c2\u6570\u7f51\u683c\uff0c\u603b\u5171\u9700\u8981 1050 \u4e2a\u8bad\u7ec3\u9879\u3002\u5728\u4e00\u4e2a\u62e5\u6709 100 \u591a\u4e2a\u6838\u5fc3\u7684 Spark \u96c6\u7fa4\u4e0a\u4f7f\u7528 sk-dist \u4ec5\u9700 3.4 \u79d2\u3002\u8fd9\u9879\u5de5\u4f5c\u7684\u603b\u4efb\u52a1\u65f6\u95f4\u662f 7.2 \u5206\u949f\uff0c\u8fd9\u610f\u5473\u7740\u5728\u4e00\u53f0\u6ca1\u6709\u5e76\u884c\u5316\u7684\u673a\u5668\u4e0a\u8bad\u7ec3\u9700\u8981\u8fd9\u4e48\u957f\u7684\u65f6\u95f4\u3002<\/p>\n

    import timefrom sklearn import datasets, svm \r\n    from skdist.distribute.search import DistGridSearchCV \r\n    from pyspark.sql import SparkSession # instantiate spark session \r\n    spark = (    \r\n        SparkSession     \r\n        .builder     \r\n        .getOrCreate()     \r\n        ) \r\n    sc = spark.sparkContext  \r\n     \r\n    # the digits dataset \r\n    digits = datasets.load_digits() \r\n    X = digits[\"data\"] \r\n    y = digits[\"target\"] \r\n     \r\n    # create a classifier: a support vector classifier \r\n    classifier = svm.SVC() \r\n    param_grid = { \r\n        \"C\": [0.01, 0.01, 0.1, 1.0, 10.0, 20.0, 50.0],  \r\n        \"gamma\": [\"scale\", \"auto\", 0.001, 0.01, 0.1],  \r\n        \"kernel\": [\"rbf\", \"poly\", \"sigmoid\"] \r\n        } \r\n    scoring = \"f1_weighted\" \r\n    cv = 10 \r\n     \r\n    # hyperparameter optimization \r\n    start = time.time() \r\n    model = DistGridSearchCV(     \r\n        classifier, param_grid,      \r\n        sc=sc, cv=cv, scoring=scoring, \r\n        verbose=True     \r\n        ) \r\n    model.fit(X,y) \r\n    print(\"Train time: {0}\".format(time.time() - start)) \r\n    print(\"Best score: {0}\".format(model.best_score_)) \r\n     \r\n     \r\n    ------------------------------ \r\n    Spark context found; running with spark \r\n    Fitting 10 folds for each of 105 candidates, totalling 1050 fits \r\n    Train time: 3.380601406097412 \r\n    Best score: 0.981450024203508<\/pre>\n

\u8be5\u793a\u4f8b\u8bf4\u660e\u4e86\u4e00\u4e2a\u5e38\u89c1\u60c5\u51b5\uff0c\u5176\u4e2d\u5c06\u6570\u636e\u62df\u5408\u5230\u5185\u5b58\u4e2d\u5e76\u8bad\u7ec3\u5355\u4e2a\u5206\u7c7b\u5668\u5e76\u4e0d\u91cd\u8981\uff0c\u4f46\u8d85\u53c2\u6570\u8c03\u6574\u6240\u9700\u7684\u62df\u5408\u6570\u91cf\u5f88\u5feb\u5c31\u4f1a\u589e\u52a0\u3002\u4ee5\u4e0b\u662f\u8fd0\u884c\u7f51\u683c\u641c\u7d22\u95ee\u9898\u7684\u5185\u5728\u673a\u5236\uff0c\u5982\u4e0a\u4f8b\u4e2d\u7684 sk-dist\uff1a
\n\"\"<\/p>\n

\u4f7f\u7528 sk-dist \u8fdb\u884c\u7f51\u683c\u641c\u7d22<\/strong><\/div>\n

\u5bf9\u4e8e Ibotta \u4f20\u7edf\u673a\u5668\u5b66\u4e60\u7684\u5b9e\u9645\u5e94\u7528\uff0c\u6211\u4eec\u7ecf\u5e38\u53d1\u73b0\u81ea\u5df1\u5904\u4e8e\u7c7b\u4f3c\u60c5\u51b5\uff1a\u4e2d\u5c0f\u578b\u6570\u636e\uff08100k \u5230 1M \u8bb0\u5f55\uff09\uff0c\u5176\u4e2d\u5305\u62ec\u591a\u6b21\u8fed\u4ee3\u7684\u7b80\u5355\u5206\u7c7b\u5668\uff0c\u9002\u5408\u4e8e\u8d85\u53c2\u6570\u8c03\u4f18\u3001\u96c6\u5408\u548c\u591a\u7c7b\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n

\u73b0\u6709\u89e3\u51b3\u65b9\u6848<\/p>\n

\u5bf9\u4e8e\u4f20\u7edf\u673a\u5668\u5b66\u4e60\u5143\u4f30\u8ba1\u8bad\u7ec3\uff0c\u73b0\u6709\u89e3\u51b3\u65b9\u6848\u662f\u5206\u5e03\u5f0f\u7684\u3002\u7b2c\u4e00\u4e2a\u662f\u6700\u7b80\u5355\u7684\uff1ascikit-learn \u4f7f\u7528 joblib \u5185\u7f6e\u5143\u4f30\u8ba1\u5668\u7684\u5e76\u884c\u5316\u3002\u8fd9\u4e0e sk-dist \u975e\u5e38\u76f8\u4f3c\uff0c\u9664\u4e86\u4e00\u4e2a\u4e3b\u8981\u9650\u5236\u56e0\u7d20\uff1a\u6027\u80fd\u53d7\u9650\u3002\u5373\u4f7f\u5bf9\u4e8e\u5177\u6709\u6570\u767e\u4e2a\u5185\u6838\u7684\u7406\u8bba\u5355\u53f0\u673a\u5668\uff0cSpark \u4ecd\u7136\u5177\u6709\u5982\u6267\u884c\u5668\u7684\u5185\u5b58\u8c03\u4f18\u89c4\u8303\u3001\u5bb9\u9519\u7b49\u4f18\u70b9\uff0c\u4ee5\u53ca\u6210\u672c\u63a7\u5236\u9009\u9879\uff0c\u4f8b\u5982\u4e3a\u5de5\u4f5c\u8282\u70b9\u4f7f\u7528 Spot \u5b9e\u4f8b\u3002<\/p>\n

\u53e6\u4e00\u4e2a\u73b0\u6709\u7684\u89e3\u51b3\u65b9\u6848\u662f Spark ML\u3002\u8fd9\u662f Spark \u7684\u672c\u673a\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u652f\u6301\u8bb8\u591a\u4e0e scikit-learn \u76f8\u540c\u7684\u7b97\u6cd5\uff0c\u7528\u4e8e\u5206\u7c7b\u548c\u56de\u5f52\u95ee\u9898\u3002\u5b83\u8fd8\u5177\u6709\u6811\u96c6\u5408\u548c\u7f51\u683c\u641c\u7d22\u7b49\u5143\u4f30\u8ba1\u5668\uff0c\u4ee5\u53ca\u5bf9\u591a\u7c7b\u95ee\u9898\u7684\u652f\u6301\u3002\u867d\u7136\u8fd9\u542c\u8d77\u6765\u53ef\u80fd\u662f\u5206\u914d scikit-learn \u6a21\u5f0f\u673a\u5668\u5b66\u4e60\u5de5\u4f5c\u8d1f\u8f7d\u7684\u4f18\u79c0\u89e3\u51b3\u65b9\u6848\uff0c\u4f46\u5b83\u7684\u5206\u5e03\u5f0f\u8bad\u7ec3\u5e76\u4e0d\u80fd\u89e3\u51b3\u6211\u4eec\u611f\u5174\u8da3\u7684\u5e76\u884c\u6027\u95ee\u9898\u3002<\/p>\n

\u5206\u5e03\u5728\u4e0d\u540c\u7ef4\u5ea6
\n\u5982\u4e0a\u6240\u793a\uff0cSpark ML \u5c06\u9488\u5bf9\u5206\u5e03\u5728\u591a\u4e2a\u6267\u884c\u5668\u4e0a\u7684\u6570\u636e\u8bad\u7ec3\u5355\u4e2a\u6a21\u578b\u3002\u5f53\u6570\u636e\u5f88\u5927\u4e14\u65e0\u6cd5\u5c06\u5185\u5b58\u653e\u5728\u4e00\u53f0\u673a\u5668\u4e0a\u65f6\uff0c\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u6709\u6548\u3002\u4f46\u662f\uff0c\u5f53\u6570\u636e\u5f88\u5c0f\u65f6\uff0c\u5b83\u5728\u5355\u53f0\u8ba1\u7b97\u673a\u4e0a\u7684\u8868\u73b0\u53ef\u80fd\u8fd8\u4e0d\u5982 scikit-learn\u3002\u6b64\u5916\uff0c\u5f53\u8bad\u7ec3\u968f\u673a\u68ee\u6797\u65f6\uff0cSpark ML \u6309\u987a\u5e8f\u8bad\u7ec3\u6bcf\u4e2a\u51b3\u7b56\u6811\u3002\u65e0\u8bba\u5206\u914d\u7ed9\u4efb\u52a1\u7684\u8d44\u6e90\u5982\u4f55\uff0c\u6b64\u4efb\u52a1\u7684\u6302\u8d77\u65f6\u95f4\u90fd\u5c06\u4e0e\u51b3\u7b56\u6811\u7684\u6570\u91cf\u6210\u7ebf\u6027\u6bd4\u4f8b\u3002<\/p>\n

\u5bf9\u4e8e\u7f51\u683c\u641c\u7d22\uff0cSpark ML \u786e\u5b9e\u5b9e\u73b0\u4e86\u5e76\u884c\u6027\u53c2\u6570\uff0c\u5c06\u5e76\u884c\u8bad\u7ec3\u5355\u4e2a\u6a21\u578b\u3002\u4f46\u662f\uff0c\u6bcf\u4e2a\u5355\u72ec\u7684\u6a21\u578b\u4ecd\u5728\u5bf9\u5206\u5e03\u5728\u6267\u884c\u5668\u4e2d\u7684\u6570\u636e\u8fdb\u884c\u8bad\u7ec3\u3002\u5982\u679c\u6309\u7167\u6a21\u578b\u7684\u7ef4\u5ea6\u800c\u975e\u6570\u636e\u8fdb\u884c\u5206\u5e03\uff0c\u90a3\u4e48\u4efb\u52a1\u7684\u603b\u5e76\u884c\u5ea6\u53ef\u80fd\u662f\u5b83\u7684\u4e00\u5c0f\u90e8\u5206\u3002<\/p>\n

\u6700\u7ec8\uff0c\u6211\u4eec\u5e0c\u671b\u5c06\u6211\u4eec\u7684\u8bad\u7ec3\u5206\u5e03\u5728\u4e0e Spark ML \u4e0d\u540c\u7684\u7ef4\u5ea6\u4e0a\u3002\u4f7f\u7528\u5c0f\u578b\u6216\u4e2d\u578b\u6570\u636e\u65f6\uff0c\u5c06\u6570\u636e\u62df\u5408\u5230\u5185\u5b58\u4e2d\u4e0d\u662f\u95ee\u9898\u3002\u5bf9\u4e8e\u968f\u673a\u68ee\u6797\u7684\u4f8b\u5b50\uff0c\u6211\u4eec\u5e0c\u671b\u5c06\u8bad\u7ec3\u6570\u636e\u5b8c\u6574\u5730\u5e7f\u64ad\u7ed9\u6bcf\u4e2a\u6267\u884c\u5668\uff0c\u5728\u6bcf\u4e2a\u6267\u884c\u5668\u4e0a\u62df\u5408\u4e00\u4e2a\u72ec\u7acb\u7684\u51b3\u7b56\u6811\uff0c\u5e76\u5c06\u90a3\u4e9b\u62df\u5408\u7684\u51b3\u7b56\u6811\u8fd4\u56de\u9a71\u52a8\u7a0b\u5e8f\u4ee5\u6784\u5efa\u968f\u673a\u68ee\u6797\u3002\u6cbf\u7740\u8fd9\u4e2a\u7ef4\u5ea6\u5206\u5e03\u6bd4\u4e32\u884c\u5206\u5e03\u6570\u636e\u548c\u8bad\u7ec3\u51b3\u7b56\u6811\u5feb\u51e0\u4e2a\u6570\u91cf\u7ea7\u3002\u8fd9\u79cd\u884c\u4e3a\u4e0e\u7f51\u683c\u641c\u7d22\u548c\u591a\u7c7b\u7b49\u5176\u4ed6\u5143\u4f30\u8ba1\u5668\u6280\u672f\u7c7b\u4f3c\u3002<\/p>\n

\u7279\u5f81<\/strong><\/div>\n

\u9274\u4e8e\u8fd9\u4e9b\u73b0\u6709\u89e3\u51b3\u65b9\u6848\u5728\u6211\u4eec\u7684\u95ee\u9898\u7a7a\u95f4\u4e2d\u7684\u5c40\u9650\u6027\uff0c\u6211\u4eec\u51b3\u5b9a\u5728\u5185\u90e8\u5f00\u53d1 sk-dist\u3002\u6700\u91cd\u8981\u7684\u662f\u6211\u4eec\u8981\u300c\u5206\u914d\u6a21\u578b\uff0c\u800c\u975e\u6570\u636e\u300d\u3002<\/p>\n

sk-dist \u7684\u91cd\u70b9\u662f\u5173\u6ce8\u5143\u4f30\u8ba1\u5668\u7684\u5206\u5e03\u5f0f\u8bad\u7ec3\uff0c\u8fd8\u5305\u62ec\u4f7f\u7528 Spark \u8fdb\u884c scikit-learn \u6a21\u578b\u5206\u5e03\u5f0f\u9884\u6d4b\u7684\u6a21\u5757\u3001\u7528\u4e8e\u65e0 Spark \u7684\u51e0\u4e2a\u9884\u5904\u7406\/\u540e\u5904\u7406\u7684 scikit-learn \u8f6c\u6362\u5668\u4ee5\u53ca\u7528\u4e8e\u6709\/\u65e0 Spark \u7684\u7075\u6d3b\u7279\u5f81\u7f16\u7801\u5668\u3002<\/p>\n

\u5206\u5e03\u5f0f\u8bad\u7ec3\uff1a\u4f7f\u7528 Spark \u5206\u914d\u5143\u4f30\u8ba1\u5668\u8bad\u7ec3\u3002\u652f\u6301\u4ee5\u4e0b\u7b97\u6cd5\uff1a\u8d85\u53c2\u6570\u8c03\u4f18\uff08\u7f51\u683c\u641c\u7d22\u548c\u968f\u673a\u641c\u7d22\uff09\u3001\u51b3\u7b56\u6811\u96c6\u5408\uff08\u968f\u673a\u68ee\u6797\u3001\u989d\u5916\u968f\u673a\u6811\u548c\u968f\u673a\u6811\u5d4c\u5165\uff09\u4ee5\u53ca\u591a\u7c7b\u6280\u672f\uff08\u4e00\u5bf9\u591a\u548c\u4e00\u5bf9\u4e00\uff09\u3002<\/p>\n

\u5206\u5e03\u5f0f\u9884\u6d4b\uff1a\u4f7f\u7528 Spark DataFrames \u5206\u5e03\u62df\u5408 scikit-learn \u4f30\u7b97\u5668\u7684\u9884\u6d4b\u65b9\u6cd5\u3002\u53ef\u4ee5\u901a\u8fc7\u4fbf\u643a\u5f0f scikit-learn \u4f30\u8ba1\u5668\u5b9e\u73b0\u5927\u89c4\u6a21\u5206\u5e03\u5f0f\u9884\u6d4b\uff0c\u8fd9\u4e9b\u4f30\u8ba1\u5668\u53ef\u4ee5\u4f7f\u7528\u6216\u4e0d\u4f7f\u7528 Spark\u3002<\/p>\n

\u7279\u5f81\u7f16\u7801\uff1a\u4f7f\u7528\u540d\u4e3a Encoderizer \u7684\u7075\u6d3b\u7279\u5f81\u8f6c\u6362\u5668\u5206\u5e03\u7279\u5f81\u7f16\u7801\u3002\u5b83\u53ef\u4ee5\u4f7f\u7528\u6216\u4e0d\u4f7f\u7528 Spark \u5e76\u884c\u5316\u3002\u5b83\u5c06\u63a8\u65ad\u6570\u636e\u7c7b\u578b\u548c\u5f62\u72b6\uff0c\u81ea\u52a8\u5e94\u7528\u9ed8\u8ba4\u7684\u7279\u5f81\u8f6c\u6362\u5668\u4f5c\u4e3a\u6807\u51c6\u7279\u5f81\u7f16\u7801\u6280\u672f\u7684\u6700\u4f73\u9884\u6d4b\u5b9e\u73b0\u3002\u5b83\u8fd8\u53ef\u4ee5\u4f5c\u4e3a\u5b8c\u5168\u53ef\u5b9a\u5236\u7684\u7279\u5f81\u8054\u5408\u7f16\u7801\u5668\u4f7f\u7528\uff0c\u540c\u65f6\u5177\u6709\u4e0e Spark \u5206\u5e03\u5f0f\u8f6c\u6362\u5668\u914d\u5408\u7684\u9644\u52a0\u4f18\u52bf\u3002<\/p>\n

\u7528\u4f8b<\/strong><\/div>\n

\u4ee5\u4e0b\u662f\u5224\u65ad sk-dist \u662f\u5426\u9002\u5408\u4f60\u7684\u673a\u5668\u5b66\u4e60\u95ee\u9898\u7a7a\u95f4\u7684\u4e00\u4e9b\u6307\u5bfc\u539f\u5219\uff1a<\/p>\n

\u4f20\u7edf\u673a\u5668\u5b66\u4e60 \uff1a\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\u3001\u968f\u673a\u68af\u5ea6\u4e0b\u964d\u3001\u6700\u8fd1\u90bb\u7b97\u6cd5\u3001\u51b3\u7b56\u6811\u548c\u6734\u7d20\u8d1d\u53f6\u65af\u9002\u7528\u4e8e sk-dist\u3002\u8fd9\u4e9b\u90fd\u53ef\u5728 scikit-learn \u4e2d\u5b9e\u73b0\uff0c\u53ef\u4ee5\u4f7f\u7528 sk-dist \u5143\u4f30\u8ba1\u5668\u76f4\u63a5\u5b9e\u73b0\u3002<\/p>\n

\u4e2d\u5c0f\u578b\u6570\u636e \uff1a\u5927\u6570\u636e\u4e0d\u9002\u7528\u4e8e sk-dist\u3002\u8bf7\u8bb0\u4f4f\uff0c\u8bad\u7ec3\u5206\u5e03\u7684\u7ef4\u5ea6\u662f\u6cbf\u7740\u6a21\u578b\u53d8\u5316\uff0c\u800c\u4e0d\u662f\u6570\u636e\u3002\u6570\u636e\u4e0d\u4ec5\u9700\u8981\u9002\u5408\u6bcf\u4e2a\u6267\u884c\u5668\u7684\u5185\u5b58\uff0c\u8fd8\u8981\u5c0f\u5230\u53ef\u4ee5\u5e7f\u64ad\u3002\u6839\u636e Spark \u914d\u7f6e\uff0c\u6700\u5927\u5e7f\u64ad\u5927\u5c0f\u53ef\u80fd\u4f1a\u53d7\u5230\u9650\u5236\u3002<\/p>\n

Spark \u5b9a\u4f4d\u4e0e\u8bbf\u95ee\uff1ask-dist \u7684\u6838\u5fc3\u529f\u80fd\u9700\u8981\u8fd0\u884c Spark\u3002\u5bf9\u4e8e\u4e2a\u4eba\u6216\u5c0f\u578b\u6570\u636e\u79d1\u5b66\u56e2\u961f\u800c\u8a00\uff0c\u8fd9\u5e76\u4e0d\u603b\u662f\u53ef\u884c\u7684\u3002\u6b64\u5916\uff0c\u4e3a\u4e86\u5229\u7528 sk-dist \u83b7\u5f97\u6700\u5927\u6210\u672c\u6548\u76ca\uff0c\u9700\u8981\u8fdb\u884c\u4e00\u4e9b Spark \u8c03\u6574\u548c\u914d\u7f6e\uff0c\u8fd9\u9700\u8981\u5bf9 Spark \u57fa\u7840\u77e5\u8bc6\u8fdb\u884c\u4e00\u4e9b\u8bad\u7ec3\u3002<\/p>\n

\u8fd9\u91cc\u4e00\u4e2a\u91cd\u8981\u7684\u6ce8\u610f\u4e8b\u9879\u662f\uff0c\u867d\u7136\u795e\u7ecf\u7f51\u7edc\u548c\u6df1\u5ea6\u5b66\u4e60\u5728\u6280\u672f\u4e0a\u53ef\u4ee5\u4e0e sk-dist \u4e00\u8d77\u4f7f\u7528\uff0c\u4f46\u8fd9\u4e9b\u6280\u672f\u9700\u8981\u5927\u91cf\u7684\u8bad\u7ec3\u6570\u636e\uff0c\u6709\u65f6\u9700\u8981\u4e13\u95e8\u7684\u57fa\u7840\u8bbe\u65bd\u624d\u80fd\u6709\u6548\u3002\u6df1\u5ea6\u5b66\u4e60\u4e0d\u662f sk-dist \u7684\u9884\u671f\u7528\u4f8b\uff0c\u56e0\u4e3a\u5b83\u8fdd\u53cd\u4e86\u4e0a\u9762\u7684 (1) \u548c (2)\u3002\u5728 Ibotta\uff0c\u6211\u4eec\u4e00\u76f4\u5728\u4f7f\u7528 Amazon SageMaker \u8fd9\u4e9b\u6280\u672f\uff0c\u6211\u4eec\u53d1\u73b0\u8fd9\u4e9b\u6280\u672f\u5bf9\u8fd9\u4e9b\u5de5\u4f5c\u8d1f\u8f7d\u7684\u8ba1\u7b97\u6bd4\u4f7f\u7528 Spark \u66f4\u6709\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u672c\u6587\u4e2d\uff0cIbotta\uff08\u7f8e\u56fd\u7248\u300c\u8fd4\u5229\u7f51\u300d\uff09\u673a\u5668\u5b66\u4e60\u548c\u6570\u636e\u79d1\u5b66\u7ecf\u7406 Evan Harris \u4ecb\u7ecd\u4e86\u4ed6\u4eec\u7684\u5f00\u6e90\u9879\u76ee […]<\/p>\n","protected":false},"author":1469,"featured_media":159972,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-159967","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/159967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=159967"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/159967\/revisions"}],"predecessor-version":[{"id":159973,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/159967\/revisions\/159973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/159972"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=159967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=159967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=159967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}