Machinelearning: Support ColumnAttribute on properties and not just fields

Created on 28 May 2018  路  6Comments  路  Source: dotnet/machinelearning

It looks like it's been considered:

https://github.com/dotnet/machinelearning/blob/ea07be87a5300e0e4d50563cfb14e963f3dee286/src/Microsoft.ML.Api/SchemaDefinition.cs#L318-L319

I just wanted to get the issue started as it's probably the best solution to #180.

F# enhancement

Most helpful comment

Please can you also support not just properties but also non-default constructors? This is important to get a coherent F# story going.

All 6 comments

It could be a good feature to support custom transformation on some feature while using CollectionDataSource e.g. applying log on some numeric column(s).

Please can you also support not just properties but also non-default constructors? This is important to get a coherent F# story going.

I searched for uses of "GetFields" and here's what I see:

Relevant:

Not relevant:

@eerhardt I've taken a look at what it might take to fix this, could you take a look and check the general direction of travel please?

Here's the prototype: https://github.com/dsyme/machinelearning/compare/fs1...dsyme:fs2?expand=1

I've submitted a WIP PR for this though it is not yet complete: https://github.com/dotnet/machinelearning/pull/616

Taking a look now. /cc @Ivanidzo4ka as well, since he was investigating allowing properties too.

Now that #616 is in, I think this one should be closed.

I discovered one inconvenient side effect though: we are requiring both the getter and the setter to be present and public for the properties. It adds confusion to the cases like in #595 , where you can use properties to act like 'calculated columns', without a clear way to provide a setter.

I'll open a new issue for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ddobric picture ddobric  路  4Comments

daholste picture daholste  路  3Comments

maxt3r picture maxt3r  路  3Comments

samueleresca picture samueleresca  路  3Comments

rogancarr picture rogancarr  路  3Comments