Spark実践 #6 PySpark ML その2

MLの流れをもう少し詳しく把握してみよう。

で返されたmodelの構造を良く見てみる。
[Row(
INFANT_ALIVE_AT_REPORT=0,
BIRTH_PLACE=’1′,
0) MOTHER_AGE_YEARS=13,
1) FATHER_COMBINED_AGE=99,
CIG_BEFORE=0,
CIG_1_TRI=0,
CIG_2_TRI=0,
CIG_3_TRI=0,
6) MOTHER_HEIGHT_IN=66,
7) MOTHER_PRE_WEIGHT=133,
8) MOTHER_DELIVERY_WEIGHT=135,
9) MOTHER_WEIGHT_GAIN=2,
DIABETES_PRE=0,
DIABETES_GEST=0,
HYP_TENS_PRE=0,
HYP_TENS_GEST=0,
PREV_BIRTH_PRETERM=0,
BIRTH_PLACE_INT=1,
16) BIRTH_PLACE_VEC=SparseVector(9, {1: 1.0}),
features=SparseVector(24, {0: 13.0, 1: 99.0, 6: 66.0, 7: 133.0, 8: 135.0, 9: 2.0, 16: 1.0}),
rawPrediction=DenseVector([1.0545, -1.0545]), probability=DenseVector([0.7416, 0.2584]),
prediction=0.0
)]

|INFANT_ALIVE_AT_REPORT: 0
|BIRTH_PLACE: 1
|MOTHER_AGE_YEARS: 29
|FATHER_COMBINED_AGE: 99
|CIG_BEFORE: 0
|CIG_1_TRI: 0
|CIG_2_TRI: 0
|CIG_3_TRI: 0
|MOTHER_HEIGHT_IN: 99
|MOTHER_PRE_WEIGHT: 999
|MOTHER_DELIVERY_WEIGHT: 999
|MOTHER_WEIGHT_GAIN: 99
|DIABETES_PRE: 0
|DIABETES_GEST: 0
|HYP_TENS_PRE: 0
|HYP_TENS_GEST: 0
|PREV_BIRTH_PRETERM: 0
|BIRTH_PLACE_INT: 1
|BIRTH_PLACE_VEC:(9,[1],[1.0])