[Python] Reduce the number of parameters in ML model

Discussão em 'Python' iniciado por Stack, Agosto 28, 2025.

  1. Stack

    Stack Membro Participativo

    I want to train the AWS xgBoost model for classification into two categories based on my dataset which contains 1000 Emails and the value to predict. Ex data -

    • abc@gmail -- high
    • 123@yahoo -- low
    • xyz@gmail -- low
    • jkl@yahoo -- high

    For training the model on 1000 rows of such data, as xgboost only expects numerical data, I had to use pd.getDummies() which converts this into 1000 columns by 1000 rows of data. Converts the result column into two - isHigh, isLow with values 0 and 1.

    Now when I want predictions from my model, it expects an input of 1000 parameters for the REST API(which I created for predictions), ideally, I would like to provide an email as the parameter and get a result of high/low or isHigh value between 0 and 1.

    Is the choice of Algorithm wrong? Is there any other way so that when I ask the model to provide predictions it does not want 100 parameters?

    Continue reading...

Compartilhe esta Página