当前位置:   article > 正文

决策树算法(三)_res=estimator.predict()

res=estimator.predict()

日萌社

人工智能AI:Keras PyTorch MXNet TensorFlow PaddlePaddle 深度学习实战(不定时更新)


决策树算法(一)

决策树算法(二)

决策树算法(三)

决策树算法(四)


4.6 案例:泰坦尼克号乘客生存预测

1 案例背景

泰坦尼克号沉没是历史上最臭名昭着的沉船之一。1912年4月15日,在她的处女航中,泰坦尼克号在与冰山相撞后沉没,在2224名乘客和机组人员中造成1502人死亡。这场耸人听闻的悲剧震惊了国际社会,并为船舶制定了更好的安全规定。 造成海难失事的原因之一是乘客和机组人员没有足够的救生艇。尽管幸存下沉有一些运气因素,但有些人比其他人更容易生存,例如妇女,儿童和上流社会。 在这个案例中,我们要求您完成对哪些人可能存活的分析。特别是,我们要求您运用机器学习工具来预测哪些乘客幸免于悲剧。

案例:https://www.kaggle.com/c/titanic/overview

我们提取到的数据集中的特征包括票的类别,是否存活,乘坐班次,年龄,登陆home.dest,房间,船和性别等。

数据:http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic.txt

经过观察数据得到:

  • 1 乘坐班是指乘客班(1,2,3),是社会经济阶层的代表。

  • 2 其中age数据存在缺失。

2 步骤分析

  • 1.获取数据
  • 2.数据基本处理
    • 2.1 确定特征值,目标值
    • 2.2 缺失值处理
    • 2.3 数据集划分
  • 3.特征工程(字典特征抽取)
  • 4.机器学习(决策树)
  • 5.模型评估

3 代码实现

  • 导入需要的模块
  1. import pandas as pd
  2. import numpy as np
  3. from sklearn.feature_extraction import DictVectorizer
  4. from sklearn.model_selection import train_test_split
  5. from sklearn.tree import DecisionTreeClassifier, export_graphviz
  • 1.获取数据
  1. # 1、获取数据
  2. titan = pd.read_csv("http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic.txt")
  • 2.数据基本处理

    • 2.1 确定特征值,目标值
    1. x = titan[["pclass", "age", "sex"]]
    2. y = titan["survived"]
    • 2.2 缺失值处理
    1. # 缺失值需要处理,将特征当中有类别的这些特征进行字典特征抽取
    2. x['age'].fillna(x['age'].mean(), inplace=True)
    • 2.3 数据集划分
    x_train, x_test, y_train, y_test = train_test_split(x, y, random_state=22)
    
  • 3.特征工程(字典特征抽取)

特征中出现类别符号,需要进行one-hot编码处理(DictVectorizer)

x.to_dict(orient="records") 需要将数组特征转换成字典数据

  1. # 对于x转换成字典数据x.to_dict(orient="records")
  2. # [{"pclass": "1st", "age": 29.00, "sex": "female"}, {}]
  3. transfer = DictVectorizer(sparse=False)
  4. x_train = transfer.fit_transform(x_train.to_dict(orient="records"))
  5. x_test = transfer.fit_transform(x_test.to_dict(orient="records"))
  • 4.决策树模型训练和模型评估

决策树API当中,如果没有指定max_depth那么会根据信息熵的条件直到最终结束。这里我们可以指定树的深度来进行限制树的大小

  1. # 4.机器学习(决策树)
  2. estimator = DecisionTreeClassifier(criterion="entropy", max_depth=5)
  3. estimator.fit(x_train, y_train)
  4. # 5.模型评估
  5. estimator.score(x_test, y_test)
  6. estimator.predict(x_test)

决策树的结构是可以直接显示

4 决策树可视化

