Comments

You must log in or register to comment.

ElongatedMuskrat122 t1_iv23y51 wrote

Well first off, you need to know what methods you’re using.

If you’re trying to build your own library, just port SKlearn

1

danielfm123 t1_iv2a4rf wrote

ussually ML library are implemented in popular languages like python, R, spark.

you could build a web api in R o Python, and just fetch the results from kotlin.

thats a good aproach, specially because models are constatly retrained and adjusted.

1

arg_max t1_iv2cb5u wrote

I think it kind of depends on what you want to do in the end. Machine learning can be complex and learning how to implement state of the art methods and understanding how they work can take years. If you want to do rather simple stuff like linear regression, you can probably just use a java linear algebra library and implement it yourself. But more complex stuff like deep learning is done using specialised libraries like Tensor flow, pytorch and so on. And I don't think you want to reimplement them yourself in java. Now you could either use pytorch in c++, wrap it and call from java or write the ml stuff in python which has the best framework support and then pass the data from java to your python program, calculate in python and send results back to java. There also is a deep java library but I have no experience with it and can't tell you how well it works. But yeah, ml is mostly done in python or c++ these days.

1