How to get a normalised slope of a trend

前端 未结 1 922
野性不改
野性不改 2021-01-26 09:20

I am analysing the distances of users to userx over 6 weeks in a social network.

Note: \'No path\' means the two users are not conncted yet (at least by fr

1条回答
  •  伪装坚强ぢ
    2021-01-26 09:28

    Well, if you want to award for the duration of connection, you probably need to take time into calculations. The easiest/most straightforward way is just to multiply the coefficent by time:

    outcome_measure <- regressor.coef_ * length(y)
    

    And if you would divide it by 2 it will conceptually be the same as the area under the curve (AUC):

    outcome_measure <- (regressor.coef_ * length(y))/2
    

    So you would get -4 and -6 with the first method or -2 and -3 with the second.

    Slightly offtopic, but IF you use linear regression for statistical analysis (not just to get coefficent), I probably would add some kind of check to confirm that its assumptions are true.

    0 讨论(0)
提交回复
热议问题