4.1 保存树的结构到dot文件

  • sklearn.tree.export_graphviz() 该函数能够导出DOT格式
    • tree.export_graphviz(estimator,out_file='tree.dot’,feature_names=[‘’,’’])
export_graphviz(estimator, out_file="./data/tree.dot", feature_names=['age', 'pclass=1st', 'pclass=2nd', 'pclass=3rd', '女性', '男性'])

dot文件当中的内容如下

  1. digraph Tree {
  2. node [shape=box] ;
  3. 0 [label="petal length (cm) <= 2.45\nentropy = 1.584\nsamples = 112\nvalue = [39, 37, 36]"] ;
  4. 1 [label="entropy = 0.0\nsamples = 39\nvalue = [39, 0, 0]"] ;
  5. 0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
  6. 2 [label="petal width (cm) <= 1.75\nentropy = 1.0\nsamples = 73\nvalue = [0, 37, 36]"] ;
  7. 0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
  8. 3 [label="petal length (cm) <= 5.05\nentropy = 0.391\nsamples = 39\nvalue = [0, 36, 3]"] ;
  9. 2 -> 3 ;
  10. 4 [label="sepal length (cm) <= 4.95\nentropy = 0.183\nsamples = 36\nvalue = [0, 35, 1]"] ;
  11. 3 -> 4 ;
  12. 5 [label="petal length (cm) <= 3.9\nentropy = 1.0\nsamples = 2\nvalue = [0, 1, 1]"] ;
  13. 4 -> 5 ;
  14. 6 [label="entropy = 0.0\nsamples = 1\nvalue = [0, 1, 0]"] ;
  15. 5 -> 6 ;
  16. 7 [label="entropy = 0.0\nsamples = 1\nvalue = [0, 0, 1]"] ;
  17. 5 -> 7 ;
  18. 8 [label="entropy = 0.0\nsamples = 34\nvalue = [0, 34, 0]"] ;
  19. 4 -> 8 ;
  20. 9 [label="petal width (cm) <= 1.55\nentropy = 0.918\nsamples = 3\nvalue = [0, 1, 2]"] ;
  21. 3 -> 9 ;
  22. 10 [label="entropy = 0.0\nsamples = 2\nvalue = [0, 0, 2]"] ;
  23. 9 -> 10 ;
  24. 11 [label="entropy = 0.0\nsamples = 1\nvalue = [0, 1, 0]"] ;
  25. 9 -> 11 ;
  26. 12 [label="petal length (cm) <= 4.85\nentropy = 0.191\nsamples = 34\nvalue = [0, 1, 33]"] ;
  27. 2 -> 12 ;
  28. 13 [label="entropy = 0.0\nsamples = 1\nvalue = [0, 1, 0]"] ;
  29. 12 -> 13 ;
  30. 14 [label="entropy = 0.0\nsamples = 33\nvalue = [0, 0, 33]"] ;
  31. 12 -> 14 ;
  32. }

那么这个结构不能看清结构,所以可以在一个网站上显示

4.2 网站显示结构

5 决策树总结

  • 优点:
    • 简单的理解和解释,树木可视化。
  • 缺点:
    • 决策树学习者可以创建不能很好地推广数据的过于复杂的树,容易发生过拟合。
  • 改进:
    • 减枝cart算法
    • 随机森林(集成学习的一种)

注:企业重要决策,由于决策树很好的分析能力,在决策过程应用较多, 可以选择特征


6 小结

  • 案例流程分析【了解】
    • 1.获取数据
    • 2.数据基本处理
      • 2.1 确定特征值,目标值
      • 2.2 缺失值处理
      • 2.3 数据集划分
    • 3.特征工程(字典特征抽取)
    • 4.机器学习(决策树)
    • 5.模型评估
  • 决策树可视化【了解】
    • sklearn.tree.export_graphviz()
  • 决策树优缺点总结【知道】
    • 优点:
      • 简单的理解和解释,树木可视化。
    • 缺点:
      • 决策树学习者可以创建不能很好地推广数据的过于复杂的树,容易发生过拟合。
    • 改进:
      • 减枝cart算法
      • 随机森林(集成学习的一种)

In [1]:

# 1.获取数据
# 2.数据基本处理
# 2.1 确定特征值,目标值
# 2.2 缺失值处理
# 2.3 数据集划分
# 3.特征工程(字典特征抽取)
# 4.机器学习(决策树)
# 5.模型评估

In [2]:

import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction import DictVectorizer
from sklearn.tree import DecisionTreeClassifier, export_graphviz

In [3]:

# 1.获取数据
titan = pd.read_csv("http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic.txt")

In [4]:

titan

Out[4]:

row.namespclasssurvivednameageembarkedhome.destroomticketboatsex
011st1Allen, Miss Elisabeth Walton29.0000SouthamptonSt Louis, MOB-524160 L2212female
121st0Allison, Miss Helen Loraine2.0000SouthamptonMontreal, PQ / Chesterville, ONC26NaNNaNfemale
231st0Allison, Mr Hudson Joshua Creighton30.0000SouthamptonMontreal, PQ / Chesterville, ONC26NaN(135)male
341st0Allison, Mrs Hudson J.C. (Bessie Waldo Daniels)25.0000SouthamptonMontreal, PQ / Chesterville, ONC26NaNNaNfemale
451st1Allison, Master Hudson Trevor0.9167SouthamptonMontreal, PQ / Chesterville, ONC22NaN11male
561st1Anderson, Mr Harry47.0000SouthamptonNew York, NYE-12NaN3male
671st1Andrews, Miss Kornelia Theodosia63.0000SouthamptonHudson, NYD-713502 L7710female
781st0Andrews, Mr Thomas, jr39.0000SouthamptonBelfast, NIA-36NaNNaNmale
891st1Appleton, Mrs Edward Dale (Charlotte Lamson)58.0000SouthamptonBayside, Queens, NYC-101NaN2female
9101st0Artagaveytia, Mr Ramon71.0000CherbourgMontevideo, UruguayNaNNaN(22)male
10111st0Astor, Colonel John Jacob47.0000CherbourgNew York, NYNaN17754 L224 10s 6d(124)male
11121st1Astor, Mrs John Jacob (Madeleine Talmadge Force)19.0000CherbourgNew York, NYNaN17754 L224 10s 6d4female
12131st1Aubert, Mrs Leontine PaulineNaNCherbourgParis, FranceB-3517477 L69 6s9female
13141st1Barkworth, Mr Algernon H.NaNSouthamptonHessle, YorksA-23NaNBmale
14151st0Baumann, Mr John D.NaNSouthamptonNew York, NYNaNNaNNaNmale
15161st1Baxter, Mrs James (Helene DeLaudeniere Chaput)50.0000CherbourgMontreal, PQB-58/60NaN6female
16171st0Baxter, Mr Quigg Edmond24.0000CherbourgMontreal, PQB-58/60NaNNaNmale
17181st0Beattie, Mr Thomson36.0000CherbourgWinnipeg, MNC-6NaNNaNmale
18191st1Beckwith, Mr Richard Leonard37.0000SouthamptonNew York, NYD-35NaN5male
19201st1Beckwith, Mrs Richard Leonard (Sallie Monypeny)47.0000SouthamptonNew York, NYD-35NaN5female
20211st1Behr, Mr Karl Howell26.0000CherbourgNew York, NYC-148NaN5male
21221st0Birnbaum, Mr Jakob25.0000CherbourgSan Francisco, CANaNNaN(148)male
22231st1Bishop, Mr Dickinson H.25.0000CherbourgDowagiac, MIB-49NaN7male
23241st1Bishop, Mrs Dickinson H. (Helen Walton)19.0000CherbourgDowagiac, MIB-49NaN7female
24251st1Bjornstrm-Steffansson, Mr Mauritz Hakan28.0000SouthamptonStockholm, Sweden / Washington, DCNaNDmale
25261st0Blackwell, Mr Stephen Weart45.0000SouthamptonTrenton, NJNaNNaN(241)male
26271st1Blank, Mr Henry39.0000CherbourgGlen Ridge, NJA-31NaN7male
27281st1Bonnell, Miss Caroline30.0000SouthamptonYoungstown, OHC-7NaN8female
28291st1Bonnell, Miss Elizabeth58.0000SouthamptonBirkdale, England Cleveland, OhioC-103NaN8female
29301st0Borebank, Mr John JamesNaNSouthamptonLondon / Winnipeg, MBD-21/2NaNNaNmale
....................................
128312843rd0Vestrom, Miss Hulda Amanda AdolfinaNaNNaNNaNNaNNaNNaNfemale
128412853rd0Vonk, Mr JenkoNaNNaNNaNNaNNaNNaNmale
128512863rd0Ware, Mr FrederickNaNNaNNaNNaNNaNNaNmale
128612873rd0Warren, Mr Charles WilliamNaNNaNNaNNaNNaNNaNmale
128712883rd0Wazli, Mr YousifNaNNaNNaNNaNNaNNaNmale
128812893rd0Webber, Mr JamesNaNNaNNaNNaNNaNNaNmale
128912903rd1Wennerstrom, Mr August EdvardNaNNaNNaNNaNNaNNaNmale
129012913rd0Wenzel, Mr LinhartNaNNaNNaNNaNNaNNaNmale
129112923rd0Widegren, Mr Charles PeterNaNNaNNaNNaNNaNNaNmale
129212933rd0Wiklund, Mr Jacob AlfredNaNNaNNaNNaNNaNNaNmale
129312943rd1Wilkes, Mrs EllenNaNNaNNaNNaNNaNNaNfemale
129412953rd0Willer, Mr AaronNaNNaNNaNNaNNaNNaNmale
129512963rd0Willey, Mr EdwardNaNNaNNaNNaNNaNNaNmale
129612973rd0Williams, Mr Howard HughNaNNaNNaNNaNNaNNaNmale
129712983rd0Williams, Mr LeslieNaNNaNNaNNaNNaNNaNmale
129812993rd0Windelov, Mr EinarNaNNaNNaNNaNNaNNaNmale
129913003rd0Wirz, Mr AlbertNaNNaNNaNNaNNaNNaNmale
130013013rd0Wiseman, Mr PhillippeNaNNaNNaNNaNNaNNaNmale
130113023rd0Wittevrongel, Mr CamielNaNNaNNaNNaNNaNNaNmale
130213033rd1Yalsevac, Mr IvanNaNNaNNaNNaNNaNNaNmale
130313043rd0Yasbeck, Mr AntoniNaNNaNNaNNaNNaNNaNmale
130413053rd1Yasbeck, Mrs AntoniNaNNaNNaNNaNNaNNaNfemale
130513063rd0Youssef, Mr GeriosNaNNaNNaNNaNNaNNaNmale
130613073rd0Zabour, Miss HileniNaNNaNNaNNaNNaNNaNfemale
130713083rd0Zabour, Miss TaminiNaNNaNNaNNaNNaNNaNfemale
130813093rd0Zakarian, Mr ArtunNaNNaNNaNNaNNaNNaNmale
130913103rd0Zakarian, Mr MapriederNaNNaNNaNNaNNaNNaNmale
131013113rd0Zenn, Mr PhilipNaNNaNNaNNaNNaNNaNmale
131113123rd0Zievens, ReneNaNNaNNaNNaNNaNNaNfemale
131213133rd0Zimmerman, LeoNaNNaNNaNNaNNaNNaNmale

1313 rows × 11 columns

In [5]:

titan.describe()

Out[5]:

row.namessurvivedage
count1313.0000001313.000000633.000000
mean657.0000000.34196531.194181
std379.1747620.47454914.747525
min1.0000000.0000000.166700
25%329.0000000.00000021.000000
50%657.0000000.00000030.000000
75%985.0000001.00000041.000000
max1313.0000001.00000071.000000

In [6]:

# 2.数据基本处理
# 2.1 确定特征值,目标值
x = titan[["pclass", "age", "sex"]]
y = titan["survived"]

In [7]:

x.head()

Out[7]:

pclassagesex
01st29.0000female
11st2.0000female
21st30.0000male
31st25.0000female
41st0.9167male

In [8]:

y.head()

Out[8]:

  1. 0 1
  2. 1 0
  3. 2 0
  4. 3 0
  5. 4 1
  6. Name: survived, dtype: int64

In [9]:

# 2.2 缺失值处理
x['age'].fillna(value=titan["age"].mean(), inplace=True)

In [10]:

x.head()

Out[10]:

pclassagesex
01st29.0000female
11st2.0000female
21st30.0000male
31st25.0000female
41st0.9167male

In [11]:

# 2.3 数据集划分
x_train, x_test, y_train, y_test = train_test_split(x, y, random_state=22, test_size=0.2)

In [12]:

# 3.特征工程(字典特征抽取)

In [13]:

x_train.head()

Out[13]:

pclassagesex
6493rd45.000000female
10783rd31.194181male
591st31.194181female
2011st18.000000male
611st31.194181female

In [14]:

x_train = x_train.to_dict(orient="records")
x_test = x_test.to_dict(orient="records")

In [15]:

x_train

Out[15]:

  1. [{'pclass': '3rd', 'age': 45.0, 'sex': 'female'},
  2. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  3. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  4. {'pclass': '1st', 'age': 18.0, 'sex': 'male'},
  5. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  6. {'pclass': '3rd', 'age': 6.0, 'sex': 'male'},
  7. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  8. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  9. {'pclass': '3rd', 'age': 27.0, 'sex': 'female'},
  10. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  11. {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},
  12. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  13. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  14. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  15. {'pclass': '2nd', 'age': 4.0, 'sex': 'female'},
  16. {'pclass': '1st', 'age': 31.0, 'sex': 'male'},
  17. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  18. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  19. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  20. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  21. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  22. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  23. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  24. {'pclass': '3rd', 'age': 13.0, 'sex': 'male'},
  25. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  26. {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},
  27. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  28. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  29. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  30. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  31. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  32. {'pclass': '1st', 'age': 30.0, 'sex': 'female'},
  33. {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},
  34. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  35. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  36. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  37. {'pclass': '1st', 'age': 22.0, 'sex': 'female'},
  38. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  39. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  40. {'pclass': '1st', 'age': 49.0, 'sex': 'male'},
  41. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  42. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  43. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  44. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  45. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  46. {'pclass': '1st', 'age': 62.0, 'sex': 'male'},
  47. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  48. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  49. {'pclass': '3rd', 'age': 32.0, 'sex': 'female'},
  50. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  51. {'pclass': '1st', 'age': 64.0, 'sex': 'female'},
  52. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  53. {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},
  54. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  55. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  56. {'pclass': '1st', 'age': 55.0, 'sex': 'male'},
  57. {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},
  58. {'pclass': '1st', 'age': 6.0, 'sex': 'male'},
  59. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  60. {'pclass': '3rd', 'age': 10.0, 'sex': 'female'},
  61. {'pclass': '1st', 'age': 53.0, 'sex': 'female'},
  62. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  63. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  64. {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},
  65. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  66. {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},
  67. {'pclass': '1st', 'age': 19.0, 'sex': 'male'},
  68. {'pclass': '1st', 'age': 28.0, 'sex': 'male'},
  69. {'pclass': '1st', 'age': 17.0, 'sex': 'male'},
  70. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  71. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  72. {'pclass': '3rd', 'age': 21.0, 'sex': 'female'},
  73. {'pclass': '1st', 'age': 25.0, 'sex': 'female'},
  74. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  75. {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},
  76. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  77. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  78. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  79. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  80. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  81. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  82. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  83. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  84. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  85. {'pclass': '1st', 'age': 21.0, 'sex': 'female'},
  86. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  87. {'pclass': '2nd', 'age': 48.0, 'sex': 'male'},
  88. {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},
  89. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  90. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  91. {'pclass': '1st', 'age': 46.0, 'sex': 'male'},
  92. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  93. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  94. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  95. {'pclass': '2nd', 'age': 29.0, 'sex': 'female'},
  96. {'pclass': '1st', 'age': 35.0, 'sex': 'male'},
  97. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  98. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  99. {'pclass': '3rd', 'age': 38.0, 'sex': 'male'},
  100. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  101. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  102. {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},
  103. {'pclass': '1st', 'age': 16.0, 'sex': 'female'},
  104. {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},
  105. {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},
  106. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  107. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  108. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  109. {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},
  110. {'pclass': '1st', 'age': 33.0, 'sex': 'female'},
  111. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  112. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  113. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  114. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  115. {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},
  116. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  117. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  118. {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},
  119. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  120. {'pclass': '1st', 'age': 36.0, 'sex': 'male'},
  121. {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},
  122. {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},
  123. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  124. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  125. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  126. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  127. {'pclass': '3rd', 'age': 33.0, 'sex': 'female'},
  128. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  129. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  130. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  131. {'pclass': '1st', 'age': 52.0, 'sex': 'female'},
  132. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  133. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  134. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  135. {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},
  136. {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},
  137. {'pclass': '2nd', 'age': 45.0, 'sex': 'female'},
  138. {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},
  139. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  140. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  141. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  142. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  143. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  144. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  145. {'pclass': '1st', 'age': 52.0, 'sex': 'male'},
  146. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  147. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  148. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  149. {'pclass': '2nd', 'age': 20.0, 'sex': 'female'},
  150. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  151. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  152. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  153. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  154. {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},
  155. {'pclass': '2nd', 'age': 34.0, 'sex': 'female'},
  156. {'pclass': '3rd', 'age': 33.0, 'sex': 'female'},
  157. {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},
  158. {'pclass': '3rd', 'age': 45.0, 'sex': 'female'},
  159. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  160. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  161. {'pclass': '1st', 'age': 43.0, 'sex': 'female'},
  162. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  163. {'pclass': '3rd', 'age': 59.0, 'sex': 'male'},
  164. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  165. {'pclass': '1st', 'age': 47.0, 'sex': 'female'},
  166. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  167. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  168. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  169. {'pclass': '3rd', 'age': 38.0, 'sex': 'male'},
  170. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  171. {'pclass': '2nd', 'age': 51.0, 'sex': 'male'},
  172. {'pclass': '3rd', 'age': 36.0, 'sex': 'male'},
  173. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  174. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  175. {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},
  176. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  177. {'pclass': '3rd', 'age': 6.0, 'sex': 'female'},
  178. {'pclass': '1st', 'age': 58.0, 'sex': 'female'},
  179. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  180. {'pclass': '3rd', 'age': 4.0, 'sex': 'male'},
  181. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  182. {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},
  183. {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},
  184. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  185. {'pclass': '2nd', 'age': 12.0, 'sex': 'female'},
  186. {'pclass': '2nd', 'age': 19.0, 'sex': 'male'},
  187. {'pclass': '1st', 'age': 64.0, 'sex': 'male'},
  188. {'pclass': '1st', 'age': 27.0, 'sex': 'female'},
  189. {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},
  190. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  191. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  192. {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},
  193. {'pclass': '1st', 'age': 48.0, 'sex': 'female'},
  194. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  195. {'pclass': '2nd', 'age': 50.0, 'sex': 'male'},
  196. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  197. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  198. {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},
  199. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  200. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  201. {'pclass': '3rd', 'age': 34.0, 'sex': 'male'},
  202. {'pclass': '2nd', 'age': 21.0, 'sex': 'female'},
  203. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  204. {'pclass': '1st', 'age': 44.0, 'sex': 'female'},
  205. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  206. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  207. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  208. {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},
  209. {'pclass': '1st', 'age': 39.0, 'sex': 'male'},
  210. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  211. {'pclass': '1st', 'age': 42.0, 'sex': 'male'},
  212. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  213. {'pclass': '1st', 'age': 69.0, 'sex': 'female'},
  214. {'pclass': '2nd', 'age': 2.0, 'sex': 'female'},
  215. {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},
  216. {'pclass': '1st', 'age': 47.0, 'sex': 'male'},
  217. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  218. {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},
  219. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  220. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  221. {'pclass': '3rd', 'age': 42.0, 'sex': 'male'},
  222. {'pclass': '1st', 'age': 21.0, 'sex': 'male'},
  223. {'pclass': '2nd', 'age': 48.0, 'sex': 'male'},
  224. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  225. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  226. {'pclass': '3rd', 'age': 45.0, 'sex': 'male'},
  227. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  228. {'pclass': '1st', 'age': 45.0, 'sex': 'male'},
  229. {'pclass': '3rd', 'age': 39.0, 'sex': 'male'},
  230. {'pclass': '1st', 'age': 14.0, 'sex': 'female'},
  231. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  232. {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},
  233. {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},
  234. {'pclass': '2nd', 'age': 54.0, 'sex': 'male'},
  235. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  236. {'pclass': '3rd', 'age': 36.0, 'sex': 'female'},
  237. {'pclass': '1st', 'age': 47.0, 'sex': 'male'},
  238. {'pclass': '2nd', 'age': 0.8333, 'sex': 'male'},
  239. {'pclass': '1st', 'age': 53.0, 'sex': 'female'},
  240. {'pclass': '3rd', 'age': 24.0, 'sex': 'female'},
  241. {'pclass': '1st', 'age': 37.0, 'sex': 'male'},
  242. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  243. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  244. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  245. {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},
  246. {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},
  247. {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},
  248. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  249. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  250. {'pclass': '3rd', 'age': 20.0, 'sex': 'female'},
  251. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  252. {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},
  253. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  254. {'pclass': '1st', 'age': 22.0, 'sex': 'female'},
  255. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  256. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  257. {'pclass': '2nd', 'age': 29.0, 'sex': 'male'},
  258. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  259. {'pclass': '1st', 'age': 55.0, 'sex': 'female'},
  260. {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},
  261. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  262. {'pclass': '2nd', 'age': 49.0, 'sex': 'female'},
  263. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  264. {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},
  265. {'pclass': '2nd', 'age': 24.0, 'sex': 'female'},
  266. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  267. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  268. {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},
  269. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  270. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  271. {'pclass': '2nd', 'age': 54.0, 'sex': 'male'},
  272. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  273. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  274. {'pclass': '1st', 'age': 38.0, 'sex': 'male'},
  275. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  276. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  277. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  278. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  279. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  280. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  281. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  282. {'pclass': '3rd', 'age': 42.0, 'sex': 'male'},
  283. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  284. {'pclass': '2nd', 'age': 52.0, 'sex': 'male'},
  285. {'pclass': '3rd', 'age': 19.0, 'sex': 'female'},
  286. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  287. {'pclass': '2nd', 'age': 8.0, 'sex': 'male'},
  288. {'pclass': '2nd', 'age': 57.0, 'sex': 'male'},
  289. {'pclass': '1st', 'age': 22.0, 'sex': 'female'},
  290. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  291. {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},
  292. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  293. {'pclass': '2nd', 'age': 45.0, 'sex': 'female'},
  294. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  295. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  296. {'pclass': '1st', 'age': 28.0, 'sex': 'female'},
  297. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  298. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  299. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  300. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  301. {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},
  302. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  303. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  304. {'pclass': '2nd', 'age': 19.0, 'sex': 'female'},
  305. {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},
  306. {'pclass': '1st', 'age': 24.0, 'sex': 'male'},
  307. {'pclass': '2nd', 'age': 31.0, 'sex': 'male'},
  308. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  309. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  310. {'pclass': '3rd', 'age': 38.0, 'sex': 'female'},
  311. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  312. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  313. {'pclass': '3rd', 'age': 36.0, 'sex': 'female'},
  314. {'pclass': '1st', 'age': 55.0, 'sex': 'male'},
  315. {'pclass': '2nd', 'age': 25.0, 'sex': 'female'},
  316. {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},
  317. {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},
  318. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  319. {'pclass': '1st', 'age': 29.0, 'sex': 'male'},
  320. {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},
  321. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  322. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  323. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  324. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  325. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  326. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  327. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  328. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  329. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  330. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  331. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  332. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  333. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  334. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  335. {'pclass': '1st', 'age': 39.0, 'sex': 'male'},
  336. {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},
  337. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  338. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  339. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  340. {'pclass': '2nd', 'age': 49.0, 'sex': 'male'},
  341. {'pclass': '1st', 'age': 36.0, 'sex': 'female'},
  342. {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},
  343. {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},
  344. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  345. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  346. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  347. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  348. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  349. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  350. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  351. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  352. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  353. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  354. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  355. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  356. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  357. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  358. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  359. {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},
  360. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  361. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  362. {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},
  363. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  364. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  365. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  366. {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},
  367. {'pclass': '1st', 'age': 40.0, 'sex': 'female'},
  368. {'pclass': '2nd', 'age': 6.0, 'sex': 'female'},
  369. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  370. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  371. {'pclass': '2nd', 'age': 17.0, 'sex': 'female'},
  372. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  373. {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},
  374. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  375. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  376. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  377. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  378. {'pclass': '2nd', 'age': 41.0, 'sex': 'male'},
  379. {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},
  380. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  381. {'pclass': '1st', 'age': 61.0, 'sex': 'male'},
  382. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  383. {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},
  384. {'pclass': '2nd', 'age': 3.0, 'sex': 'male'},
  385. {'pclass': '1st', 'age': 24.0, 'sex': 'male'},
  386. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  387. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  388. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  389. {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},
  390. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  391. {'pclass': '1st', 'age': 41.0, 'sex': 'male'},
  392. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  393. {'pclass': '2nd', 'age': 42.0, 'sex': 'female'},
  394. {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},
  395. {'pclass': '1st', 'age': 48.0, 'sex': 'male'},
  396. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  397. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  398. {'pclass': '1st', 'age': 50.0, 'sex': 'female'},
  399. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  400. {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},
  401. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  402. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  403. {'pclass': '1st', 'age': 40.0, 'sex': 'female'},
  404. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  405. {'pclass': '3rd', 'age': 23.0, 'sex': 'female'},
  406. {'pclass': '1st', 'age': 34.0, 'sex': 'male'},
  407. {'pclass': '3rd', 'age': 39.0, 'sex': 'female'},
  408. {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},
  409. {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},
  410. {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},
  411. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  412. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  413. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  414. {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},
  415. {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},
  416. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  417. {'pclass': '1st', 'age': 25.0, 'sex': 'male'},
  418. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  419. {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},
  420. {'pclass': '2nd', 'age': 26.0, 'sex': 'female'},
  421. {'pclass': '1st', 'age': 57.0, 'sex': 'male'},
  422. {'pclass': '2nd', 'age': 39.0, 'sex': 'male'},
  423. {'pclass': '1st', 'age': 35.0, 'sex': 'female'},
  424. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  425. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  426. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  427. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  428. {'pclass': '3rd', 'age': 41.0, 'sex': 'male'},
  429. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  430. {'pclass': '1st', 'age': 67.0, 'sex': 'male'},
  431. {'pclass': '3rd', 'age': 11.0, 'sex': 'female'},
  432. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  433. {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},
  434. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  435. {'pclass': '2nd', 'age': 20.0, 'sex': 'female'},
  436. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  437. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  438. {'pclass': '1st', 'age': 50.0, 'sex': 'male'},
  439. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  440. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  441. {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},
  442. {'pclass': '2nd', 'age': 36.0, 'sex': 'male'},
  443. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  444. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  445. {'pclass': '1st', 'age': 48.0, 'sex': 'female'},
  446. {'pclass': '1st', 'age': 59.0, 'sex': 'female'},
  447. {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},
  448. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  449. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  450. {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},
  451. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  452. {'pclass': '1st', 'age': 45.0, 'sex': 'female'},
  453. {'pclass': '1st', 'age': 49.0, 'sex': 'male'},
  454. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  455. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  456. {'pclass': '2nd', 'age': 33.0, 'sex': 'male'},
  457. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  458. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  459. {'pclass': '2nd', 'age': 46.0, 'sex': 'male'},
  460. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  461. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  462. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  463. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  464. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  465. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  466. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  467. {'pclass': '1st', 'age': 52.0, 'sex': 'male'},
  468. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  469. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  470. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  471. {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},
  472. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  473. {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},
  474. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  475. {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},
  476. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  477. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  478. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  479. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  480. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  481. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  482. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  483. {'pclass': '2nd', 'age': 19.0, 'sex': 'female'},
  484. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  485. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  486. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  487. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  488. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  489. {'pclass': '3rd', 'age': 43.0, 'sex': 'male'},
  490. {'pclass': '1st', 'age': 31.0, 'sex': 'female'},
  491. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  492. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  493. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  494. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  495. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  496. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  497. {'pclass': '1st', 'age': 36.0, 'sex': 'male'},
  498. {'pclass': '1st', 'age': 51.0, 'sex': 'male'},
  499. {'pclass': '1st', 'age': 36.0, 'sex': 'male'},
  500. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  501. {'pclass': '2nd', 'age': 3.0, 'sex': 'male'},
  502. {'pclass': '1st', 'age': 48.0, 'sex': 'female'},
  503. {'pclass': '2nd', 'age': 48.0, 'sex': 'female'},
  504. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  505. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  506. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  507. {'pclass': '1st', 'age': 16.0, 'sex': 'female'},
  508. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  509. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  510. {'pclass': '1st', 'age': 36.0, 'sex': 'male'},
  511. {'pclass': '2nd', 'age': 44.0, 'sex': 'male'},
  512. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  513. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  514. {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},
  515. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  516. {'pclass': '1st', 'age': 37.0, 'sex': 'male'},
  517. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  518. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  519. {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},
  520. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  521. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  522. {'pclass': '1st', 'age': 32.0, 'sex': 'male'},
  523. {'pclass': '1st', 'age': 30.0, 'sex': 'male'},
  524. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  525. {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},
  526. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  527. {'pclass': '3rd', 'age': 40.0, 'sex': 'female'},
  528. {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},
  529. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  530. {'pclass': '3rd', 'age': 65.0, 'sex': 'male'},
  531. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  532. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  533. {'pclass': '3rd', 'age': 37.0, 'sex': 'female'},
  534. {'pclass': '1st', 'age': 52.0, 'sex': 'female'},
  535. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  536. {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},
  537. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  538. {'pclass': '2nd', 'age': 0.8333, 'sex': 'male'},
  539. {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},
  540. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  541. {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},
  542. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  543. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  544. {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},
  545. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  546. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  547. {'pclass': '3rd', 'age': 27.0, 'sex': 'male'},
  548. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  549. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  550. {'pclass': '2nd', 'age': 41.0, 'sex': 'female'},
  551. {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},
  552. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  553. {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},
  554. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  555. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  556. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  557. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  558. {'pclass': '1st', 'age': 56.0, 'sex': 'male'},
  559. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  560. {'pclass': '2nd', 'age': 40.0, 'sex': 'male'},
  561. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  562. {'pclass': '3rd', 'age': 9.0, 'sex': 'female'},
  563. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  564. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  565. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  566. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  567. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  568. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  569. {'pclass': '1st', 'age': 28.0, 'sex': 'male'},
  570. {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},
  571. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  572. {'pclass': '1st', 'age': 30.0, 'sex': 'male'},
  573. {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},
  574. {'pclass': '3rd', 'age': 48.0, 'sex': 'female'},
  575. {'pclass': '1st', 'age': 36.0, 'sex': 'female'},
  576. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  577. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  578. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  579. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  580. {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},
  581. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  582. {'pclass': '2nd', 'age': 1.0, 'sex': 'male'},
  583. {'pclass': '2nd', 'age': 2.0, 'sex': 'male'},
  584. {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},
  585. {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},
  586. {'pclass': '1st', 'age': 29.0, 'sex': 'female'},
  587. {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},
  588. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  589. {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},
  590. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  591. {'pclass': '1st', 'age': 38.0, 'sex': 'female'},
  592. {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},
  593. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  594. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  595. {'pclass': '1st', 'age': 0.9167, 'sex': 'male'},
  596. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  597. {'pclass': '1st', 'age': 39.0, 'sex': 'male'},
  598. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  599. {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},
  600. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  601. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  602. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  603. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  604. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  605. {'pclass': '1st', 'age': 45.0, 'sex': 'female'},
  606. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  607. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  608. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  609. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  610. {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},
  611. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  612. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  613. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  614. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  615. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  616. {'pclass': '1st', 'age': 36.0, 'sex': 'female'},
  617. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  618. {'pclass': '2nd', 'age': 14.0, 'sex': 'male'},
  619. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  620. {'pclass': '1st', 'age': 30.0, 'sex': 'male'},
  621. {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},
  622. {'pclass': '1st', 'age': 60.0, 'sex': 'male'},
  623. {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},
  624. {'pclass': '1st', 'age': 48.0, 'sex': 'male'},
  625. {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},
  626. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  627. {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},
  628. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  629. {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},
  630. {'pclass': '1st', 'age': 30.0, 'sex': 'male'},
  631. {'pclass': '1st', 'age': 46.0, 'sex': 'male'},
  632. {'pclass': '2nd', 'age': 31.0, 'sex': 'female'},
  633. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  634. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  635. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  636. {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},
  637. {'pclass': '1st', 'age': 27.0, 'sex': 'female'},
  638. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  639. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  640. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  641. {'pclass': '1st', 'age': 61.0, 'sex': 'male'},
  642. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  643. {'pclass': '1st', 'age': 39.0, 'sex': 'female'},
  644. {'pclass': '3rd', 'age': 0.1667, 'sex': 'female'},
  645. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  646. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  647. {'pclass': '2nd', 'age': 15.0, 'sex': 'female'},
  648. {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},
  649. {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},
  650. {'pclass': '1st', 'age': 17.0, 'sex': 'female'},
  651. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  652. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  653. {'pclass': '2nd', 'age': 42.0, 'sex': 'female'},
  654. {'pclass': '1st', 'age': 20.0, 'sex': 'female'},
  655. {'pclass': '1st', 'age': 62.0, 'sex': 'female'},
  656. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  657. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  658. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  659. {'pclass': '1st', 'age': 49.0, 'sex': 'male'},
  660. {'pclass': '1st', 'age': 23.0, 'sex': 'female'},
  661. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  662. {'pclass': '1st', 'age': 33.0, 'sex': 'female'},
  663. {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},
  664. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  665. {'pclass': '1st', 'age': 45.0, 'sex': 'male'},
  666. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  667. {'pclass': '1st', 'age': 70.0, 'sex': 'male'},
  668. {'pclass': '1st', 'age': 31.0, 'sex': 'female'},
  669. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  670. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  671. {'pclass': '1st', 'age': 37.0, 'sex': 'female'},
  672. {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},
  673. {'pclass': '1st', 'age': 54.0, 'sex': 'male'},
  674. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  675. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  676. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  677. {'pclass': '1st', 'age': 51.0, 'sex': 'female'},
  678. {'pclass': '1st', 'age': 21.0, 'sex': 'male'},
  679. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  680. {'pclass': '1st', 'age': 64.0, 'sex': 'male'},
  681. {'pclass': '2nd', 'age': 29.0, 'sex': 'female'},
  682. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  683. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  684. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  685. {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},
  686. {'pclass': '1st', 'age': 50.0, 'sex': 'female'},
  687. {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},
  688. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  689. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  690. {'pclass': '1st', 'age': 31.0, 'sex': 'male'},
  691. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  692. {'pclass': '2nd', 'age': 59.0, 'sex': 'male'},
  693. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  694. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  695. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  696. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  697. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  698. {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},
  699. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  700. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  701. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  702. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  703. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  704. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  705. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  706. {'pclass': '1st', 'age': 49.0, 'sex': 'male'},
  707. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  708. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  709. {'pclass': '2nd', 'age': 38.0, 'sex': 'male'},
  710. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  711. {'pclass': '1st', 'age': 48.0, 'sex': 'female'},
  712. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  713. {'pclass': '1st', 'age': 54.0, 'sex': 'female'},
  714. {'pclass': '1st', 'age': 19.0, 'sex': 'female'},
  715. {'pclass': '3rd', 'age': 3.0, 'sex': 'male'},
  716. {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},
  717. {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},
  718. {'pclass': '2nd', 'age': 34.0, 'sex': 'female'},
  719. {'pclass': '3rd', 'age': 28.0, 'sex': 'female'},
  720. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  721. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  722. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  723. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  724. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  725. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  726. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  727. {'pclass': '3rd', 'age': 15.0, 'sex': 'female'},
  728. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  729. {'pclass': '2nd', 'age': 40.0, 'sex': 'female'},
  730. {'pclass': '1st', 'age': 46.0, 'sex': 'male'},
  731. {'pclass': '2nd', 'age': 8.0, 'sex': 'female'},
  732. {'pclass': '1st', 'age': 63.0, 'sex': 'female'},
  733. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  734. {'pclass': '3rd', 'age': 43.0, 'sex': 'female'},
  735. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  736. {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},
  737. {'pclass': '3rd', 'age': 38.0, 'sex': 'female'},
  738. {'pclass': '2nd', 'age': 1.0, 'sex': 'male'},
  739. {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},
  740. {'pclass': '1st', 'age': 31.0, 'sex': 'male'},
  741. {'pclass': '1st', 'age': 42.0, 'sex': 'male'},
  742. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  743. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  744. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  745. {'pclass': '1st', 'age': 38.0, 'sex': 'male'},
  746. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  747. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  748. {'pclass': '1st', 'age': 17.0, 'sex': 'female'},
  749. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  750. {'pclass': '1st', 'age': 40.0, 'sex': 'male'},
  751. {'pclass': '1st', 'age': 4.0, 'sex': 'male'},
  752. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  753. {'pclass': '2nd', 'age': 29.0, 'sex': 'male'},
  754. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  755. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  756. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  757. {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},
  758. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  759. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  760. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  761. {'pclass': '1st', 'age': 57.0, 'sex': 'male'},
  762. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  763. {'pclass': '1st', 'age': 40.0, 'sex': 'female'},
  764. {'pclass': '3rd', 'age': 47.0, 'sex': 'male'},
  765. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  766. {'pclass': '1st', 'age': 37.0, 'sex': 'male'},
  767. {'pclass': '2nd', 'age': 42.0, 'sex': 'male'},
  768. {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},
  769. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  770. {'pclass': '3rd', 'age': 5.0, 'sex': 'female'},
  771. {'pclass': '1st', 'age': 21.0, 'sex': 'female'},
  772. {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},
  773. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  774. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  775. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  776. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  777. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  778. {'pclass': '3rd', 'age': 9.0, 'sex': 'female'},
  779. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  780. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  781. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  782. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  783. {'pclass': '2nd', 'age': 41.0, 'sex': 'male'},
  784. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  785. {'pclass': '1st', 'age': 36.0, 'sex': 'female'},
  786. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  787. {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},
  788. {'pclass': '1st', 'age': 39.0, 'sex': 'female'},
  789. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  790. {'pclass': '1st', 'age': 35.0, 'sex': 'female'},
  791. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  792. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  793. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  794. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  795. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  796. {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},
  797. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  798. {'pclass': '3rd', 'age': 45.0, 'sex': 'male'},
  799. {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},
  800. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  801. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  802. {'pclass': '1st', 'age': 50.0, 'sex': 'female'},
  803. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  804. {'pclass': '1st', 'age': 56.0, 'sex': 'male'},
  805. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  806. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  807. {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},
  808. {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},
  809. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  810. {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},
  811. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  812. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  813. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  814. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  815. {'pclass': '1st', 'age': 45.0, 'sex': 'male'},
  816. {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},
  817. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  818. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  819. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  820. {'pclass': '3rd', 'age': 20.0, 'sex': 'female'},
  821. {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},
  822. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  823. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  824. {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},
  825. {'pclass': '1st', 'age': 24.0, 'sex': 'male'},
  826. {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},
  827. {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},
  828. {'pclass': '2nd', 'age': 52.0, 'sex': 'male'},
  829. {'pclass': '1st', 'age': 45.0, 'sex': 'male'},
  830. {'pclass': '1st', 'age': 11.0, 'sex': 'male'},
  831. {'pclass': '2nd', 'age': 23.0, 'sex': 'female'},
  832. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  833. {'pclass': '1st', 'age': 26.0, 'sex': 'female'},
  834. {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},
  835. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  836. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  837. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  838. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  839. {'pclass': '1st', 'age': 49.0, 'sex': 'male'},
  840. {'pclass': '1st', 'age': 18.0, 'sex': 'female'},
  841. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  842. {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},
  843. {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},
  844. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  845. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  846. {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},
  847. {'pclass': '2nd', 'age': 35.0, 'sex': 'female'},
  848. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  849. {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},
  850. {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},
  851. {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},
  852. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  853. {'pclass': '2nd', 'age': 45.0, 'sex': 'male'},
  854. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  855. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  856. {'pclass': '1st', 'age': 26.0, 'sex': 'male'},
  857. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  858. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  859. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  860. {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},
  861. {'pclass': '2nd', 'age': 21.0, 'sex': 'female'},
  862. {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},
  863. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  864. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  865. {'pclass': '1st', 'age': 36.0, 'sex': 'male'},
  866. {'pclass': '1st', 'age': 27.0, 'sex': 'male'},
  867. {'pclass': '1st', 'age': 24.0, 'sex': 'female'},
  868. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  869. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  870. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  871. {'pclass': '1st', 'age': 18.0, 'sex': 'female'},
  872. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  873. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  874. {'pclass': '1st', 'age': 56.0, 'sex': 'female'},
  875. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  876. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  877. {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},
  878. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  879. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  880. {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},
  881. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  882. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  883. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  884. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  885. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  886. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  887. {'pclass': '1st', 'age': 64.0, 'sex': 'male'},
  888. {'pclass': '1st', 'age': 46.0, 'sex': 'male'},
  889. {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},
  890. {'pclass': '1st', 'age': 46.0, 'sex': 'male'},
  891. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  892. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  893. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  894. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  895. {'pclass': '3rd', 'age': 29.0, 'sex': 'male'},
  896. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  897. {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},
  898. {'pclass': '1st', 'age': 33.0, 'sex': 'male'},
  899. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  900. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  901. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  902. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  903. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  904. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  905. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  906. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  907. {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},
  908. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  909. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  910. {'pclass': '3rd', 'age': 0.8333, 'sex': 'male'},
  911. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  912. {'pclass': '1st', 'age': 58.0, 'sex': 'female'},
  913. {'pclass': '1st', 'age': 60.0, 'sex': 'female'},
  914. {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},
  915. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  916. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  917. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},
  918. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  919. {'pclass': '1st', 'age': 44.0, 'sex': 'female'},
  920. {'pclass': '3rd', 'age': 31.0, 'sex': 'male'},
  921. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  922. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  923. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  924. {'pclass': '2nd', 'age': 71.0, 'sex': 'male'},
  925. {'pclass': '2nd', 'age': 13.0, 'sex': 'female'},
  926. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  927. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  928. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  929. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  930. {'pclass': '1st', 'age': 58.0, 'sex': 'male'},
  931. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  932. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  933. {'pclass': '2nd', 'age': 4.0, 'sex': 'female'},
  934. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  935. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  936. {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},
  937. {'pclass': '2nd', 'age': 33.0, 'sex': 'female'},
  938. {'pclass': '1st', 'age': 33.0, 'sex': 'male'},
  939. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  940. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  941. {'pclass': '1st', 'age': 48.0, 'sex': 'male'},
  942. {'pclass': '1st', 'age': 28.0, 'sex': 'male'},
  943. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  944. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  945. {'pclass': '1st', 'age': 55.0, 'sex': 'female'},
  946. {'pclass': '1st', 'age': 54.0, 'sex': 'male'},
  947. {'pclass': '1st', 'age': 71.0, 'sex': 'male'},
  948. {'pclass': '1st', 'age': 47.0, 'sex': 'female'},
  949. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  950. {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},
  951. {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},
  952. {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},
  953. {'pclass': '1st', 'age': 23.0, 'sex': 'female'},
  954. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  955. {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},
  956. {'pclass': '1st', 'age': 54.0, 'sex': 'male'},
  957. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  958. {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},
  959. {'pclass': '3rd', 'age': 6.0, 'sex': 'male'},
  960. {'pclass': '1st', 'age': 45.0, 'sex': 'female'},
  961. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  962. {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},
  963. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},
  964. {'pclass': '1st', 'age': 55.0, 'sex': 'male'},
  965. {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},
  966. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  967. {'pclass': '1st', 'age': 65.0, 'sex': 'male'},
  968. {'pclass': '1st', 'age': 27.0, 'sex': 'male'},
  969. {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},
  970. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  971. {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},
  972. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  973. {'pclass': '2nd', 'age': 7.0, 'sex': 'female'},
  974. {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},
  975. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  976. {'pclass': '1st', 'age': 39.0, 'sex': 'female'},
  977. {'pclass': '1st', 'age': 19.0, 'sex': 'female'},
  978. {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},
  979. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  980. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  981. {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},
  982. {'pclass': '1st', 'age': 56.0, 'sex': 'male'},
  983. {'pclass': '2nd', 'age': 38.0, 'sex': 'female'},
  984. {'pclass': '2nd', 'age': 23.0, 'sex': 'female'},
  985. {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},
  986. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  987. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  988. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  989. {'pclass': '1st', 'age': 42.0, 'sex': 'male'},
  990. {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},
  991. {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},
  992. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  993. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  994. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  995. {'pclass': '2nd', 'age': 16.0, 'sex': 'male'},
  996. {'pclass': '2nd', 'age': 42.0, 'sex': 'male'},
  997. {'pclass': '3rd', 'age': 2.0, 'sex': 'female'},
  998. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},
  999. {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},
  1000. {'pclass': '1st', 'age': 36.0, 'sex': 'male'},
  1001. ...]

