BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mzhao
Calcite | Level 5

I am working on the Titanic Kaggle challenge and one thing that I want to do with it is to modify the data under some variables so that it's easier to model.

 

For example, under the Cabin column, instead of the cabin ID "C85, C123, E46,...etc.", I want to change it within Enterprise Miner so that it is the beginning letter of the cabin ID. Thus, the data should be transformed to be "C, C, E, ...etc.".

 

In addition, under the name column, I want to split the variable column into 2 variable columns where it's last name and the prefix + first name, e.g. change "last name, prefix first name" to one column that is "last name" and a second column that is "prefix first name."

 

Attached is the csv of the training data set for reference. Thank you for your support.

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Once you have the data in a SAS data set, the transformations are easy.  I could be wrong, but I believe that Enterprise Miner would use the same tools:

 

data want;
set have;
length short_cabin $ 1;
short_cabin = cabin;
lastname = scan(name, 1, ',');
firstname_prefix = scan(name, 2, ',');
run;

View solution in original post

1 REPLY 1
Astounding
PROC Star

Once you have the data in a SAS data set, the transformations are easy.  I could be wrong, but I believe that Enterprise Miner would use the same tools:

 

data want;
set have;
length short_cabin $ 1;
short_cabin = cabin;
lastname = scan(name, 1, ',');
firstname_prefix = scan(name, 2, ',');
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 525 views
  • 0 likes
  • 2 in conversation