hammlab / Crowd-ML

Framework for Crowd-sourced Machine Learning
Apache License 2.0
16 stars 10 forks source link

Runtime Error on Android client in JacksonBranch #7

Closed tylermzeller closed 7 years ago

tylermzeller commented 7 years ago

Whenever I login to the Android client, there is a crash. @FrankHYB has pointed out that the crash originates from the DataSend.java class. I did some investigation into the problem and it appears that when the client attempts to receive the weights from the Firebase db, the data the java code expects is different from the actual data stored in Firebase.

screen shot 2016-10-18 at 4 29 16 pm

This is what the weights tree looks like in my Firebase db. If you expand the first child, thousands of weight values appear. If you expand the second branch, a 1 and a -1 appear.

tylermzeller commented 7 years ago

@FrankHYB also discovered that if you run crowdML-server-android.js from the master branch, you get the above tree as a result. If you run crowdML-server.js instead, you get a very different tree.

FrankHYB commented 7 years ago

I asked Yani about this, she said these two servers use different algorithms. crowdML-server.js should be Neural network, i think Jackson’s android uses softmax.

Yubin On Oct 19, 2016, at 11:47 AM, Tyler Zeller notifications@github.com<mailto:notifications@github.com> wrote:

Yubin also discovered that if you run crowdML-server-android.js from the master branch, you get the above tree as a result. If you run crowdML-server.js instead, you get a very different tree.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jihunhamm/Crowd-ML/issues/7#issuecomment-254854250, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKXlP3BcgCowgk5BK7mNJcF6nviibJXks5q1juJgaJpZM4KbIsT.

ynxyn commented 7 years ago

crowdML-server.js works for normal versions of both iOS and Android, and crowdML-server-android.js only works for test version of Android(It may work for normal version if Jackson made further modification, but this version is made because he used test lab to test the app). Both versions can run all algorithms, not just NN or Softmax. You can change the option of algorithms in Constants.js. I used NN to test the app with running multiple devices. This is because of my setting, and doesn't mean the server can only run NN or Softmax. I know Jason used Softmax to test for sure, but I don't know if he got time to test with NN. You guys can try different algorithms. Maybe try logReg or hingeLoss first, because they can run binary-class data. Then the lengths of gradients&weights are shorter. Let me know if you have any question about it.