In [16]:

transfer = DictVectorizer()

x_train = transfer.fit_transform(x_train)
x_test = transfer.fit_transform(x_test)

In [17]:

x_test

Out[17]:

  1. <263x6 sparse matrix of type '<class 'numpy.float64'>'
  2. with 789 stored elements in Compressed Sparse Row format>

In [18]:

# 4.机器学习(决策树)
estimator = DecisionTreeClassifier(max_depth=15)
estimator.fit(x_train, y_train)

Out[18]:

  1. DecisionTreeClassifier(ccp_alpha=0.0, class_weight=None, criterion='gini',
  2. max_depth=15, max_features=None, max_leaf_nodes=None,
  3. min_impurity_decrease=0.0, min_impurity_split=None,
  4. min_samples_leaf=1, min_samples_split=2,
  5. min_weight_fraction_leaf=0.0, presort='deprecated',
  6. random_state=None, splitter='best')

In [19]:

# 5.模型评估
y_pre = estimator.predict(x_test)

In [20]:

y_pre

Out[20]:

  1. array([0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2. 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  3. 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
  4. 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
  5. 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  6. 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0,
  7. 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0,
  8. 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
  9. 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1,
  10. 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
  11. 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1,
  12. 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1])

In [21]:

ret = estimator.score(x_test, y_test)
print(ret)

