Machine Learning for .NET
github.com
github.com
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.
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 :).
"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)
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.
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.
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...
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
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...
You can learn more about ML.NET here: https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotn...
https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcin...
Does it have numpy alternative?
Fsharp is scriptable and has jupyter kernel...
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.
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.
Also: (Diffsharp is AD like pytorch) https://fsharp.org/guides/math-and-statistics/