<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/index.php?action=history&amp;feed=atom&amp;title=PeerLogic_Web_Services%3A_Intelligent_Assignment</id>
	<title>PeerLogic Web Services: Intelligent Assignment - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/index.php?action=history&amp;feed=atom&amp;title=PeerLogic_Web_Services%3A_Intelligent_Assignment"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;action=history"/>
	<updated>2026-05-31T05:21:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;diff=142912&amp;oldid=prev</id>
		<title>Ggarrid: Ggarrid moved page Web-services: Intelligent Assignment to PeerLogic Web Services: Intelligent Assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;diff=142912&amp;oldid=prev"/>
		<updated>2022-02-22T02:35:39Z</updated>

		<summary type="html">&lt;p&gt;Ggarrid moved page &lt;a href=&quot;/index.php?title=Web-services:_Intelligent_Assignment&quot; class=&quot;mw-redirect&quot; title=&quot;Web-services: Intelligent Assignment&quot;&gt;Web-services: Intelligent Assignment&lt;/a&gt; to &lt;a href=&quot;/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&quot; title=&quot;PeerLogic Web Services: Intelligent Assignment&quot;&gt;PeerLogic Web Services: Intelligent Assignment&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:35, 22 February 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ggarrid</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;diff=142896&amp;oldid=prev</id>
		<title>Ggarrid: /* Accessing the service */</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;diff=142896&amp;oldid=prev"/>
		<updated>2022-02-15T02:35:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Accessing the service&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:35, 15 February 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This service is hosted at: http://peerlogic.csc.ncsu.edu/intelligent_assignment/[method name]. This service can be called without copying the code onto your local machine, simply make a post request to this url with one of the method names mentioned below.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This service is hosted at: http://peerlogic.csc.ncsu.edu/intelligent_assignment/[method name]. This service can be called without copying the code onto your local machine, simply make a post request to this url with one of the method names mentioned below.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Run it on your local machine===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Run it on your local machine===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The service can be copied from its github repository (https://github.com/peerlogic/IntelligentAssignment). It should be deployed as a webservice; though, it will also require the python libraries flask and scipy:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The service can be copied from its github repository (https://github.com/peerlogic/IntelligentAssignment). It should be deployed as a webservice; though, it will also require the python libraries flask and scipy:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ggarrid</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;diff=142895&amp;oldid=prev</id>
		<title>Ggarrid: Created page with &quot;=Intelligent Team and Topic Assignment= Intelligent assignment creates teams based off of each individual users ranking of topic preference, using k-means clustering. This web...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=PeerLogic_Web_Services:_Intelligent_Assignment&amp;diff=142895&amp;oldid=prev"/>
		<updated>2022-02-15T02:35:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Intelligent Team and Topic Assignment= Intelligent assignment creates teams based off of each individual users ranking of topic preference, using k-means clustering. This web...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Intelligent Team and Topic Assignment=&lt;br /&gt;
Intelligent assignment creates teams based off of each individual users ranking of topic preference, using k-means clustering. This webservice requires an input of each users ranks [1 being most preferred, and 0 indicating no preference] and unique id [pid], as well as the max team size. This also uses top trading cycles to switch members of teams who have already worked with other members on that team.&lt;br /&gt;
&lt;br /&gt;
==Accessing the service==&lt;br /&gt;
===Access the Webservice online===&lt;br /&gt;
This service is hosted at: http://peerlogic.csc.ncsu.edu/intelligent_assignment/[method name]. This service can be called without copying the code onto your local machine, simply make a post request to this url with one of the method names mentioned below.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
===Run it on your local machine===&lt;br /&gt;
The service can be copied from its github repository (https://github.com/peerlogic/IntelligentAssignment). It should be deployed as a webservice; though, it will also require the python libraries flask and scipy:&lt;br /&gt;
&lt;br /&gt;
-[Scipy](https://www.scipy.org/scipylib/download.html)&lt;br /&gt;
&lt;br /&gt;
-[Flask](https://pypi.python.org/pypi/Flask)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===Creating teams (/merge_teams):===&lt;br /&gt;
Uses K-means clustering to group users with similar topic interests. Works to eliminate competition for any single topic and increase the likelihood that each user obtains their most preferred topic.&lt;br /&gt;
&lt;br /&gt;
===Sample input and output===&lt;br /&gt;
&lt;br /&gt;
Input:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{“users”:[&lt;br /&gt;
{“ranks”:[1,0,2,3], “pid”:1023},&lt;br /&gt;
{“ranks”:[1,2,0,3], “pid”:4535},&lt;br /&gt;
{“ranks”:[0,2,3,1], “pid”:1363},&lt;br /&gt;
{“ranks”:[2,1,0,3], “pid”:9841}],&lt;br /&gt;
“max_team_size”:4}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{“users”: [&lt;br /&gt;
{“ranks”: [1,0,2,3],”pid”: 1023},&lt;br /&gt;
{“ranks”: [1,2,0,3],”pid”: 4535},&lt;br /&gt;
{“ranks”: [0,2,3,1],”pid”: 1363},&lt;br /&gt;
{“ranks”: [2,1,0,3],”pid”: 9841}],&lt;br /&gt;
“teams”: [[1363,9841],[1023,4535]]}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Swapping Team Members (/swap_team_members):===&lt;br /&gt;
Uses Top Trading Cycles to swap members, that have already worked with members on their team, with other teams’ members. This method only swaps a max of one member per team per run. Begins by first sorting the list of available members by distance from the teams centroid and then by whether or not other members of the team have worked with them. This method requires a history of users that each user has worked with, along with the general information.&lt;br /&gt;
&lt;br /&gt;
===Sample input and output:===&lt;br /&gt;
&lt;br /&gt;
Input:&lt;br /&gt;
{“users”:[&lt;br /&gt;
{“ranks”:[1,0,2,3], “history”:[4535,9841,9843], “pid”:1023},&lt;br /&gt;
{“ranks”:[1,2,0,3], “history”:[1023,9843,8542], “pid”:4535},&lt;br /&gt;
{“ranks”:[0,2,3,1], “history”:[3649,9841,9843], “pid”:1363},&lt;br /&gt;
{“ranks”:[2,1,0,3], “history”:[1363,1023,3649], “pid”:9841}],&lt;br /&gt;
“teams”: [[1023,2549],[4535,9843],[1363,1867,3649],[9841,8542,7521]]}&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
{“users”: [&lt;br /&gt;
{“ranks”: [1, 0, 2, 3], “pid”: 1023, “history”: [4535, 9841, 9843]},&lt;br /&gt;
{“ranks”: [1, 2, 0, 3], “pid”: 4535, “history”: [1023, 9843, 8542]},&lt;br /&gt;
{“ranks”: [0, 2, 3, 1], “pid”: 1363, “history”: [3649, 9841, 9843]},&lt;br /&gt;
{“ranks”: [2, 1, 0, 3], “pid”: 9841, “history”: [1363, 1023, 3649]}],&lt;br /&gt;
“teams”: [[9841, 4535], [1023, 1363]]}&lt;br /&gt;
&lt;br /&gt;
Client Code Example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import requests&lt;br /&gt;
import json&lt;br /&gt;
&lt;br /&gt;
#Test data&lt;br /&gt;
data = json.dumps(&lt;br /&gt;
           {&amp;quot;users&amp;quot;:[&lt;br /&gt;
                {&amp;quot;ranks&amp;quot;:[1,0,2,3], &amp;quot;history&amp;quot;:[4535,9841,9843], &amp;quot;pid&amp;quot;:1023},&lt;br /&gt;
                {&amp;quot;ranks&amp;quot;:[1,2,0,3], &amp;quot;history&amp;quot;:[1023,9843,8542], &amp;quot;pid&amp;quot;:4535},&lt;br /&gt;
                {&amp;quot;ranks&amp;quot;:[0,2,3,1], &amp;quot;history&amp;quot;:[3649,9841,9843], &amp;quot;pid&amp;quot;:1363},&lt;br /&gt;
                {&amp;quot;ranks&amp;quot;:[2,1,0,3], &amp;quot;history&amp;quot;:[1363,1023,3649], &amp;quot;pid&amp;quot;:9841}],&lt;br /&gt;
            &amp;quot;max_team_size&amp;quot;:2}&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
header = {'content-type': 'application/json'}&lt;br /&gt;
&lt;br /&gt;
response = requests.post(&amp;quot;http://127.0.0.1:5000/merge_teams&amp;quot;,data= data,headers=header)&lt;br /&gt;
&lt;br /&gt;
print response.text&lt;br /&gt;
&lt;br /&gt;
#The response from merge teams can be used in swap team members if&lt;br /&gt;
#history was given in the body of the request to merge teams&lt;br /&gt;
&lt;br /&gt;
response = requests.post(&amp;quot;http://127.0.0.1:5000/swap_team_members&amp;quot;, data=response.text,headers=header)&lt;br /&gt;
&lt;br /&gt;
print response.text&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ggarrid</name></author>
	</entry>
</feed>