Jump to content

-franciskane-

Members
  • Posts

    17
  • Joined

  • Last visited

-franciskane-'s Achievements

Member

Member (2/5)

0

Reputation

  1. @gw1500sehello! Those 4 variables' data will be coming from a database but will be split into pairs. The first pair of variables will be coming from a mobile app. then the second pair will be already saved in the database and will be used as the data(s) to be compared to the first pair of variables. Or at least its what we intended to happen.
  2. Hello! I found this code from github. https://github.com/gburtini/Learning-Library-for-PHP and I want to know if its possible to add variables to it and what changes needed to be done to the whole script. My first guess is the variables are $xs and $ys I want replace them and add two more. The whole code is here: <?php require_once 'function.php'; function ll_nn_predict($xs, $ys, $row, $k) { $distances = ll_nearestNeighbors($xs, $row); $distances = array_slice($distances, 0, $k); $predictions = array(); foreach($distances as $neighbor=>$distance) { $predictions[$ys[$neighbor]]++; } asort($predictions); return $predictions; } function ll_nearestNeighbors($xs, $row) { $testPoint = $xs[$row]; $distances = _ll_distances_to_point($xs, $testPoint); return $distances; } function _ll_distances_to_point($xs, $x) { $distances = array(); foreach($xs as $index=>$xi) { $distances[$index] = ll_euclidean_distance($xi, $x); } asort($distances); array_shift($distances); return $distances; } and the function.php that is required is this: <?php function ll_transpose($rows) { $columns = array(); for($i=0;$i<count($rows);$i++) { for($k = 0; $k<count($rows[$i]); $k++) { $columns[$k][$i] = $rows[$i][$k]; } } return $columns; } function ll_mean($array) { return array_sum($array)/($array); } function ll_variance($array) { $mean = ll_mean($array); $sum_difference = 0; $n = count($array); for($i=0; $i<$n; $i++) { $sum_difference += pow(($array[$i] - $mean),2); } $variance = $sum_difference / $n; return $variance; } function ll_euclidean_distance($a, $b) { if(count($a) != count($b)) return false; $distance = 0; for($i=0;$i<count($a);$i++) { $distance += pow($a[$i] - $b[$i], 2); } return sqrt($distance); } I just want to know where is the variables in those 2 scripts and add more as I'm not well versed in using PHP. Thank you!
  3. @requinixI think my friend has already done that part. that's why the code is the only thing missing. since the algorithm is already available from the published paper.
  4. @requinix The project is about attendance tracking through wifi fingerprinting based on a published paper that I posted in my original question months ago. The project aims to track the log in and log out time of the faculty members of a school and determine the accuracy of location estimation using QR code and WIFI RSS Fingerprinting.
  5. @requinix We just need help with the algorithm itself. and how to use the values that were mentioned above. @gw1500se Room 413 and 415 will be tested independently. This was supposed to be implemented on the whole building but for now only 2 rooms will be used first. And AP 1 and 2 for each room will also be tested. (I apologize in advance if I answered your question differently, English is not my main language)
  6. I made a post a while back about this topic here: and I've clarified a few things with my friend. 1. The input from the project will be coming from a mobile app which will be using a qr code. The qr code contains the Room Number and the 2 Access Points for each room. When a user scans the qr code it will pass that info to the web app that has the algorithm and verify what room he/she is in the access point that was 'scanned'. 2. For the testing of the project we decided to use two rooms of the building of our alma mater and the access points were already defined based on tests: Room 413 has Access Point 1 that have the values of -67 dBm to -89 dBm and Access Point 2 that have the values of -40 dbm to -57 dBm while Room 415 has Access Point 1 that have the values of -30 dBm to -46 dBm and Access Point 2 that have the values of -75 dBm to -100 dBm 3. I already inputted the values and the rooms I've mentioned above in mysql to verify if the input from the qr code that was scanned it correct. but sadly we are stuck with the algorithm itself.
  7. The only part the we can make test data for (that I know of) is the login credentials from the db of the website that will also be used by the mobile app. And I wouldn't know how would you test a qr scanner without being there.
  8. Ohh. Ok I get it. We aren't on that phase yet because of the pandemic. My friend can't go to our alma mater yet to test the QR Scanner. We are hoping to finish everything first before she can test the mobile app and the website. then debug.
  9. I don't know if this is something but I browsed the files and I found this file named 'JsonHelper.cs'.
  10. Hello I have the c# files. but I cant upload them here. and from browsing those files I can't find any json file so maybe that she hasn't finished that part. I thought that I can finish first this algorithm then try to connect the website to the mobile app. but I guess my reasoning is wrong.
  11. Hello my friend said the she wrote the mobile app's source code in unity
  12. Ok. I'll get the source code of the mobile app from my friend (because she's the one that developed it.) thanks! and we haven't yet tested how the mobile app and the web app will 'meet'
  13. Hello! The php script that you sent. is there anything to add there or can we use that as is? and that will be incorporated into json? did I get that right?
  14. In our project the input will be coming from a mobile app that my friend made that scans a room. I don't if its needed but I can provide the documentation of the project here.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.