Mobius icon indicating copy to clipboard operation
Mobius copied to clipboard

Need help with the Mobius workflow understanding

Open ramkumarravy opened this issue 8 years ago • 6 comments

Hi,

I'd like to contribute for Spark-Machine Learning in Mobius. I did some study on the Mobius workflow and with that I've also added support for a missing API "stat" in the Dataframe class and yes that worked well too.

For your reference, please find the sample code snippet from below.

DataFrame Stat - Correlation API call: api_call

DataFrame Stat Initialization/: dataframe_statinitialization

DataFrameStatFunctions Class: dataframestatfunctions

DataFrameStatFunctions Ipc Proxy: dataframestatfunctionsipcproxy

IDataFrameStatFunctionsProxy interface: idataframestatfunctionsproxy

When I went through the workflow, it seems like the use of the Proxy (with JVM call) made it easy to add support for an existing function. But, there was no luck, when I tried to create a new one for the Machine Learning (MLlib) on my own. I can understand that I am missing something with the SparkCLR - Scala project.

Can you please help me with this ? Also can you share some easy documentation for the better understanding ?

Thanks, Ramkumar

ramkumarravy avatar Mar 07 '17 09:03 ramkumarravy

The implementation looks good to me on a quick look. What issue are you facing with this code?

skaarthik avatar Mar 09 '17 21:03 skaarthik

Thanks for addressing my query. As I said earlier, the above code doesn't have any problem and in fact it worked well. All I wish to do is to add support for "MLlib" and for that when I tried the same way(as above), I couldn't achieve it.

When I went through the workflow, it seems like the use of the Proxy (with JVM call) made it easy to add support for an existing function. But, there was no luck, when I tried to create a new one for "MLlib" on my own. I can understand that I am missing something with the SparkCLR - Scala project.

Can you please help me with this ? Also can you share some easy documentation for the better understanding ?

Expecting a quick answer from your end... Thanks in advance :)

ramkumarravy avatar Mar 10 '17 04:03 ramkumarravy

But, there was no luck, when I tried to create a new one for "MLlib" on my own

Can you share more details on this (error message, build error etc.)?

can you share some easy documentation for the better understanding

Unfortunately we do not have any documentation to explain the code components. You seem to be on the right track with the implementation for Corr. If you share details on the errors you are getting, one of the contributors might be able to help

skaarthik avatar Mar 10 '17 23:03 skaarthik

@ramkumarravy : Feel free to open a pull request with your code. We can work with you to fix any issues you're experiencing and get it ready to be merged into master.

dwnichols avatar Mar 11 '17 19:03 dwnichols

Hi,

I’ve added support for Spark - Machine Learning (MLlib) – Linear Regression Model class in Spark CLR project and have added a class “MLlib” with “LinearRegrssionModel()” API in Mobius CSharp Adapter to perform its function.

Please find the sample code snippets from below:

Linear Regression Model - API call:

api_call

Getting Spark Context Reference:

getsparkcontext_reference

Linear Regression Model - JVM call:

jvm_call

Linear Regression Model – Scala implementation:

lrmodel_scala

Linear Regression Mode – Result (temporary):

lrmodel_result

Temporarily, I’ve returned the key metrics of Linear Regression Model like MSE, RMSE, Intercept and Coefficients.

I’d like to know whether the flow which I’ve followed to add support for Spark-MLlib class is fine or not. So, please share me your comments and let me know if I went through a wrong way.

Thanks in advance :)

ramkumarravy avatar Mar 15 '17 18:03 ramkumarravy

Hi @ramkumarravy, could you please create a pull request containing your changes. Based on the above code, I would create two separate pull requests, one for the stat API another for the linearRegrssionModel. Pull requests are specifically designed for the code review process.

dwnichols avatar Mar 19 '17 17:03 dwnichols