Running linear regression on each attribute X_i in example set and Age (also in example set)

ralph_brecheiseralph_brecheise MemberPosts:17Maven
edited November 2018 inHelp

Hi,

I have an example set with +/- 300 numerical attributes X_i and an attribute "age". I'd like to know if any of the attributes X_i can be predicted by age. For this, I'd like to run a simple linear regression with age as the independent variable (x-axis) and X_i as the dependent variable (y-axis). I'd like to run this regression on each attribute X_i in the example set using some loop operator.

I tried using the "Loop Attributes" operator on just the subset X_i's but I cannot find a way to "inject" the Age attribute as a fixed and unchanging 2nd attribute inside the operator. Perhaps there's a way to do this with macro's but I'm not sure how to do that. So, in each loop iteration I would like to access attribute X_i and Age. X_i changes with the loop index. Age stays the same.

Any help would be greatly appreciated!

拉尔夫

Tagged:

Best Answer

Answers

  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager

    @ralph_brecheise- yes Loop Attributes with macros will do this nicely. I am attaching a process for you to look at using the Sonar data set.

    FWIW you may just want to use the Correlation Matrix operator and look at pairwise r values if that's sufficient. Much easier than full lin reg models!





    <宏/ >
















    <参数键= "属性" value = " attribute_9 |攻击力ribute_8|attribute_7|attribute_60|attribute_6|attribute_59|attribute_58|attribute_57|attribute_56|attribute_55|attribute_54|attribute_53|attribute_52|attribute_51|attribute_50|attribute_5|attribute_49|attribute_48|attribute_47|attribute_46|attribute_45|attribute_44|attribute_43|attribute_42|attribute_41|attribute_40|attribute_4|attribute_39|attribute_38|attribute_37|attribute_36|attribute_35|attribute_34|attribute_33|attribute_32|attribute_31|attribute_30|attribute_3|attribute_29|attribute_28|attribute_27|attribute_26|attribute_25|attribute_24|attribute_23|attribute_22|attribute_21|attribute_20|attribute_2|attribute_19|attribute_18|attribute_17|attribute_16|attribute_15|attribute_14|attribute_13|attribute_12|attribute_11|attribute_10"/>



































    Scott

Sign InorRegisterto comment.