Primary competition visual

The Zimnat Insurance Assurance Challenge by #ZindiWeekendz

Helping Africa
$300 USD
Completed (over 6 years ago)
Prediction
295 joined
105 active
Starti
22 May 20
Closei
24 May 20
Reveali
24 May 20
User avatar
Higher school of communication of tunis
Train and test setting up ?
Data · 22 May 2020, 17:08 · 22

Greeting everyone,

I'm facing difficults regarding to creating my test df and my train df while merging files.

Anyone can help me please.

Thank you

Discussion 22 answers
User avatar

Setting up train and test will be different and challenging for everyone. I believe the winner in the competition will be one who most carefully solves the challenge of setting up train and test. It's not easy for anyone right now, so keep your grey cells thinking.

Upvotes 0
User avatar
Upvotes 0
User avatar
Krishna_Priya

lol. zindi hackathons are no more model.fit() , model.predict() .......xD

Upvotes 0
User avatar

If you don't have a meaningful reply, don't reply please . Thank you

Upvotes 0
User avatar
Krishna_Priya

If you don't have a meaningful reply to my absurd reply, don't reply please. Thank you :)

Upvotes 0
User avatar

If the difficulty is about the syntax and technique here is what I did ,I don't know if I am right tho.

Start from train.csv

Train = pandas.read_csv("train.csv")

Test_set =Train.loc[train["lapse"]=="?"]

Train_set = =Train.loc[train["lapse"] !="?"]

After this you merge train_set with the others based on policy_id

If you spot any logical error please point it out so I can correct on my code.

If your question was about how to model your data you need to tell me what approach you chosen to use then I will help you model it

Upvotes 0
User avatar

Thank you for your response brother . I have already done the same steps you did, but when i merged test set with the others i obtained rows more than the demanded ones in the sample submission files . This is why i ma in trouble . I will be thankful if you help tackling this issue

Upvotes 0
User avatar

try drop_duplicates(subset='Policy ID')

Upvotes 0
User avatar

Check for the shape of the sample submission files and type this.. example if the shape is 43097do this , to get the test set.. test=test[:43097]

Upvotes 0
User avatar
Upvotes 0
User avatar

I tried drop_dublicates to tackle this problem . but the problem of one label persist

Upvotes 0
User avatar

what was the problem; kindly tell the error, so i can help out

Upvotes 0
User avatar

@engineer I guess he meant that when he dropped duplicates of Policy ID and separated the test from the train, the train now has only one unique label (ie 1) as against 2 ('?' and '1') before separation..

Upvotes 0
User avatar

Yes exactly my friend. Should I fit my model only on one label ?

Upvotes 0
User avatar

I think that has to do with the fact that a single policy can cover son, wife and mother as stated in the info ... Read the competition info again .. it should help you understand.

Upvotes 0
User avatar

I too am not quite sure of what to do in this case.

Upvotes 0
User avatar

yes! u ' ll have only a target value == 1, go ahead and predict probability; it would work

Upvotes 0
User avatar

when i try to fit model , they show error. [y_true contains only one label (1)]

Upvotes 0
User avatar

Hi Oussema, What is the final shape of train data?

Upvotes 0