I'm developing C# application where I need to use machine learning algorithm (Random Forest). C# is not very suitable for data analysis, so I saved data to .csv file and then analyzed them in Python using great scikit-learn library. I trained RandomForestRegressor (like there Python Scikit Random Forest Regressor Error) and it gives pretty nice results. But now I need to use this model in my C# application. Is there way to export model from scikit-learn lib and use it in C#?
1 Answers
1
votes
Implementing the prediction in random forests is a bit non-trivial. You basically need to program the evaluation of a decision tree. It is not as hard as implementing the training, but is probably still some work if you want it to be efficient.
Together with reading the python data structures, I would imagine that you might be better off using scikit-learn as an external library that you communicate with, as Steve P. suggested.
sci-kit
library inC#
, but you could just do all of the processing inpython
and send the results to yourC#
application. Not sure if this will work for you, but it's an idea... – Steve P.