• Python+Spark2.0+hadoop学习笔记——Python Spark MLlib Decision Tree MultiClassification多分类


    二分类分类器大多可以用来进行开展多分类的问题,这篇以决策树为例来介绍Spark里MLlib的多分类问题实例,在这一篇中使用的评价指标是Accuracy。

    第一步:导入库函数

    import sys
    from time import time
    import pandas as pd
    import matplotlib.pyplot as plt
    from pyspark import SparkConf, SparkContext
    from pyspark.mllib.tree import DecisionTree
    from pyspark.mllib.regression import LabeledPoint
    from pyspark.mllib.evaluation import MulticlassMetrics

    第二步:数据准备

     def get_mapping(rdd, idx):

    return rdd.map(lambda fields: fields[idx]).distinct().zipWithIndex().collectAsMap()

    def extract_label(record):
    label=(record[-1])
    return float(label)-1

    def convert_float(x):
    return (0 if x=="?" else float(x))

    def extract_features(record,featureEnd):
    numericalFeatures=[convert_float(field) for field in record[0: featureEnd]]
    return numericalFeatures

    def PrepareData(sc):
    print("Data loading...")
    rawData = sc.textFile(Path+"data/covtype.data")
    print("The number of data:" + str(rawData.count()))
    lines = rawData.map(lambda x: x.split(","))
    labelpointRDD = lines.map(lambda r: LabeledPoint(
    extract_label(r),
    extract_features(r,len(r) - 1)))
    (trainData, validationData, testData) = labelpointRDD.randomSplit([8, 1, 1])
    print("trainData:" + str(trainData.count())+
    "validationData:" + str(validationData.count()) +
    "testData:" + str(testData.count()))
    print(labelpointRDD.first())
    return (trainData, validationData, testData)

    第三步:对模型进行训练

    def PredictData(sc,model):
    rawData = sc.textFile(Path+"data/covtype.data")
    print("The number of data:" + str(rawData.count()))
    print("RDD...")
    lines = rawData.map(lambda x: x.split(","))
    labelpointRDD = lines.map(lambda r: LabeledPoint(
    extract_label(r), extract_features(r,len(r) - 1)))
    for lp in labelpointRDD.take(100):
    predict = model.predict(lp.features)
    label=lp.label
    features=lp.features
    result = ("True" if (label == predict) else "False")
    print("Elevation:" + str(features[0]) +
    "Aspect:" + str(features[1]) +
    "Slope:" + str(features[2]) +
    "Vertical_Distance_To_Hydrology:" + str(features[3]) +
    "Horizontal_Distance_To_Roadways:" + str(features[4]) +
    "Hillshade_9am:" + str(features[5]) +
    "Predict:" + str(predict) +
    "Actual:" + str(label) + "Result:" + result)

    第四步:对模型进行评估(使用Accuracy)进行评估

    def evaluateModel(model, validationData):
    score = model.predict(validationData.map(lambda p: p.features))
    scoreAndLabels=score.zip(validationData.map(lambda p: p.label))
    metrics = MulticlassMetrics(scoreAndLabels)
    accuracy = metrics.accuracy
    return( accuracy)

    def trainEvaluateModel(trainData,validationData,
    impurityParm, maxDepthParm, maxBinsParm):
    startTime = time()
    model = DecisionTree.trainClassifier(trainData,
    numClasses=7, categoricalFeaturesInfo={},
    impurity=impurityParm,
    maxDepth=maxDepthParm,
    maxBins=maxBinsParm)
    accuracy = evaluateModel(model, validationData)
    duration = time() - startTime
    print ( " impurityParm= %s"%impurityParm+
    " maxDepthParm= %s"%maxDepthParm+
    " maxBinsParm = %d."%maxBinsParm +
    "Time=%d"%duration +
    " Accuracy = %f " % accuracy )
    return (accuracy,duration, impurityParm, maxDepthParm, maxBinsParm,model)

    def evalParameter(trainData, validationData, evaparm,impurityList, maxDepthList, maxBinsList):
    metrics = [trainEvaluateModel(trainData, validationData, impurity,numIter, maxBins )
    for impurity in impurityList for numIter in maxDepthList for maxBins in maxBinsList ]
    if evaparm=="impurity":
    IndexList=impurityList[:]
    elif evaparm=="maxDepth":
    IndexList=maxDepthList[:]
    elif evaparm=="maxBins":
    IndexList=maxBinsList[:]
    df = pd.DataFrame(metrics,index=IndexList,
    columns=['accuracy', 'duration','impurity', 'maxDepth', 'maxBins','model'])
    showchart(df,evaparm,'accuracy','duration',0.6,1.0 )

    def showchart(df,evalparm ,barData,lineData,yMin,yMax):
    ax = df[barData].plot(kind='bar', titl =evalparm,figsize=(10,6),legend=True, fontsize=12)
    ax.set_xlabel(evalparm,fontsize=12)
    ax.set_ylim([yMin,yMax])
    ax.set_ylabel(barData,fontsize=12)
    ax2 = ax.twinx()
    ax2.plot(df[[lineData ]].values, linestyle='-', marker='o', linewidth=2.0,color='r')
    plt.show()

    def evalAllParameter(training_RDD, validation_RDD, impurityList, maxDepthList, maxBinsList):
    metrics = [trainEvaluateModel(trainData, validationData, impurity,numIter, maxBins )
    for impurity in impurityList for numIter in maxDepthList for maxBins in maxBinsList ]
    Smetrics = sorted(metrics, key=lambda k: k[0], reverse=True)
    bestParameter=Smetrics[0]
    print("Best parameter: impurity:" + str(bestParameter[2]) +
    " ,maxDepth:" + str(bestParameter[3]) +
    " ,maxBins:" + str(bestParameter[4]) +
    " ,Accuracy = " + str(bestParameter[0]))
    return bestParameter[5]

    def parametersEval(training_RDD, validation_RDD):
    print("Impurity")
    evalParameter(trainData, validationData,"impurity",
    impurityList=["gini", "entropy"],
    maxDepthList=[10],
    maxBinsList=[10 ])

    print("MaxDepth")
    evalParameter(trainData, validationData,"maxDepth",
    impurityList=["gini"],
    maxDepthList=[3, 5, 10, 15, 20, 25],
    maxBinsList=[10])

    print("MaxBins")
    evalParameter(trainData, validationData,"maxBins",
    impurityList=["gini"],
    maxDepthList =[10],
    maxBinsList=[3, 5, 10, 50, 100, 200 ])

    第五步:Spark相关设置

    def SetLogger( sc ):
    logger = sc._jvm.org.apache.log4j
    logger.LogManager.getLogger("org"). setLevel( logger.Level.ERROR )
    logger.LogManager.getLogger("akka").setLevel( logger.Level.ERROR )
    logger.LogManager.getRootLogger().setLevel(logger.Level.ERROR)

    def SetPath(sc):
    global Path
    if sc.master[0:5]=="local" :
    Path="file:/home/jorlinlee/pythonsparkexample/PythonProject/"
    else:
    Path="hdfs://master:9000/user/jorlinlee/"

    def CreateSparkContext():
    sparkConf = SparkConf()
    .setAppName("MDT")
    .set("spark.ui.showConsoleProgress", "false")
    sc = SparkContext(conf = sparkConf)
    print ("master="+sc.master)
    SetLogger(sc)
    SetPath(sc)
    return (sc)

    sc.stop()

    第六步:运行主程序

    if __name__ == "__main__":
    print("MDT")
    sc=CreateSparkContext()
    print("Preparing")
    (trainData, validationData, testData) =PrepareData(sc)
    trainData.persist(); validationData.persist(); testData.persist()
    print("Evaluating")
    (AUC,duration, impurityParm, maxDepthParm, maxBinsParm,model)=
    trainEvaluateModel(trainData, validationData, "entropy", 15,50)
    if (len(sys.argv) == 2) and (sys.argv[1]=="-e"):
    parametersEval(trainData, validationData)
    elif (len(sys.argv) == 2) and (sys.argv[1]=="-a"):
    print("Best parameters")
    model=evalAllParameter(trainData, validationData,
    ["gini", "entropy"],
    [3, 5, 10, 15],
    [3, 5, 10, 50 ])
    print("Test")
    accuracy = evaluateModel(model, testData)
    print("Accuracy:" + str(accuracy))
    print("Predict")
    PredictData(sc, model)

    结果:

    Elevation:2596.0Aspect:51.0Slope:3.0Vertical_Distance_To_Hydrology:258.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:510.0Predict:4.0Actual:4.0Result:True
    Elevation:2590.0Aspect:56.0Slope:2.0Vertical_Distance_To_Hydrology:212.0Horizontal_Distance_To_Roadways:-6.0Hillshade_9am:390.0Predict:4.0Actual:4.0Result:True
    Elevation:2804.0Aspect:139.0Slope:9.0Vertical_Distance_To_Hydrology:268.0Horizontal_Distance_To_Roadways:65.0Hillshade_9am:3180.0Predict:1.0Actual:1.0Result:True
    Elevation:2785.0Aspect:155.0Slope:18.0Vertical_Distance_To_Hydrology:242.0Horizontal_Distance_To_Roadways:118.0Hillshade_9am:3090.0Predict:1.0Actual:1.0Result:True
    Elevation:2595.0Aspect:45.0Slope:2.0Vertical_Distance_To_Hydrology:153.0Horizontal_Distance_To_Roadways:-1.0Hillshade_9am:391.0Predict:4.0Actual:4.0Result:True
    Elevation:2579.0Aspect:132.0Slope:6.0Vertical_Distance_To_Hydrology:300.0Horizontal_Distance_To_Roadways:-15.0Hillshade_9am:67.0Predict:1.0Actual:1.0Result:True
    Elevation:2606.0Aspect:45.0Slope:7.0Vertical_Distance_To_Hydrology:270.0Horizontal_Distance_To_Roadways:5.0Hillshade_9am:633.0Predict:4.0Actual:4.0Result:True
    Elevation:2605.0Aspect:49.0Slope:4.0Vertical_Distance_To_Hydrology:234.0Horizontal_Distance_To_Roadways:7.0Hillshade_9am:573.0Predict:4.0Actual:4.0Result:True
    Elevation:2617.0Aspect:45.0Slope:9.0Vertical_Distance_To_Hydrology:240.0Horizontal_Distance_To_Roadways:56.0Hillshade_9am:666.0Predict:1.0Actual:4.0Result:False
    Elevation:2612.0Aspect:59.0Slope:10.0Vertical_Distance_To_Hydrology:247.0Horizontal_Distance_To_Roadways:11.0Hillshade_9am:636.0Predict:4.0Actual:4.0Result:True
    Elevation:2612.0Aspect:201.0Slope:4.0Vertical_Distance_To_Hydrology:180.0Horizontal_Distance_To_Roadways:51.0Hillshade_9am:735.0Predict:1.0Actual:4.0Result:False
    Elevation:2886.0Aspect:151.0Slope:11.0Vertical_Distance_To_Hydrology:371.0Horizontal_Distance_To_Roadways:26.0Hillshade_9am:5253.0Predict:1.0Actual:1.0Result:True
    Elevation:2742.0Aspect:134.0Slope:22.0Vertical_Distance_To_Hydrology:150.0Horizontal_Distance_To_Roadways:69.0Hillshade_9am:3215.0Predict:1.0Actual:1.0Result:True
    Elevation:2609.0Aspect:214.0Slope:7.0Vertical_Distance_To_Hydrology:150.0Horizontal_Distance_To_Roadways:46.0Hillshade_9am:771.0Predict:1.0Actual:4.0Result:False
    Elevation:2503.0Aspect:157.0Slope:4.0Vertical_Distance_To_Hydrology:67.0Horizontal_Distance_To_Roadways:4.0Hillshade_9am:674.0Predict:1.0Actual:4.0Result:False
    Elevation:2495.0Aspect:51.0Slope:7.0Vertical_Distance_To_Hydrology:42.0Horizontal_Distance_To_Roadways:2.0Hillshade_9am:752.0Predict:4.0Actual:4.0Result:True
    Elevation:2610.0Aspect:259.0Slope:1.0Vertical_Distance_To_Hydrology:120.0Horizontal_Distance_To_Roadways:-1.0Hillshade_9am:607.0Predict:1.0Actual:4.0Result:False
    Elevation:2517.0Aspect:72.0Slope:7.0Vertical_Distance_To_Hydrology:85.0Horizontal_Distance_To_Roadways:6.0Hillshade_9am:595.0Predict:4.0Actual:4.0Result:True
    Elevation:2504.0Aspect:0.0Slope:4.0Vertical_Distance_To_Hydrology:95.0Horizontal_Distance_To_Roadways:5.0Hillshade_9am:691.0Predict:4.0Actual:4.0Result:True
    Elevation:2503.0Aspect:38.0Slope:5.0Vertical_Distance_To_Hydrology:85.0Horizontal_Distance_To_Roadways:10.0Hillshade_9am:741.0Predict:4.0Actual:4.0Result:True
    Elevation:2501.0Aspect:71.0Slope:9.0Vertical_Distance_To_Hydrology:60.0Horizontal_Distance_To_Roadways:8.0Hillshade_9am:767.0Predict:4.0Actual:4.0Result:True
    Elevation:2880.0Aspect:209.0Slope:17.0Vertical_Distance_To_Hydrology:216.0Horizontal_Distance_To_Roadways:30.0Hillshade_9am:4986.0Predict:1.0Actual:1.0Result:True
    Elevation:2768.0Aspect:114.0Slope:23.0Vertical_Distance_To_Hydrology:192.0Horizontal_Distance_To_Roadways:82.0Hillshade_9am:3339.0Predict:4.0Actual:4.0Result:True
    Elevation:2511.0Aspect:54.0Slope:8.0Vertical_Distance_To_Hydrology:124.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:638.0Predict:4.0Actual:4.0Result:True
    Elevation:2507.0Aspect:22.0Slope:9.0Vertical_Distance_To_Hydrology:120.0Horizontal_Distance_To_Roadways:14.0Hillshade_9am:732.0Predict:1.0Actual:4.0Result:False
    Elevation:2492.0Aspect:135.0Slope:6.0Vertical_Distance_To_Hydrology:0.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:860.0Predict:4.0Actual:4.0Result:True
    Elevation:2489.0Aspect:163.0Slope:10.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:-4.0Hillshade_9am:849.0Predict:4.0Actual:4.0Result:True
    Elevation:2962.0Aspect:148.0Slope:16.0Vertical_Distance_To_Hydrology:323.0Horizontal_Distance_To_Roadways:23.0Hillshade_9am:5916.0Predict:1.0Actual:1.0Result:True
    Elevation:2811.0Aspect:135.0Slope:1.0Vertical_Distance_To_Hydrology:212.0Horizontal_Distance_To_Roadways:30.0Hillshade_9am:3670.0Predict:1.0Actual:1.0Result:True
    Elevation:2739.0Aspect:117.0Slope:24.0Vertical_Distance_To_Hydrology:127.0Horizontal_Distance_To_Roadways:53.0Hillshade_9am:3281.0Predict:4.0Actual:4.0Result:True
    Elevation:2703.0Aspect:122.0Slope:30.0Vertical_Distance_To_Hydrology:67.0Horizontal_Distance_To_Roadways:27.0Hillshade_9am:3191.0Predict:4.0Actual:4.0Result:True
    Elevation:2522.0Aspect:105.0Slope:7.0Vertical_Distance_To_Hydrology:120.0Horizontal_Distance_To_Roadways:1.0Hillshade_9am:595.0Predict:4.0Actual:4.0Result:True
    Elevation:2519.0Aspect:102.0Slope:6.0Vertical_Distance_To_Hydrology:124.0Horizontal_Distance_To_Roadways:4.0Hillshade_9am:616.0Predict:4.0Actual:4.0Result:True
    Elevation:2516.0Aspect:23.0Slope:6.0Vertical_Distance_To_Hydrology:150.0Horizontal_Distance_To_Roadways:4.0Hillshade_9am:658.0Predict:4.0Actual:4.0Result:True
    Elevation:2515.0Aspect:41.0Slope:9.0Vertical_Distance_To_Hydrology:162.0Horizontal_Distance_To_Roadways:4.0Hillshade_9am:680.0Predict:4.0Actual:4.0Result:True
    Elevation:2900.0Aspect:45.0Slope:19.0Vertical_Distance_To_Hydrology:242.0Horizontal_Distance_To_Roadways:20.0Hillshade_9am:5199.0Predict:1.0Actual:1.0Result:True
    Elevation:2709.0Aspect:125.0Slope:28.0Vertical_Distance_To_Hydrology:67.0Horizontal_Distance_To_Roadways:23.0Hillshade_9am:3224.0Predict:4.0Actual:4.0Result:True
    Elevation:2511.0Aspect:92.0Slope:7.0Vertical_Distance_To_Hydrology:182.0Horizontal_Distance_To_Roadways:18.0Hillshade_9am:722.0Predict:4.0Actual:4.0Result:True
    Elevation:2749.0Aspect:98.0Slope:30.0Vertical_Distance_To_Hydrology:124.0Horizontal_Distance_To_Roadways:53.0Hillshade_9am:3316.0Predict:4.0Actual:4.0Result:True
    Elevation:2686.0Aspect:354.0Slope:12.0Vertical_Distance_To_Hydrology:0.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:3167.0Predict:4.0Actual:4.0Result:True
    Elevation:2699.0Aspect:347.0Slope:3.0Vertical_Distance_To_Hydrology:0.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:2096.0Predict:0.0Actual:0.0Result:True
    Elevation:2570.0Aspect:346.0Slope:2.0Vertical_Distance_To_Hydrology:0.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:331.0Predict:1.0Actual:1.0Result:True
    Elevation:2533.0Aspect:71.0Slope:9.0Vertical_Distance_To_Hydrology:150.0Horizontal_Distance_To_Roadways:-3.0Hillshade_9am:577.0Predict:4.0Actual:4.0Result:True
    Elevation:2703.0Aspect:330.0Slope:27.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:17.0Hillshade_9am:3141.0Predict:4.0Actual:4.0Result:True
    Elevation:2678.0Aspect:128.0Slope:5.0Vertical_Distance_To_Hydrology:95.0Horizontal_Distance_To_Roadways:23.0Hillshade_9am:1660.0Predict:1.0Actual:1.0Result:True
    Elevation:2529.0Aspect:68.0Slope:8.0Vertical_Distance_To_Hydrology:210.0Horizontal_Distance_To_Roadways:-5.0Hillshade_9am:666.0Predict:4.0Actual:4.0Result:True
    Elevation:2524.0Aspect:94.0Slope:7.0Vertical_Distance_To_Hydrology:212.0Horizontal_Distance_To_Roadways:-4.0Hillshade_9am:684.0Predict:1.0Actual:4.0Result:False
    Elevation:2536.0Aspect:99.0Slope:6.0Vertical_Distance_To_Hydrology:234.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:659.0Predict:1.0Actual:4.0Result:False
    Elevation:2498.0Aspect:66.0Slope:6.0Vertical_Distance_To_Hydrology:95.0Horizontal_Distance_To_Roadways:7.0Hillshade_9am:900.0Predict:4.0Actual:4.0Result:True
    Elevation:2489.0Aspect:100.0Slope:7.0Vertical_Distance_To_Hydrology:85.0Horizontal_Distance_To_Roadways:13.0Hillshade_9am:810.0Predict:4.0Actual:4.0Result:True

    Elevation:2713.0Aspect:117.0Slope:30.0Vertical_Distance_To_Hydrology:60.0Horizontal_Distance_To_Roadways:17.0Hillshade_9am:3297.0Predict:1.0Actual:4.0Result:False
    Elevation:2739.0Aspect:323.0Slope:25.0Vertical_Distance_To_Hydrology:85.0Horizontal_Distance_To_Roadways:43.0Hillshade_9am:3118.0Predict:0.0Actual:0.0Result:True
    Elevation:2696.0Aspect:72.0Slope:2.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:3271.0Predict:0.0Actual:0.0Result:True
    Elevation:2510.0Aspect:79.0Slope:14.0Vertical_Distance_To_Hydrology:192.0Horizontal_Distance_To_Roadways:19.0Hillshade_9am:891.0Predict:4.0Actual:4.0Result:True
    Elevation:2502.0Aspect:81.0Slope:7.0Vertical_Distance_To_Hydrology:175.0Horizontal_Distance_To_Roadways:11.0Hillshade_9am:912.0Predict:4.0Actual:4.0Result:True
    Elevation:2722.0Aspect:315.0Slope:24.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:19.0Hillshade_9am:3216.0Predict:0.0Actual:0.0Result:True
    Elevation:2500.0Aspect:74.0Slope:11.0Vertical_Distance_To_Hydrology:190.0Horizontal_Distance_To_Roadways:9.0Hillshade_9am:930.0Predict:4.0Actual:4.0Result:True
    Elevation:2486.0Aspect:68.0Slope:5.0Vertical_Distance_To_Hydrology:180.0Horizontal_Distance_To_Roadways:-4.0Hillshade_9am:870.0Predict:4.0Actual:4.0Result:True
    Elevation:2489.0Aspect:11.0Slope:4.0Vertical_Distance_To_Hydrology:175.0Horizontal_Distance_To_Roadways:13.0Hillshade_9am:840.0Predict:4.0Actual:4.0Result:True
    Elevation:2489.0Aspect:42.0Slope:6.0Vertical_Distance_To_Hydrology:162.0Horizontal_Distance_To_Roadways:13.0Hillshade_9am:810.0Predict:4.0Actual:4.0Result:True
    Elevation:2490.0Aspect:75.0Slope:5.0Vertical_Distance_To_Hydrology:134.0Horizontal_Distance_To_Roadways:17.0Hillshade_9am:810.0Predict:4.0Actual:4.0Result:True
    Elevation:2952.0Aspect:107.0Slope:11.0Vertical_Distance_To_Hydrology:42.0Horizontal_Distance_To_Roadways:7.0Hillshade_9am:5845.0Predict:1.0Actual:1.0Result:True
    Elevation:2705.0Aspect:90.0Slope:8.0Vertical_Distance_To_Hydrology:134.0Horizontal_Distance_To_Roadways:22.0Hillshade_9am:2023.0Predict:1.0Actual:1.0Result:True
    Elevation:2507.0Aspect:40.0Slope:7.0Vertical_Distance_To_Hydrology:153.0Horizontal_Distance_To_Roadways:10.0Hillshade_9am:930.0Predict:4.0Actual:4.0Result:True
    Elevation:2500.0Aspect:49.0Slope:14.0Vertical_Distance_To_Hydrology:150.0Horizontal_Distance_To_Roadways:27.0Hillshade_9am:870.0Predict:1.0Actual:4.0Result:False
    Elevation:2493.0Aspect:63.0Slope:10.0Vertical_Distance_To_Hydrology:127.0Horizontal_Distance_To_Roadways:20.0Hillshade_9am:840.0Predict:1.0Actual:4.0Result:False
    Elevation:2509.0Aspect:59.0Slope:7.0Vertical_Distance_To_Hydrology:134.0Horizontal_Distance_To_Roadways:10.0Hillshade_9am:900.0Predict:1.0Actual:4.0Result:False
    Elevation:2919.0Aspect:13.0Slope:13.0Vertical_Distance_To_Hydrology:90.0Horizontal_Distance_To_Roadways:6.0Hillshade_9am:5321.0Predict:1.0Actual:0.0Result:False
    Elevation:2740.0Aspect:54.0Slope:6.0Vertical_Distance_To_Hydrology:218.0Horizontal_Distance_To_Roadways:42.0Hillshade_9am:2287.0Predict:1.0Actual:1.0Result:True
    Elevation:2640.0Aspect:80.0Slope:8.0Vertical_Distance_To_Hydrology:180.0Horizontal_Distance_To_Roadways:-2.0Hillshade_9am:1092.0Predict:1.0Actual:1.0Result:True
    Elevation:2843.0Aspect:166.0Slope:12.0Vertical_Distance_To_Hydrology:242.0Horizontal_Distance_To_Roadways:53.0Hillshade_9am:4434.0Predict:1.0Actual:1.0Result:True
    Elevation:3008.0Aspect:45.0Slope:14.0Vertical_Distance_To_Hydrology:277.0Horizontal_Distance_To_Roadways:10.0Hillshade_9am:6371.0Predict:1.0Actual:1.0Result:True
    Elevation:2893.0Aspect:114.0Slope:16.0Vertical_Distance_To_Hydrology:108.0Horizontal_Distance_To_Roadways:30.0Hillshade_9am:5066.0Predict:1.0Actual:1.0Result:True
    Elevation:2850.0Aspect:6.0Slope:9.0Vertical_Distance_To_Hydrology:0.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:4858.0Predict:1.0Actual:1.0Result:True
    Elevation:2628.0Aspect:30.0Slope:10.0Vertical_Distance_To_Hydrology:240.0Horizontal_Distance_To_Roadways:19.0Hillshade_9am:960.0Predict:1.0Actual:1.0Result:True
    Elevation:2864.0Aspect:118.0Slope:18.0Vertical_Distance_To_Hydrology:201.0Horizontal_Distance_To_Roadways:74.0Hillshade_9am:4567.0Predict:1.0Actual:1.0Result:True
    Elevation:2827.0Aspect:160.0Slope:28.0Vertical_Distance_To_Hydrology:134.0Horizontal_Distance_To_Roadways:65.0Hillshade_9am:3948.0Predict:1.0Actual:1.0Result:True
    Elevation:2529.0Aspect:326.0Slope:5.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:14.0Hillshade_9am:1062.0Predict:1.0Actual:1.0Result:True
    Elevation:2808.0Aspect:99.0Slope:7.0Vertical_Distance_To_Hydrology:382.0Horizontal_Distance_To_Roadways:95.0Hillshade_9am:3107.0Predict:0.0Actual:0.0Result:True
    Elevation:2840.0Aspect:153.0Slope:26.0Vertical_Distance_To_Hydrology:134.0Horizontal_Distance_To_Roadways:42.0Hillshade_9am:4613.0Predict:1.0Actual:1.0Result:True
    Elevation:2795.0Aspect:79.0Slope:10.0Vertical_Distance_To_Hydrology:531.0Horizontal_Distance_To_Roadways:96.0Hillshade_9am:2980.0Predict:0.0Actual:0.0Result:True
    Elevation:2746.0Aspect:143.0Slope:16.0Vertical_Distance_To_Hydrology:67.0Horizontal_Distance_To_Roadways:22.0Hillshade_9am:2440.0Predict:1.0Actual:1.0Result:True
    Elevation:2847.0Aspect:352.0Slope:26.0Vertical_Distance_To_Hydrology:150.0Horizontal_Distance_To_Roadways:82.0Hillshade_9am:3697.0Predict:0.0Actual:0.0Result:True
    Elevation:2840.0Aspect:14.0Slope:14.0Vertical_Distance_To_Hydrology:216.0Horizontal_Distance_To_Roadways:88.0Hillshade_9am:3552.0Predict:0.0Actual:0.0Result:True
    Elevation:2537.0Aspect:42.0Slope:7.0Vertical_Distance_To_Hydrology:210.0Horizontal_Distance_To_Roadways:17.0Hillshade_9am:1132.0Predict:1.0Actual:1.0Result:True
    Elevation:2860.0Aspect:358.0Slope:17.0Vertical_Distance_To_Hydrology:175.0Horizontal_Distance_To_Roadways:98.0Hillshade_9am:3705.0Predict:0.0Actual:0.0Result:True
    Elevation:2818.0Aspect:332.0Slope:26.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:17.0Hillshade_9am:4526.0Predict:1.0Actual:1.0Result:True
    Elevation:2801.0Aspect:18.0Slope:7.0Vertical_Distance_To_Hydrology:560.0Horizontal_Distance_To_Roadways:58.0Hillshade_9am:3084.0Predict:1.0Actual:1.0Result:True
    Elevation:2791.0Aspect:63.0Slope:10.0Vertical_Distance_To_Hydrology:418.0Horizontal_Distance_To_Roadways:48.0Hillshade_9am:2942.0Predict:1.0Actual:1.0Result:True
    Elevation:2745.0Aspect:306.0Slope:11.0Vertical_Distance_To_Hydrology:67.0Horizontal_Distance_To_Roadways:24.0Hillshade_9am:2416.0Predict:1.0Actual:1.0Result:True
    Elevation:2514.0Aspect:102.0Slope:6.0Vertical_Distance_To_Hydrology:272.0Horizontal_Distance_To_Roadways:-5.0Hillshade_9am:1082.0Predict:1.0Actual:1.0Result:True
    Elevation:2788.0Aspect:13.0Slope:16.0Vertical_Distance_To_Hydrology:30.0Horizontal_Distance_To_Roadways:8.0Hillshade_9am:4126.0Predict:1.0Actual:1.0Result:True
    Elevation:2562.0Aspect:354.0Slope:12.0Vertical_Distance_To_Hydrology:67.0Horizontal_Distance_To_Roadways:9.0Hillshade_9am:1057.0Predict:1.0Actual:1.0Result:True
    Elevation:3073.0Aspect:173.0Slope:12.0Vertical_Distance_To_Hydrology:108.0Horizontal_Distance_To_Roadways:-3.0Hillshade_9am:6836.0Predict:1.0Actual:1.0Result:True
    Elevation:2978.0Aspect:71.0Slope:10.0Vertical_Distance_To_Hydrology:426.0Horizontal_Distance_To_Roadways:85.0Hillshade_9am:5742.0Predict:1.0Actual:1.0Result:True
    Elevation:2860.0Aspect:31.0Slope:10.0Vertical_Distance_To_Hydrology:295.0Horizontal_Distance_To_Roadways:98.0Hillshade_9am:3644.0Predict:0.0Actual:0.0Result:True
    Elevation:3067.0Aspect:164.0Slope:11.0Vertical_Distance_To_Hydrology:85.0Horizontal_Distance_To_Roadways:7.0Hillshade_9am:6811.0Predict:1.0Actual:1.0Result:True
    Elevation:2804.0Aspect:72.0Slope:5.0Vertical_Distance_To_Hydrology:543.0Horizontal_Distance_To_Roadways:61.0Hillshade_9am:3115.0Predict:1.0Actual:1.0Result:True
    Elevation:2562.0Aspect:59.0Slope:3.0Vertical_Distance_To_Hydrology:0.0Horizontal_Distance_To_Roadways:0.0Hillshade_9am:1116.0Predict:1.0Actual:1.0Result:True
    Elevation:2567.0Aspect:34.0Slope:9.0Vertical_Distance_To_Hydrology:190.0Horizontal_Distance_To_Roadways:16.0Hillshade_9am:1136.0Predict:1.0Actual:1.0Result:True

  • 相关阅读:
    adb实操
    android默认获取敏感权限
    Android Studio升级到3.4遇到的问题总结
    setOnTouchListener在小米手机中不走ACTION_UP而是走ACTION_CANCEL
    应用中对APK进行安装
    安卓蓝牙开发知识
    一个人开发一个产品,小程序从0到1,第9章 数组
    一个人开发一个产品,小程序从0到1,第8章 字符串
    一个人开发一个产品,小程序从0到1,第7章 数值类型
    一个人开发一个产品,小程序从0到1,第6章 常量变量
  • 原文地址:https://www.cnblogs.com/zhuozige/p/12639832.html
Copyright © 2020-2023  润新知