0
$\begingroup$

enter image description here

the following data is to detect malnutrition among children under age 5 and the value_r is the percentage estimate of wasting among the population. should I apply the decision tree as an entirely categorical feature input as well target variable?

$\endgroup$

2 Answers 2

0
$\begingroup$

you can apply any Machine Learning model on this. This will be regression problem.

  • if number of classes to particular column are not to many then try to do "one-hot encoding" eg: get_dummy in sklearn.
  • if there are too many classes for any column try to regroup some of similar to single class.
  • then apply any Machine learning/ Deep learning model to solve regression problem
$\endgroup$
0
$\begingroup$

To answer your question:

  • If your input features are all categorical and your target feature is discrete numerical, you can use a variety of machine learning algorithms that can handle this type of data. Following are the few things that you look into:
  1. Data Preprocessing: Convert your categorical features into numerical values. This can be done through various encoding techniques like One-Hot Encoding, Label Encoding, Ordinal Encoding, etc.

  2. Feature Scaling: Although this step is not necessary for all algorithms, it can be beneficial for some, like K-Nearest Neighbors (KNN) or Support Vector Machines (SVM).

  3. Model Selection: Choose a machine learning model that can handle discrete numerical output. Some options include Decision Trees, Random Forests, Gradient Boosting, etc. These models can handle both categorical inputs and discrete numerical outputs.

  4. Model Training: Train your selected model on your preprocessed data.

  5. Model Evaluation: Evaluate your model using appropriate metrics. Since your target feature is discrete numerical, you can use metrics like Mean Absolute Error (MAE), Mean Squared Error (MSE), or Root Mean Squared Error (RMSE).

  6. Prediction: Use your trained model to make predictions on new data.

If your model is giving exact numerical values for known data, it might be overfitting. This means that the noise or random fluctuations in the training data is picked up and learned as concepts by the model. You can try to reduce overfitting by increasing the size of your training data, reducing the complexity of your model or using techniques like cross-validation, regularization, or early stopping.

Hope I answered your question.

$\endgroup$

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.