It doesn't really come across as a framework, it's more of an API. A framework would allow you to invent new approaches (such as ODE networks), where-as this API supports the models that ship with it and nothing else. That's fine, but it's not in the same space as Tensorflow etc.
Microsoft's deep learning "train/inference" framework is CNTK, which exists alongside ML.NET (although as it's sorely lagging other deep learning frameworks and I'm convinced it's not a priority for Microsoft, they've basically given up on it).
I think the target use case for ML.NET is really putting existing machine learning models into production in .NET. That's not limited to deep learning (it supports "traditional" ML models like logistic regression out of the box), but a first-party wrapper for tensorflow models is useful (which previously required vectorizing everything by hand and passing to TensorflowSharp)
Training vanilla models is "nice to have" but the real value is in putting trained models into production.
Generally speaking, the ML.NET API still needs a lot of work. I think they're partway through switching from a "LearningPipeline" API to a "Data/Transformer/Estimator" API, but some of the documentation refer to the former, some to the latter, some new methods still require legacy classes, the naming conventions aren't clear and not all of it is strongly-typed so you won't know until runtime whether you've passed the correct Transform/Estimator, on the whole it's a bit confusing.
That being said, it still hasn't hit 1.0, so I think the team is aware that the API needs further work. If they standardize 1.0 on the Data/Transformer/Estimator, blow away the legacy classes and update the documentation, it will be a pretty nice framework for production.
> the target use case for ML.NET is really putting existing machine learning models into production in .NET.
this should be exactly the first sentence in the git repository. to confirm the original commenter: this API is mostly for deploying networks, not so much for training/developing new models etc
I think you and startupdiscus are using two different notions of "my own model". I think by "my own model" you mean that I can use my own data to train a pre-existing models that is built into ML.net. Typically, that's not quite what "my model" means. Say I come up with a completely new learning to rank algorithm, or I fancy a new one that I saw in one of the ML conferences. Now if I were to build that with ML.net that would be "my model" according to startupdiscuss and many others.
In startupdiscuss' sense, ML.net would allow building own models if it offers building-blocks, abstractions, and other facilities, for examples, vectors, matrices, tensors, linear algebraic operations, computation-graph, etc that allow building them.
ML.NET is really a framework which provides ability to build custom traditional machine learning algorithms for a number of scenarios like (classification, regression, recommendation etc.).
ML.NET is also extensible, which means we can absorb other leading deep learning frameworks like TensorFlow and Accord.NET through one consistent API providing a uniform way to do ML in .NET.
ML.NET is a machine learning framework which is aimed at providing the E2E workflow for infusing ML into .NET apps across pre-processing, feature engineering, modeling, evaluation, and model consumption.
The base framework comes with a variety of transforms, trainers, utility apis for loading varies forms of data (e.g. csv's, tsv's) to build custom machine learning models trained with your own data.
Using the API you can build a variety of models for scenarios like Sentiment analysis (classification), forecasting, recommendation and also leverage pre-built Tensorflow models for scenarios like image classification.
The samples repo provided shows you a variety of scenarios with ML.NET.
"Framework" (contained in the original title of this post) implies that you can "build your own thing" with the library. CNTK and Tensorflow are frameworks.
ML.NET only has what's in the box, it's turn-key. You guys have an explicit ResNet18 assembly, as one example. While this is incredibly useful, it is not appropriate to call such a library a framework.
A possible improvement would be:
ML.NET is a machine learning API which is aimed at providing turn-key models for infusing ML...
If you wanted it to classify as a framework, you'd have to provide something like Tensorflow does: a way to develop new and novel models.
That's just my opinion, but a few people seem to agree.
You can absolutely train your own models. Your comment is patently false and a fraction of the time it took to write it should have been spent reading that API you have so inaptly described. I encourage you to delete it.
You can use it to train the models that they have built. You can't make new models. I've done quite a bit of research into ML.NET because the nomenclature lead me to believe that it can fill the role of Tensorflow.
Having used this framework you absolutely use it to train and create novel classification models. I used it to train financial transaction classification models, it works quite well.
Can you confirm whether or not you can train tensorflow with this? Your example on github has a pre-trained model. Easy integration of pre-trained models is great, but it should state up-front whether you can use it to build and train one.
You can train classic machine learning models like classification and regression as well as decision trees and more, or you can use pre-trained deep neural networks (Tensorflow, ONNX)
I'm guessing you're from microsoft. The message that you seem to be getting here is that when people first see ML.NET they think Tensorflow, including being able to train it. They take a look around your examples looking for training examples and don't find them, and are then annoyed that this was not stated up front.
It does not lower the value of ML.NET to clearly state that it does not allow building and training tensorflow models, it actually prevents annoyance at having to dig around and figure it out from lack of examples. It should be stated in the readme.md before the installation section.
I'll add that there is very little point in coming onto HN and looking for the community's feedback if you're going to ignore it.
That's fair and it's a good idea. I'll make sure we update the docs to be more clear. Ml.net does enable retraining TF models too so will make sure we publish examples too
Microsoft alumnus here...it's so obvious you work there.
"End-to-end", "workflow", "across X, Y, Z, A", "scenarios". I'd just started to forget that language, but there it is. (The "local dialect" at Microsoft strikes again)
The base ML.NET framework comes with a variety of numpy alternatives, datatypes for heterogenous (IDataView) and homogenous (VBuffer) data, a variety of transforms for data pre-processing, feature extraction (e.g. OneHotCodeEncoding), Missing values, normalization etc. handy for common ML scenarios like classification, regression, recommendation etc. you can find the full list here.
Types:https://github.com/dotnet/machinelearning/blob/master/docs/c...
Transforms: https://docs.microsoft.com/en-us/dotnet/machine-learning/res...
I think it's because there aren't as many mature libraries for data scientist to use. That and prototyping isn't as friendly as it is in something like Python.
In terms of things similar to numpy there's Accord.NET which is a very solid library but as far as I know, it's really the only mature/common one used.
Another thing is that .NET more or less focuses on traditional software development which I think can be considered cumbersome to work with if you're trying to test stuff quickly.
Little disclaimer, I'm not a data scientist but these are things I've noticed while deving with .NET so I'm not sure how much they actually apply to the day to day for a data scientist.
Prototyping in Python for a large subset of people is NOT friendly. To quote a famous book or something; "My God, it's full of shapes!". Shapes whose shape matter, just not so much to the language and tooling you interface with them from. It's like trying to drive a 3d world from a 2d world :|
IMHO F# has the potential to be WAY more friendly for prototyping and more. It's all a matter of the libs.
> IMHO F# has the potential to be WAY more friendly for prototyping and more. It's all a matter of the libs.
Yeah, I've been dropping down to Visual Studio's F# console regularly to test things in a REPL-like environment.
Nowhere near the convenience of IPython though - I haven't come across anything way to import assemblies other than "#r /some/path/to/assembly.dll", which requires me to manually navigate through my project directories to find the correct folder/assembly. A notebook environment inside VS would be fantastic, too - rather than having a single line terminal-style input.
I started ML work in python coming from a .NET background. To echo one of the other comments here- I believe one main reason is due to the iterative nature of data science. You have to sort of re-build completely every time you make a change in .NET. There isn't much of a notebook concept in .NET- a running engine you can query with additional commands/cells/etc, which is beneficial. As well, real-world data feels easier to work with in a more forgiving environment (non-static typing, etc) like Python. However ML.NET is a cool endeavor and as the .NET data prep libraries get more mature we may find some more production benefits from the very typing/compiling system that, while making it difficult to iterate in, provide more stability in the wild.
I think Mono has a solution, but as far as I know .NET Core basically is unusable for scripting because of this for C# which makes the kind of scenario you want basically impossible from the get go.
It is a bit weird not more attention is given to it given so many people ache for an interactive C# environment, especially for this purpose, but also for faster iteration with Xamarin on iOS/Android etc (all of my colleagues would save a lot of time on development with this for Xamarin mobile dev especially).
If that has been fixed, there is still the lack of libraries but that and the rest of what is needed is at least not basically impossible to solve by mere mortals.
That's not the same thing though; to be able to actually REPL a complete app or stick in an interpreter where you need it. I tried workbooks and it's more a toy (like Swift playgrounds by the way). It helps for sure, but when we are working on bigger existing apps, we want to plug in REPLs in particular places and iterate. Or generally iterate; both do not fit with the VS REPL or Workbooks.
I agree with you, but having the Mono interpreter (which does not have the same issues) fully work for mobile (Xamarin Android/iOS) and desktop (it is with --interpreter) and web (it is with Blazor) would make life easier for this kind of mainstream development.
No, cntk is focused on deep learning and ml.net is more focused on traditional ML as well as making it easier to deploy trained deep learning Tensorflow or ONNX models in your apps and services
The way to think about ML.NET is really a higher level framework which comes built in with traditional ML trainers, transforms etc. and through its extensibility allows .NET developers to also use other leading frameworks for deep learning e.g. TensorFlow and standards e.g. ONNX models using one uniform set of APIs.
For those who are not aware, there is https://github.com/migueldeicaza/TensorFlowSharp for your arbitrary TF in DotNet needs. Last I played with it, it even work well in F#. Which, let's be honest here, is the dream right? Right?!
TensorFlowSharp has bindings to the C API of TensorFlow, but no implementations of the Python stuff that you really need for training, such as optimizers.
I really want to use F# for training deep learning models, but at this point it doesn't seem feasible, at least not without a lot of hassle compared to using Python.
Hmm, didn't realize that; I only ever really verified it worked and worked with F# haha. In the scheme of things the optimizers are rather small bits that could be encapsulated quickly..
52 comments
[ 3.3 ms ] story [ 84.4 ms ] threadI think the target use case for ML.NET is really putting existing machine learning models into production in .NET. That's not limited to deep learning (it supports "traditional" ML models like logistic regression out of the box), but a first-party wrapper for tensorflow models is useful (which previously required vectorizing everything by hand and passing to TensorflowSharp)
Training vanilla models is "nice to have" but the real value is in putting trained models into production.
Generally speaking, the ML.NET API still needs a lot of work. I think they're partway through switching from a "LearningPipeline" API to a "Data/Transformer/Estimator" API, but some of the documentation refer to the former, some to the latter, some new methods still require legacy classes, the naming conventions aren't clear and not all of it is strongly-typed so you won't know until runtime whether you've passed the correct Transform/Estimator, on the whole it's a bit confusing.
That being said, it still hasn't hit 1.0, so I think the team is aware that the API needs further work. If they standardize 1.0 on the Data/Transformer/Estimator, blow away the legacy classes and update the documentation, it will be a pretty nice framework for production.
this should be exactly the first sentence in the git repository. to confirm the original commenter: this API is mostly for deploying networks, not so much for training/developing new models etc
In startupdiscuss' sense, ML.net would allow building own models if it offers building-blocks, abstractions, and other facilities, for examples, vectors, matrices, tensors, linear algebraic operations, computation-graph, etc that allow building them.
Not that I have done too much ML stuff beyond experimenting, it seems to be Accord.NET is a lot more abstracted compared to TensorFlow...
[0]: http://accord-framework.net/
ML.NET is also extensible, which means we can absorb other leading deep learning frameworks like TensorFlow and Accord.NET through one consistent API providing a uniform way to do ML in .NET.
Here's a link to the samples: https://github.com/dotnet/machinelearning-samples
The base framework comes with a variety of transforms, trainers, utility apis for loading varies forms of data (e.g. csv's, tsv's) to build custom machine learning models trained with your own data.
Using the API you can build a variety of models for scenarios like Sentiment analysis (classification), forecasting, recommendation and also leverage pre-built Tensorflow models for scenarios like image classification.
The samples repo provided shows you a variety of scenarios with ML.NET.
https://github.com/dotnet/machinelearning-samples
@zamalek, would love to learn how we can improve the API to make this stand out :).
ML.NET only has what's in the box, it's turn-key. You guys have an explicit ResNet18 assembly, as one example. While this is incredibly useful, it is not appropriate to call such a library a framework.
A possible improvement would be:
ML.NET is a machine learning API which is aimed at providing turn-key models for infusing ML...
If you wanted it to classify as a framework, you'd have to provide something like Tensorflow does: a way to develop new and novel models.
That's just my opinion, but a few people seem to agree.
It does not lower the value of ML.NET to clearly state that it does not allow building and training tensorflow models, it actually prevents annoyance at having to dig around and figure it out from lack of examples. It should be stated in the readme.md before the installation section.
I'll add that there is very little point in coming onto HN and looking for the community's feedback if you're going to ignore it.
"End-to-end", "workflow", "across X, Y, Z, A", "scenarios". I'd just started to forget that language, but there it is. (The "local dialect" at Microsoft strikes again)
v0.7 = https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcin...
v0.6 = https://blogs.msdn.microsoft.com/dotnet/2018/10/08/announcin...
v0.5 = https://blogs.msdn.microsoft.com/dotnet/2018/09/12/announcin...
Does it have numpy alternative?
In terms of things similar to numpy there's Accord.NET which is a very solid library but as far as I know, it's really the only mature/common one used.
Another thing is that .NET more or less focuses on traditional software development which I think can be considered cumbersome to work with if you're trying to test stuff quickly.
Little disclaimer, I'm not a data scientist but these are things I've noticed while deving with .NET so I'm not sure how much they actually apply to the day to day for a data scientist.
IMHO F# has the potential to be WAY more friendly for prototyping and more. It's all a matter of the libs.
Yeah, I've been dropping down to Visual Studio's F# console regularly to test things in a REPL-like environment.
Nowhere near the convenience of IPython though - I haven't come across anything way to import assemblies other than "#r /some/path/to/assembly.dll", which requires me to manually navigate through my project directories to find the correct folder/assembly. A notebook environment inside VS would be fantastic, too - rather than having a single line terminal-style input.
C#.NET Core suffers (as far as I know) from this;
https://stackoverflow.com/questions/47394231/csharpscript-us...
I think Mono has a solution, but as far as I know .NET Core basically is unusable for scripting because of this for C# which makes the kind of scenario you want basically impossible from the get go.
It is a bit weird not more attention is given to it given so many people ache for an interactive C# environment, especially for this purpose, but also for faster iteration with Xamarin on iOS/Android etc (all of my colleagues would save a lot of time on development with this for Xamarin mobile dev especially).
If that has been fixed, there is still the lack of libraries but that and the rest of what is needed is at least not basically impossible to solve by mere mortals.
Then there are Xamarin Workbooks, like Swift playgrounds but for .NET.
Fsharp is scriptable and has jupyter kernel...
A lot of HN is a niche so don't get your used/not used stats from here
https://fslab.org/Deedle/
Also: (Diffsharp is AD like pytorch) https://fsharp.org/guides/math-and-statistics/
https://www.microsoft.com/en-us/cognitive-toolkit/
You can learn more about ML.NET here: https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotn...
I really want to use F# for training deep learning models, but at this point it doesn't seem feasible, at least not without a lot of hassle compared to using Python.
Poking around it looks like Accord.Net is interested in getting CNN support in via TensorFlowSharp: https://github.com/accord-net/framework/issues/92 . Then there is ConvNetSharp.
I'm sure a fun project for someone would also be to implement all this in a pure F# library. It supposedly has some pretty good GPU libs.
https://github.com/losttech/Gradient-Samples
https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcin...