ucsd-lo-group / social-network-analysis

Social Network Analysis in small groups to measure student performance at the University of California San Diego
MIT License
1 stars 0 forks source link

[MATLAB] rawdatamatrixprocessor amax calculated incorrectly #10

Closed Alee4738 closed 6 years ago

Alee4738 commented 6 years ago

In rawmatrixprocessor.m, what is amax supposed to represent? We have 2 definitions in the comments for variable amax

qmax = max(q);
rmax = max(r);
% amax determines the highest number of participants in the group from each of the question and response group
amax = max(qmax,rmax);
...later on...
% amax is the number of ACTIVE participants in the group

By the way amax is calculated, it is not the number of active participants in the group; it is instead the maximum "number label" of any person who was active.

For example, suppose there were 5 people with 2 speech lines total: "5," and ",1". thus, qmax = 5, rmax = 1, and amax = max(qmax, rmax) = 5. 5 was just a number label for a single person (i.e. person 5), but the number of active participants was actually 2 (persons 1 and 5).

We have 2 fixes:

  1. Do not treat amax as the number of participants (so code that depends on amax must be changed to depend on another variable that does represent the number of participants). amax can be treated as an upper bound on the number of participants, though, so if our code needs only an upper bound, amax will suffice
  2. Code it differently so that amax does represent the number of participants (and I also suggest renaming amax because it will no longer be the max number label).

I can code up either one once I'm clear on the intent.

albertchai01 commented 6 years ago

For the intent, we want to count the number of people in the network. So, you're example is very possible that the script in an example where persons 1 and 5 are active and the script believes there are 5 people are active instead of 2 and persons 2,3, and 4 are non-participating members.

For this case, we want to change amax to represent the actual true number of participants that are active in the network. However, we still want to include these non-participants in the node printout since they are still part of the network.

Alee4738 commented 6 years ago

Sounds good.

One last question: my implementation will probably not need qmax or rmax (in the same file). Do we need to keep these variables (I see they're only used to calculate amax)?

albertchai01 commented 6 years ago

Change whatever variables are necessary, just comment on what they do (aka do what you gotta do) :)

Alee4738 commented 6 years ago

Commented and fixed.