I need to create a machine learning model to predict if a structure is an hotel or an apartment. I have a dataset structured as well:

ID | STATE  | ROOM | BEDROOMS |       COMFORT      |   CARD_ACCEPTED  |                   CONGRESS                          | OUTPUT
0  | ITALY  |   3  |    5     |  Park, Pool, Disco | Visa, Mastercard |  Number rooms 3, Min capacity 3, Max Capacity 110   | Hotel
1  | USA    |   2  |    2     |  Park, Pool        |                  |                                                     | Apartment
2  | ARG    |   1  |    4     |                    | Visa             |  Number rooms 1, Min capacity 3, Max Capacity 20    | Hotel

I would like to test different machine learning methods on it, so the first thing I wanna do is preprocess the data. My idea is to split the columns COMFORT and CARD_ACCEPTED to make something like COMFORT.Park, COMFORT.Pool etc, so I can transform them into numbers instead of categorial variables. My problem concerns the CONGRESS column, since it has particular data which wouldn't fit well like in the COMFORT and CARD_ACCEPTED case. What normalization method should I apply on it?


1 Answer 1


I would one-hot encode STATE, COMFORT, and CARD_ACCEPTED, and I would parse what appears to be a string in CONGRESS into three columns: NUMROOMS, MINCAP, MAXCAP.

For all your one-hot columns, you don't need to normalize. For all your numeric values, you can reference this stack question


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.