Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if passenger['Sex'] == 'male':
- # male
- if passenger['Age'] < 10:
- if passenger['Pclass'] == 3:
- if passenger['SibSp'] > 1:
- predictions.append(0)
- else:
- predictions.append(1)
- else:
- predictions.append(1)
- elif passenger['Age'] < 18:
- if passenger['Pclass'] == 1:
- predictions.append(1)
- else:
- predictions.append(0)
- else:
- predictions.append(0)
- else:
- # female
- if passenger['Pclass'] == 3:
- if passenger['Age'] > 20 and passenger['Age'] < 60:
- predictions.append(0)
- elif passenger['SibSp'] > 2:
- predictions.append(0)
- elif passenger['Parch'] > 3:
- predictions.append(0)
- else:
- predictions.append(1)
- else:
- predictions.append(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement