ben519 / mltools

Exploratory and diagnostic machine learning tools for R
Other
72 stars 26 forks source link

sparsify() now returns meta data for unordered factors #9

Closed andredd closed 6 years ago

andredd commented 7 years ago

If the new parameter returnMeta=TRUE, a list is returned containing the original result and meta data (variables and levels). If returnMeta=FALSE, result and behaviour is unchanged.

ben519 commented 7 years ago

Thanks, but I don't see why this is needed. Seems the only benefit is that it returns the levels of each factor which is one-hot-encoded, which you could easily get without this.

andredd commented 7 years ago

Thanks! Maybe it's obvious to you but how? Is there a trivial assumption about the resulting order? As user of the api i'd rather not rely on implicit assumptions about the ordering of the variables and levels or the joining of the names. So isn't it the easiest way to just return the resulting order?

Am 16.10.2017 20:47 schrieb "Ben" notifications@github.com:

Thanks, but I don't see why this is needed. Seems the only benefit is that it returns the levels of each factor which is one-hot-encoded, which you could easily get without this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ben519/mltools/pull/9#issuecomment-336992104, or mute the thread https://github.com/notifications/unsubscribe-auth/AVATWaZKHIk9IS0HPHuJmhf2Db995aZHks5ss6TBgaJpZM4P6PCk .

ben519 commented 7 years ago

Hmm, not sure I fully understand what you're asking. Could you create a reproducible example and post it as a question under issues?