0.779467680608365

In [22]:

export_graphviz(estimator, out_file="./data/tree.dot", feature_names=['age', 'pclass=1st', 'pclass=2nd', 'pclass=3rd', '女性', '男性'])

In [23]:

# 实例化一个随机森林
from sklearn.ensemble import RandomForestClassifier
rf = RandomForestClassifier()

In [26]:

# 通过超参数调优
from sklearn.model_selection import GridSearchCV

param = {"n_estimators":[100, 120, 300], "max_depth":[3, 7, 11]}

gc = GridSearchCV(rf, param_grid=param, cv=3)

gc.fit(x_train, y_train)

Out[26]:

  1. GridSearchCV(cv=3, error_score=nan,
  2. estimator=RandomForestClassifier(bootstrap=True, ccp_alpha=0.0,
  3. class_weight=None,
  4. criterion='gini', max_depth=None,
  5. max_features='auto',
  6. max_leaf_nodes=None,
  7. max_samples=None,
  8. min_impurity_decrease=0.0,
  9. min_impurity_split=None,
  10. min_samples_leaf=1,
  11. min_samples_split=2,
  12. min_weight_fraction_leaf=0.0,
  13. n_estimators=100, n_jobs=None,
  14. oob_score=False,
  15. random_state=None, verbose=0,
  16. warm_start=False),
  17. iid='deprecated', n_jobs=None,
  18. param_grid={'max_depth': [3, 7, 11],
  19. 'n_estimators': [100, 120, 300]},
  20. pre_dispatch='2*n_jobs', refit=True, return_train_score=False,
  21. scoring=None, verbose=0)

In [27]:

print("随机森林预测结果是:\n", gc.score(x_test, y_test))

  1. 随机森林预测结果是:
  2. 0.779467680608365

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/333398
推荐阅读
相关标签
  

闽ICP备14008679号