0
$\begingroup$

As you know the data type is one of the most important factors in selecting the Machine Learning algorithm. For example, K-means should not be employed for categorical data. I have a csv file containing road network segment features. One of my feature is speed limit which shows eligible speed in a road link. For example, we see the marks and signs in road which determine the eligible speed for driving. I would be grateful if you let me know the speed limit data is continues or categorical data (nominal data)?

$\endgroup$
6
  • $\begingroup$ I would like to suggest that of all the considerations that might be involved in selecting an ML algorithm, data type would be among the least important factors. $\endgroup$
    – whuber
    Commented Sep 6, 2021 at 18:49
  • $\begingroup$ I will flip this around: what arguments do you have for speed limit being continuous data, and what arguments do you have for speed limit being categorical? $\endgroup$
    – Dave
    Commented Sep 6, 2021 at 18:52
  • $\begingroup$ @Dave I have continues values with different units. For example, road curvature which is meter, slope which is percent. I am going to standardize them. So, if I consider speed limit as continues, I must standardize it because I want to standardize all MY continues values (because of their different units) but if I consider it as categorical data it means I have mixed data values; therefore, I must used distance measure which are suitable for mixed data values. $\endgroup$
    – Asa Ya
    Commented Sep 7, 2021 at 19:35
  • $\begingroup$ @whuber Could you please see my comment above? $\endgroup$
    – Asa Ya
    Commented Sep 7, 2021 at 19:36
  • 1
    $\begingroup$ But what arguments do you have in favor of (or against) the data types? $\endgroup$
    – Dave
    Commented Sep 7, 2021 at 19:39

1 Answer 1

1
$\begingroup$

Speed limit could be treated as either continuous or categorical. It depends on the purpose of the model, and your expectations of how it will be applied.

Let's say all the road segments in your data have one of two speed limits: 50 kmph, or 80 kmph. Now, you might want to predict the outcome for some road segments that have speed limits that are different from those values, e.g. 60 kmph. If so, it would be good to treat the speed limit as continuous, so that the model can interpolate between the values in the training data.

On the other hand, if your primary interest is in making inferences about the difference between 50 kmph and 80 kmph segments, then you could code the speed limit as nominal.

$\endgroup$
1
  • $\begingroup$ I am going to cluster my road network features. In this case, I think I must consider them as a categorical data. $\endgroup$
    – Asa Ya
    Commented Sep 9, 2021 at 15:08

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.