Apr 1 | 8:50 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Apr 1 | 9:55 AM |
Mark M. | turned off guest access |
Apr 1 | 10:10 AM |
Mark M. | has left the room |
Apr 1 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Apr 1 | 4:00 PM |
vanomart | has entered the room |
Mark M. |
hello, vanomart!
|
Mark M. |
how can I help you today?
|
vanomart |
Hi Mark, I am working on app that uses sensors. The goal is to get the data from different users/phones and then using the data to train the ML model that would predict which hand users hold the phone. I noticed from the testing so far that various phones output different sensor values. I was not able to find any useful information how to tackle this problem. I saw at some google apps that they require the user to calibrate the sensors before the first use, but I am not quite sure how to do that. Do you have any idea how should I approach this problem? Thanks
|
Apr 1 | 4:05 PM |
Mark M. |
well, I have never done this
|
Mark M. |
my assumption is that those apps just present the UI (e.g., "twist the phone like this") and collect readings
|
Mark M. |
how exactly they use that to normalize their data is less of an Android thing and more of a statistics thing, I guess
|
Mark M. |
the problem is that the calibration itself may be unreliable, if the user does not completely follow the instructions
|
Mark M. |
I assume that the "calibrated" data points prove to be better than not doing it, but, again, that's a matter of the data normalization more than the actual Android code
|
Apr 1 | 4:15 PM |
vanomart |
My problem is that only some phones output weird sensor data, moreover only some sensor values are off.
|
vanomart | |
Apr 1 | 4:20 PM |
Mark M. |
I am sorry, but I have no real idea what I am looking at in this image
|
vanomart |
this is the accelerometer plot of the scroll task. different traces represent x,y,z values
|
Mark M. |
what is the unit of the X axis?
|
vanomart |
milliseconds from the beginning of the experiment
|
Mark M. |
and, what is your specific concern with what these graphs are telling you? just the noise?
|
Apr 1 | 4:25 PM |
vanomart |
I am not quite sure I can explain it. Ok, nevermind, I was just interested if you ever had to solve such problem.
|
Mark M. |
sorry, but no
|
vanomart |
I also have an unanswered question in SO. Could you take a quick look? Thank you. http://stackoverflow.com/questions/42900284/str...
|
Apr 1 | 4:30 PM |
Mark M. |
I have not used those annotations, outside of what little that I assembled for a book chapter
|
Mark M. |
have you tried using a shorter EVENT_2?
|
Mark M. |
or temporarily removing the @Size?
|
Mark M. |
as right now, if I understand correctly, EVENT_2 is not a valid value, due to length
|
Mark M. |
yet you're saying in the @StringDef that it *is* a valid value
|
Mark M. |
and that could be confusing Lint
|
vanomart |
yes, EVENT_2 is not valid. Where exactly I say that?
|
Mark M. |
well, the value is "really_long_event_name_that_exceeds_32_chars_limit"
|
Mark M. |
so, while I didn't count the characters, I assume that it is longer than 32 characters :-)
|
Apr 1 | 4:35 PM |
vanomart |
yes, it is longer but the lint is not triggered
|
Mark M. |
my point is that having an invalid value in a @StringDef might be confusing Lint
|
Apr 1 | 4:40 PM |
vanomart |
Ok let's say that it might confuse lint. What should however work is sending an invalid param to the function. If I call new UserActivityEvent("asd"); but "asd" is not defined in @UserActivityEvents the lint should be triggered, right? Or not?
|
Mark M. |
I agree with your interpretation
|
Mark M. |
but I suggest either changing EVENT_2 to be valid or temporarily removing the @Size, and see what the results are
|
Mark M. |
if Lint now rejects "asd", then my Lint-confusion theory holds
|
Mark M. |
if Lint still accepts "asd", then my theory does not hold, and I am as confused as you are
|
vanomart |
yep, that fixes the problem with passing a value other than one defined in @UserActivityEvents
|
Apr 1 | 4:45 PM |
vanomart |
any idea how to implement a lint check for a field that cannot be longer than 32 chars? I can now see that if I apply both @Size and @StringDef to one class, the @StringDef is ignored
|
Mark M. |
why would you need @Size with @StringDef?
|
Mark M. |
so long as @StringDef has short-enough strings, by definition, your size limit is covered
|
Apr 1 | 4:50 PM |
vanomart |
my idea was to just specify events and don't care about the length. I log approximately 70 events in the app and we previously used events longer than 32 chars that were not displayed in the firebase. So instead of manually checking for the length or writing some shell script do to it I wanted something simple that would do it for me, in AS
|
Mark M. |
well, then, temporarily remove the @StringDef, and leave just @Size
|
Mark M. |
see where Lint complains
|
Mark M. |
fix those events
|
Mark M. |
later, if you switch back to @StringDef, you can get rid of @Size
|
Apr 1 | 4:55 PM |
vanomart |
Yes, I guess I have to do it this way. ok Mark, thank you for your time. Have a nice rest of the day :)
|
Mark M. |
you too!
|
Apr 1 | 5:00 PM |
Mark M. |
that is a wrap for today's chat
|
Mark M. |
the next chat is Tuesday at 7:30pm US Eastern
|
Mark M. |
have a pleasant day!
|
vanomart | has left the room |
Mark M. | turned off guest access |