Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
2
Contents1 API....................................................................................................................................................4
2 Noteonformat.................................................................................................................................4
MethodTitle.........................................................................................................................................4
3 WhatisanID?..................................................................................................................................4
4 Representationalstatetransfer(REST)............................................................................................4
4.1 HTTPResponseStatusCodes......................................................................................................5
5 Authentication..................................................................................................................................5
5.1 AccessCredentials......................................................................................................................5
5.2 UsingyourAccessCredentialstoSignaRequest........................................................................5
6 GettingData...................................................................................................................................10
6.1 GetDatasetMetadata..............................................................................................................10
6.2 GetSampleMetadata...............................................................................................................13
6.3 GetTransactions.......................................................................................................................14
6.4 GetStudent-StepRecords.........................................................................................................19
7 ExternalAnalyses...........................................................................................................................24
7.1 Accessandownership...............................................................................................................24
7.2 AddExternalAnalysis................................................................................................................24
7.3 GetExternalAnalysesMetadata...............................................................................................26
7.4 GetExternalAnalysis................................................................................................................26
7.5 DeleteExternalAnalysis............................................................................................................27
8 CustomFields.................................................................................................................................28
8.1 Accessandownership...............................................................................................................28
8.2 DataTypes................................................................................................................................28
8.3 AddCustomField......................................................................................................................28
8.4 GetCustomFieldMetadata......................................................................................................30
8.5 SetCustomField.......................................................................................................................30
8.6 DeleteCustomField..................................................................................................................31
9 LearningCurve................................................................................................................................32
9.1 Access........................................................................................................................................32
9.2 GetLearningCurve...................................................................................................................32
9.3 GetLearningCurvePoints.........................................................................................................34
3
10 KCMImport....................................................................................................................................36
10.1 Access...................................................................................................................................36
10.2 ImportKCM..........................................................................................................................36
AppendixA.................................................................................................................................................39
AllPossibleResultCodes........................................................................................................................39
AppendixB.................................................................................................................................................41
RevisionHistory......................................................................................................................................41
4
1 APIThisAPIisalistofmethodsforprogrammaticallygettingandmodifyingDataShopdata.Inbroadstrokes,thegoalfortheAPIistoprovideenoughfunctionalityforgettingtransactiondatawithvariousparameters,andadding,modifying,anddeletingcustom-fielddata.
AsofApril2016,we’veimplemented:
§ Authentication§ GetDatasetMetadata§ GetSampleMetadata§ GetTransactions§ GetStudent-StepRecords§ AddandGetExternalAnalyses§ GetExternalAnalysismetadata§ AddandDeleteCustomFields§ GetCustomFieldsmetadata§ SetCustomFieldsattheTransactionlevel§ GetLearningCurvecategorizations§ ImportKCModels
2 Noteonformat
MethodTitle
https://url/[?optional_section]URLtoperformtheaction.
3 WhatisanID?TheDataShopAPIexpectsyoutoreferencevariousobjectsby“ID”,auniqueidentifierforeachdataset,sample,customfield,externalanalysis,ortransactionintherepository.TheIDofanyofthesecanbedeterminedbyperformingarequesttolistthevariousitems,whichliststheIDsintheresponse.Forexample,arequestfordatasetswilllisttheIDofeachdatasetinthe“id”attributeofeachdatasetelement.Inthecaseofacustomfieldsandexternalanalyses,theIDcanalsobediscoveredfromtheresponseofasuccessfulrequestthataddsanewcustomfieldorexternalanalysis.
4 Representationalstatetransfer(REST)TheDataShopAPIdesigngenerallyfollowsa"REST"approachtowebservices.Indoingso,we'vemodeledDataShopasacollectionofresourceswhichcanberetrievedandmanipulatedusingHTTP.(Seethe"RESTfulWebServices"sectionofWikipedia'sRESTarticle.)
WedodeviatefromtheRESTapproachslightlyinoneway:theDataShopwebserviceignoresthetypeofHTTPmethodineachrequest.ThatmeanstheservicereliesonuniqueURLswithverbsinthem(e.g.,"get"and"delete")insteadofdistinguishingrequestsfromsimilarURLsbyHTTPmethod(e.g.,GETorDELETE).
5
4.1 HTTPResponseStatusCodesDataShopWebServiceswill,inmanycases,returnanHTTPstatuscodethatyoucanusetodeterminehowtoanalyzethebodyoftheHTTPmessage.Forexample,ifyouknowtheHTTPresponsecodewasanerrorsuchas“401Unauthorized”,thenyouknowthatthecontentofthebodyofthemessagewillbeXMLdescribingtheerror.
5 ForalistofwebservicesresultcodesandtheHTTPstatuscodesthatappearwiththem,seeLearningCurve
DataShopsupportslearningcurvecategorizationofKnowledgeComponents(KCs)aswellasretrievalofthelearningcurvedatapointsthemselves.Thissectiondescribesthecategorizationsandhowtheyandthedatapointscanberetrievedthroughwebservices.
IntheDataShopwebapplicationlearningcurvesforadatasetandskillmodelareplacedinoneoffourcategories:TooLittleData,LowandFlat,NoLearningandStillHigh.Learningcurvesthatdonotfallintoanyoftheabove"bad"or"atrisk"categoriesarelabeled“Good”astheyappeartoindicatesubstantialstudentlearning.
ThealgorithmforcategorizingKCsfirstdiscardspointsineachcurvebasedonthestudentthreshold.Ifapointhasfewerthanthatnumberofstudents,itisignored.Withinthepointsofcurveremaining:
• Ifthenumberofpointsisbelowtheopportunitythreshold,thenthatcurvehastoolittledata.• Ifallpointsofthecurvearebeneaththelowerrorthreshold,thenthecurveislowandflat.• Iftheslopeofthepredictedlearningcurve(asdeterminedbytheAFMalgorithm)isbelowthe
AFMslopethreshold,thenthecurveshowsnolearning.• Ifthelastpointofthecurveisabovethehigherrorthreshold,thenthecurveisstillhigh.
Aswiththewebapplication,theusermustspecifythedatasetingeneratingthewebserviceslearningcurveclassificationreport.Theusercanoptionallyspecifyaskillmodel;thedefaultbehaviorwillincludeallskillmodelsforthedatasetinthereport.Theabovethresholdshavedefaultvaluesortheusermayspecifythemandoverridethedefaultvalue.Theoutputisinplaintext,tab-delimitedformat.Inadditiontothelearningcurvecategory,thereportalsoincludestheKCintercept,KCslope,uniquestepcountandstepinstancecount.
5.1 AccessAnyuserwhohasviewrighttoadatasetcanusethiswebservice.
5.2 GetLearningCurve
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurves/classify[?kc_model=modelName]Getalistingoflearningcurvecategoriesforallskillsforthespecifieddatasetandskillmodel.
6
5.2.1 RequestParameterskc_model
Notrequired.DefaultallKCMsforthedataset.Casesensitive.
opportunity_threshold
Notrequired.Default3.Anygraphpointthathaslowerthanthisopportunitycountiseliminated.
student_threshold
Notrequired.Default10.Anygraphpointthathaslowerthanthisstudentcountiseliminated.
low_error_threshold
Notrequired.Default20.Anygraphpointthathaslowerthanthiserrorrateiseliminated.
high_error_threshold
Notrequired.Default40.Anygraphpointthathashigherthanthiserrorrateiseliminated.
AFM_slope_threshold
Notrequired.Default0.001.Anygraphpointthathaslowerthanthisslopeiseliminated.
5.2.2 Examplerequestwithdefault:
GEThttps://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurve/classify[?kc_model=Area]
5.2.3 Examplerequestwithspecifiedparameter:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurve/classify[?kc_model=Area&
opportunity_threshold=1&student_threshold=2]
5.2.4 Exampleresponseonsuccess:
Dataset: Geometry Area (1996-97)AFM slope threshold: 0.001 Student threshold: 10 Opportunity threshold: 3 Low error threshold: 20.0 High error threshold: 40.0 KC Model KC Name Category KC Intercept KC Slope # unique steps #opportunity 1 step instances # step instances Area Area formula No learning 0.9598860130611057 0.0 11 50 1784 Area Non-area formula Good 0.9359422484296835 0.0018665230448641058 22 59 3083 Geometry Geometry No learning 0.9690713757580114 2.226319206785172E-4 22 59 4843 Summary KC Model %Good %No learning %Low and flat %Still high %Too little data # observation AIC Item CV Area 50 50 0 0 0 5104 5642,15 Geometry 0 100 0 0 0 5104 0.408165
7
5.2.5 Exampleresponseonerror:<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_messageresult_code="-1"result_message="Error.Dataset9isnotvalid."/>
<?xml version="1.0" encoding="UTF-8"?> <pslc_datashop_message result_code="-18" result_message="Error. Skill model area is not
valid."/>
5.3 GetLearningCurvePoints
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurves/points?kc_model=modelName&skill=skillNameGetthelearningcurvedatapointsforthespecifiedskillmodelandskill.Theoutput,inXMLformat,givestheopportunitynumber(x-coordinate)aswellasthenecessarydatatoplotanyof:errorrate,assistancescore,predictederrorrate,average#ofincorrects,average#ofhints,stepduration,andcorrectstepduration.Foreachpoint,thenumberofobservations,stepdurationobservations,correctstepdurationobservations,errorstepdurationobservations,studentcount,problemcountandskillcountarealsogiven.
Ifthespecifieddatasethasa‘highStakes’customfielddefined(thisistrueforOLIdatasets)thentheoutputwillalsoincludethehigh_stakes_error_ratevalue.TheDataShopwebapplicationplotsthispointattheendoftheerror_ratecurve,e.g.,atthemaxopportunitynumber.
5.3.1 RequestParameterskc_model
Required.Thenameofskillmodelofinterest.Casesensitive.
skill
Required.Thenameoftheskillofinterest.Casesensitive.
5.3.2 Examplerequestwithspecifiedparameters:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/76/learningcurve/points?kc_model=Textbook
&skill=circle-area
5.3.3 Example(partial)responseonsuccess:<?xml version="1.0" encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success."> <learning_curve_point> <error_rates>0.0</error_rates> <assistance_score>0.0</assistance_score> <predicted_error_rate>31.297</predicted_error_rate> <avg_incorrects>0.0</avg_incorrects> <avg_hints>0.0</avg_hints> <step_duration>59.675</step_duration>
8
<correct_step_duration>59.675</correct_step_duration> <opportunity_number>1</opportunity_number> <observations>133</observations> <step_duration_observations>117</step_duration_observations> <correct_step_duration_observations>117</correct_step_duration_observations> <error_step_duration_observations>0</error_step_duration_observations> <students_count>133</students_count> <problems_count>3</problems_count> <skills_count>1</skills_count> <steps_count>4</steps_count> </learning_curve_point> … <high_stakes_error_rate>15.108</high_stakes_error_rate> </learning_curve_point> </pslc_datashop_message>
5.3.4 Exampleresponseonerror:<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_messageresult_code="-1"result_message="Error.Dataset9isnotvalid."/>
<?xml version="1.0" encoding="UTF-8"?> <pslc_datashop_message result_code="-18" result_message="Error. Skill model area is not
valid."/>
9
6 KCMImportDataShopsupportsaddingKCmodelstoadatasetviawebservice.ThisprocessiscalledKCMimport.ThissectiondescribestherequiredparametersanddataforKCMimport,theacceptableformatforimportdataandtheexpectedresultsafterKCMimport.
DatashopwebinterfaceallowsuserstoimportaKCMtoadataset.KCMimportmakesthesamefunctionalityavailableasawebservice.Similartothewebapplication,KCMimportrequiresadatasetIDandadatafilethatcontainsthemappingsofstepstoskills.StepsarerepresentedasstepIDandtheyshouldbeassociatedwiththespecifieddataset.AfterthenewKCMandthenewskillsandmappingsoftheskillstostepsaresavedtothedatabase,aggregationforthisKCMandstatisticalparameters(LL,AIC,BIC,CV,etc.)willbecomputedandsaved.
6.1 AccessUserwhohaseditingrighttoadatasetcanusethiswebservicetoimportaKCMtothedataset.
6.2 ImportKCM
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/importkcm/ImportaKCMtothedatasetspecified
6.2.1 RequestParametersfile:required,thefilethatstoresmappingsofstepIDsandskills
6.2.2 ExamplerequestusingDataShopwebservicesclient:C:\DS_webservices_java1.5>java-jardist/datashop-webservices.jar"https://pslcdatashop.web.cmu.edu/services/datasets/123/importkcm/"filename_of_file
6.2.3 Examplefortab-delimiteddatafile:POSThttps://pslcdatashop.web.cmu.edu/services/datasets/123/importkcm/
StepID KC(New_KCM) KC(AnotherNew_KCM)617b8c4a416f7eb515d56bf7fa7eab80 skill1 skill40b062c22b215ab6e6d80e09ea09880b5skill2 skill4ebdf2271d8f64bebb4c9f0cda65ccab0 skill1 skill53a9a903dbb2845762e7735147a08ea05skill1 skill5b0b071e0a6dee842078d8ac31babfd71 skill2 skill60cdd9ea7c8bbe389199a76fbed089a36 skill3 skill7
6.2.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="0"
result_message="Success. KCM(s): New KCM, Another New KCM saved successfully.
ModelvaluesarenowbeingcomputedforthenewKCM(s)."/>
10
Note:AfterthenewKCM(s)is(are)savedsuccessfully,Datashopwillstartaprocess
to reaggregate the dataset and compute AFM and Cross Validation for the new
KCM(s).Theamountoftimeneededforthisprocessvariesdependingonthesizeof
thedataset.TheusercanusetheDatashopwebapplicationorDatashopwebservice
(DatasetMetadataservice)tocheckthefinalresultsatalatertime.
6.2.5 Exampleresponseonerror:Whendatasetidisnotfound:
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-1"
result_message="Error.Dataset[id]isnotvalid."/>
When user doesn’t have editing right to the dataset:
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-2"
result_message="Error.Dataset[id]isnotaccessible."/>
When input file format is not valid, such as file header doesn’t have column “Step ID”:
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-19"
result_message="Error. Bad file format. The step identifier column "Step ID" was not
found."/>
When input file format is not valid, such as no KCM found in headers:
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-19"
result_message="Error.Badfileformat.NoKCMfoundtoimport."/>
When input file format is not valid, such as KCM name has invalid characters:
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-19"
result_message="Error.Badfileformat.Invalidcharacter(s)foundinmodelname."/>
Note:Validcharacters forKCmodelnames includespace,dash,underscore, lettersand
numbers.
When input file format is not valid, such as KCM name is too long (max is 50 characters)
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-19"
result_message="Error.Badfileformat.Modelnameis…,andit’stoolong:55."/>
When input file format is not valid, such as KCM already exists in Datashop
<?xmlversion="1.0"encoding="UTF-8"?>
11
<pslc_datashop_message
result_code="-19"
result_message="Error.Badfileformat.Modelnameis…,anditexistsalready."/>
When input file format is not valid, such as duplicate KCM names found in import file
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-19"
result_message="Error.Badfileformat.DuplicateKCMnamesfoundinimportfile."/>
WheninputfilecontainsinvalidstepID,i.e.stepIDdoesn’texistforthespecifieddatasetID:
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-20"
result_message="Error.InvalidstepIDfound:….."/>
When a KCM import already running for this dataset
<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-22"
result_message="KCM import already running (since 2015-04-06 8:31:43). Please try
importingyourmodelagainafterithascompleted."/>
12
AppendixA.
7 AuthenticationAuthenticationisaprocessforidentifyingandverifyingwhoissendingarequest.TouseDataShopwebservices,youneedtoidentifyyourselfasthesenderofeachrequest.Thisisaccomplishedbysendingadigitalsignaturethatisderivedfromapairofpublic/privateaccesskeys.
Note:TouseDataShopwebservices,youmustfirstrequestaccess.Visithttp://pslcdatashop.web.cmu.edu/WebServicesCredentialstoreadtheUserAgreementandrequestaccess.YouwillneedtofirstregisterwithDataShopifyouhaven’talready.
Note:Inadditiontothisdocumentation,consulttheJavasourceofthesampleDataShopwebservicesclientforcodeexamples.SeemethodssignedRequest,encrypt,andhttpTimestampinparticular.
7.1 AccessCredentialsAccesscredentialsreferstoyourtwoaccesskeys.YoucanretrieveorresetyouraccesskeysfromDataShop’sWebServicesCredentialspage.
AccessKeyID
YourAccessKeyIDidentifiesyouasthepartyresponsibleforservicerequests.Includeitwitheachrequestyousendtous.
SecretAccessKey
YourAccessKeyIDhasaSecretAccessKeyassociatedwithit.UseyourSecretAccessKeytocalculateasignaturetoincludeinrequeststoDataShopwebservices.YourSecretAccessKeyisasecret,andshouldbeknownonlybyyouandDataShop.YoushouldneverincludeyourSecretAccessKeyinyourrequeststoDataShopwebservices.YoushouldneveremailyourSecretAccessKeytoanyone.ItisimportanttokeepyourSecretAccessKeyconfidentialtoprotectyouraccount.
7.2 UsingyourAccessCredentialstoSignaRequestToauthenticatetoDataShop,youwill:
1. Createarequest2. Createaspecifictypeofmessagesignature3. SendtherequestandsignaturetoDataShopWebServices
SeeFigure1–Authenticationprocess.
DataShopWebServiceswillthen:
1. RetrieveyourSecretAccessKey2. Createthesametypeofsignature3. Comparethetwosignatures
Ifthetwosignaturesmatch,therequestisconsideredauthenticated;iftheyfailtomatch,thentherequestfailsauthentication.
13
Figure1–Authenticationprocess
Step1:Createarequest
Inthisstep,youcreateanHTTPrequestinyourprogramwhichhasastandardrequestline,anumberofrequestheaders,andanoptionalmessagebody(someDataShopWebServicesrequestsrequireabodywhileothersareonlyaURL).
Toauthenticate,yourrequestmustcontainthefollowingrequestheaders:
date
authorization
Set“date”accordingtothetimestampformat(seeTable1-Contentsofthestringtosign).
Youwillsetthevalueof“authorization”inStep3,describedbelow.
Step2:Createamessagesignature
EachrequestyousendmustincludeanHMAC-SHAsignaturecalculatedwithyourSecretAccessKey.HMAC-SHAisanindustry-standardmessageauthenticationprocedurethatusestheSHA-1cryptographichashfunctionincombinationwithasecretkeytocreateamessagesignature.DataShopusesittoverifytheauthenticityofyourrequest.
ThesignaturemustbeURL-encodedinUTF8.Thissignaturewillbeincludedinthe“authorization”headerasdescribedinStep3.
14
Thestringyouusetocalculatethesignature(thestringtosign)iscomposedasfollows:
method
contentMD5
contentType
timestamp
path
Eachlineinthestringtosignisseparatedbyalinebreak.SeeTable1-Contentsofthestringtosignforadescriptionofeachline.
Note:SeetheJavasourceofthesampleDataShopwebservicesclientforacodeexample.
Table1-Contentsofthestringtosign
partofthestring description examplemethod theHTTPmethodused—GET,PUT,
POST,orDELETEGET
contentMD5 anMD5hashofthemessagecontentifPUTorPOST,anemptystringifGETorDELETE
contentType MIMEtypeofcontentifPUTorPOST,anemptystringifGETorDELETE
text/xml
timestamp anHTTPdatestring(seehttpTimestampmethodbelow)
Tue, 20 Oct 2009
15:22:52GMT
path theportionoftherequestURLthatisafter“services”andbeforethefirstquestionmark(“?”).
/datasets/1/samples/3
/** * Format for HTTP date strings. * @return format for HTTP date strings */ private String httpTimestamp() { if (httpDateFmt == null) { httpDateFmt = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); httpDateFmt.setTimeZone(TimeZone.getTimeZone("GMT")); } return httpDateFmt.format(new Date()); }
Finally,youmustURL-encodethesignatureyou’vecreatedinUTF-8characterencoding.Thisistheapplication/x-www-form-urlencodedMIMEformat.Yourprogramminglanguagemayhaveautilitymethodthatwillperformthisencodingforyou.Forreference,seetheJavaclassjava.net.URLEncoder,whichyoucanusetoperformUTF-8URL-encodinginJava.
Step3:SendtherequestandsignaturetoDataShopWebServices
AftercalculatingthesignatureandURL-encodingit,youcannowattachittotherequest.
15
Setthe“authorization”headerasfollows,wherepublicApiTokenisyourpublictokenandsignatureistheHMAC-SHAsignatureyoucreateinStep2.:
“DATASHOP”+publicApiToken+“:”+signature
Forexample:
DATASHOP OKLFETPSJZJJFSGR6D8E:wzXDj0%2BEY3iosiwcgH%2FsYktDZPM%3D%0D%0A
Notethespaceafter“DATASHOP”.
SendthecompleterequesttoDataShopWebServices.
7.2.1 ExampleYouwanttoretrieveadescriptionofthefirstsample(“AllData”)forthedatasetwithid“1”.
Therequestlinelookslikethis:
GET /services/datasets/1/samples/1 HTTP/1.1
Therequestbodyisempty.
Youcreatea“date”header:
date:Tue,20Oct200916:59:47GMT
Thencreatethestringtosign:
method:GET
contentMD5:<empty>
contentType:<empty>
timestamp:Tue,20Oct200916:59:47GMT
path:/datasets/1/samples/1
or
GET
Tue,20Oct200916:59:47GMT
/datasets/1/samples/1
CreatetheHMAC-SHAsignaturefromthestringtosignandURL-encodeitinUTF-8:
wzXDj0%2BEY3iosiwcgH%2FsYktDZPM%3D%0D%0A
Andwiththat,formthe“authorization”header:
authorization: DATASHOP
OKLFETPSJZJJFSGR6D8E:wzXDj0%2BEY3iosiwcgH%2FsYktDZPM%3D%0D%0A
16
Thefullrequestwillthenlooklikethis:
GET/services/datasets/1/samples/1HTTP/1.1
date:Tue,20Oct200916:59:47GMT
authorization: DATASHOP
OKLFETPSJZJJFSGR6D8E:wzXDj0%2BEY3iosiwcgH%2FsYktDZPM%3D%0D%0A
accept:text/xml
user-agent:Java/1.6.0_13
host:https://pslcdatashop.web.cmu.edu
connection:keep-alive
17
8 GettingData
8.1 GetDatasetMetadata
http://pslcdatashop.web.cmu.edu/services/datasets/[?id]Getlistofdatasetsmatchingtheparameters,orinformationaboutasingledataset(ifanidisspecified).
8.1.1 RequestParametersaccess
all,viewableoreditable.Defaultisviewable.Allmeansreturnallthedatasets,thosethatarepublic,view,edit,admin,orprivate(seedescriptionsbelow).Viewablemeansreturndatasetsforprojectsonwhichyouhave“view”,“edit”,or“admin”privileges,inadditiontopublicdatasets.Editablemeansreturnonlydatasetsforprojectsonwhichyouhavethe“edit”or“admin”privilege.
Note:Ifyourequestasingledatasetandspecifyavalueforthe“access”parameter,DataShopwillrespecttheaccessparameter.Thiswillresultinanemptysetinthecasethatthedatasetrequesteddoesnotmatchtheaccessparameterspecified(e.g.,youspecified“access=editable”butthedatasetisonlyviewable).
verbose
trueorfalse.Defaultisfalse.Falsereturnsthesimpler,lessverbosedescriptionforeachdataset(seedirectlybelow)whiletruereturnsthemoreverbosedescriptionforeachdataset(seefurtherbelow).Averboseresponseisonlypossiblefordatasetsyoucanvieworedit(i.e.,notprivatedatasets).
8.1.2 ResponseFieldsaccessisyourlevelofaccesstothedataset.DataShopmodelseachuser'sdatasetaccessaseither"public","view","edit",“admin”,or"private",whichisthelevelofaccesstheyhavetothedataset’scontainingproject.
§ public:youandanyotherregisteredDataShopusercanviewthedataanddownloadassociatedfiles
§ view:youcanviewthedataanddownloadassociatedfiles.§ edit:inadditiontotheabove,youcancreatesamples,addormodifypapersandfiles,add
kcsets,andaddkcmodels§ admin:inadditiontotheabove,youcaneditdatasetandprojectmetadata,addormodify
datasetsintheproject,andmanageprojectaccess.§ private:youcannotviewthedataoreditanythingaboutthedataset
Forafulldescriptionoftheaccesslevels,seehttp://pslcdatashop.org/help?page=administration
number_of_samplesisthetotalnumberofsamplesincludingthosethatareaccessibleandthosethatarenotshared.
18
number_of_accessible_samplesisthenumberofsamplesthatyoucanaccess,ignoringprivatesamplesownedbyothers.
number_of_unique_stepsisthenumberofuniquesteps,whereuniquenessisdefinedasastepwithinaspecificproblemhierarchy(thecurriculumlocationwheretheproblemappears).Thesamestepattemptedbytwostudentsequalsonlyoneuniquestep.
Note:TheorderofdatasetsintheresponseXMLisindeterminate.
8.1.3 Examplerequest:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/31
8.1.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_messageresult_code="0"result_message="Success.">
<datasetid="31">
<name>PittsburghScienceofLearningCenterStoichiometryStudy1</name>
<project>StoichiometryStudies</project>
<domain>Science</domain>
<learnlab>Chemistry</learnlab>
<pi>bleber</pi>
<start_date>2005-09-02</start_date>
<end_date>2006-06-07</end_date>
<status>complete</status>
<access>edit</access>
<public>yes</public>
<released>yes</released>
<number_of_students>34</number_of_students>
<number_of_unique_steps>16453</number_of_unique_steps>
<number_of_steps>124882</number_of_steps>
<number_of_transactions>245093</number_of_transactions>
<number_of_samples>17</number_of_samples>
<number_of_accessible_samples>3</number_of_accessible_samples>
<number_of_kc_models>4</number_of_kc_models>
</dataset>
</pslc_datashop_message>
8.1.5 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-1"
result_message="Error.Dataset31isnotvalid."/>
8.1.6 Examplerequest(verbose)GEThttps://pslcdatashop.web.cmu.edu/services/datasets/31?verbose=true
19
8.1.7 ExampleverboseXMLresponse(moremetadata):<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_messageresult_code="0"result_message="Success.">
<datasetid="31">
<name>PittsburghScienceofLearningCenterStoichiometryStudy1</name>
<project>StoichiometryStudies</project>
<domain>Science</domain>
<learnlab>Chemistry</learnlab>
<pi>bleber</pi>
<start_date>2005-09-02</start_date>
<end_date>2006-06-07/end_date>
<status>complete</status>
<access>edit</access>
<public>yes</public>
<released>yes</released>
<curriculum>geometry2005</curriculum>
<tutor></tutor>
<description></description>
<has_study_data>yes</has_study_data>
<hypothesis>Loremipsum</hypothesis>
<school>WilkinsburgHighSchool</school>
<additional_notes>Schooldemographicsfor2005-6unlessnotedotherwise.
ConverterVersion4.15
Loadedtoproductionon4/15/08byKyle.
</additional_notes>
<number_of_students>34</number_of_students>
<number_of_unique_steps>16453</number_of_unique_steps>
<number_of_steps>124882</number_of_steps>
<number_of_transactions>245093</number_of_transactions>
<number_of_samples>17</number_of_samples>
<number_of_accessible_samples>3</number_of_accessible_samples>
<number_of_kc_models>4</number_of_kc_models>
<kc_modelid="25">
<name>Automatic-Model</name>
<number_of_kcs>456</number_of_kcs>
<observations_with_kcs>470117</observations_with_kcs>
<logistic_regression_model_status>unable to run
</logistic_regression_model_status>
<cross_validation_status>unabletorun</cross_validation_status>
</kc_model>
<kc_modelid="32">
<name>Single-KC</name>
<number_of_kcs>1</number_of_kcs>
<observations_with_kcs>126057</observations_with_kcs>
<number_of_parameters>10</number_of_parameters>
<logistic_regression_model_status>complete
</logistic_regression_model_status>
<aic>142117.54</aic>
20
<bic>142468.24</bic>
<log_likelihood>-2759.55</log_likelihood>
<cross_validation_status>complete</cross_validation_status>
<cross_validation_rmse>0.3457</cross_validation_rmse>
<cross_validation_number_of_observations>126056</cross_validation_number_of_observat
ions>
<cross_validation_number_of_parameters>10</cross_validation_number_of_parameters>
</kc_model>
<kc_modelid="14">
<name>Unique-step</name>
<number_of_kcs>9157</number_of_kcs>
<observations_with_kcs>0</observations_with_kcs>
<number_of_parameters>18314</number_of_parameters>
<logistic_regression_model_status>not scheduled to run
</logistic_regression_model_status>
<cross_validation_status>notscheduledtorun</cross_validation_status>
</kc_model>
</dataset>
</pslc_datashop_message>
8.2 GetSampleMetadata
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/samples/[?id]Getthelistanddescriptionsofsamplesmatchingtheparameters.
8.2.1 RequestParametersaccess
viewableoreditable.Defaultisviewable.Viewablemeansreturnonlysamplesyoucanview.Editablemeansreturnonlysamplesyouownandcanthereforeedit.
Note:Ifyourequestasinglesampleandspecifyavalueforthe“access”parameter,DataShopwillrespecttheaccessparameter.Thiswillresultinanemptysetinthecasethatthesamplerequesteddoesnotmatchtheaccessparameterspecified(e.g.,youspecified“access=editable”butthesampleisonlyviewable).
verbose
trueorfalse.Defaultisfalse.Falsereturnsthesimpler,lessverbosedescriptionforeachsample(seedirectlybelow)whiletruereturnsthemoreverbosedescriptionforeachsample(seefurtherbelow),includingadescriptionofeachfilterineachsample.
8.2.2 Examplerequest:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/422/samples/37
8.2.3 ExampleXMLresponseforasamplequery:<?xmlversion="1.0"encoding="UTF-8"?>
21
<pslc_datashop_messageresult_code="0"result_message="Success.">
<sampleid="37">
<name>CWCTC-GeoArea06-07</name>
<description>JusttheCWCTCstudentsontheareaunits(GEO-PA)</description>
<owner>aleven</name>
<number_of_transactions>350384</number_of_transactions>
</sample>
</pslc_datashop_message>
8.2.4 ExampleverboseXMLresponseforasamplequery:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_messageresult_code="0"result_message="Success.">
<sampleid="37">
<name>CWCTC-GeoArea06-07</name>
<description>JusttheCWCTCstudentsontheareaunits(GEO-PA)</description>
<owner>aleven</name>
<number_of_transactions>350384</number_of_transactions>
<filter>
<column>SchoolName</column>
<operator>=</column>
<filter_text>cwctc</filter_text>
</filter>
</sample>
</pslc_datashop_message>
8.2.5 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-4"
result_message="Error.Sample37isnotvalidfordataset422."/>
8.3 GetTransactions
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/[?samples/id]/transactionsReturnszeroormoretransactionrecordsintab-delimitedform,optionallyzipped.Ifasampleisnotspecified,thenthe“AllData”sampleisreturned.Notethatthespecifieddatasetmustbereleasedforyoutogetitstransactions.
See“InteractingwithCachedData”notebelow.
8.3.1 RequestParameterszip
trueorfalse.Defaultisfalse.Iftrue,transactiondataiszipped.
cols
Optionallistofcolumnnames,comma-delimited.Defaultistoincludeallcolumns.SeeTable2-Transactioncolumnsbelowforthelistofcolumnvaluestochoosefrom.Tospecifywhetherornottoincludecustom-fieldcolumns,usethecfsparameter.
22
cfs
all,none,oracomma-delimitedlistofcustomfieldIDs.Defaultisnone.Optionallyspecifywhethertoincludeallcustomfields,nocustomfields,orasubsetofcustomfields.Acustomfieldisauser-createdcolumnofdataassociatedwithtransactions.Seesection10ofthisAPIforadescriptionofhowtocreateandmodifycustomfields,aswellashowtoretrieveadescriptionofcustomfieldsforadataset.
headers
trueorfalse.Defaultistrue.Optionallyspecifywhetheraheaderrowshouldbeincludedintheoutput.Iffalse,aheaderrowisomitted.
limit
Maximumnumberoftransactionstoretrieve.Defaultis100,maximumis5,000.
offset
Fromthebeginningofthedata,thenumberoftransactionrowstoskip.Defaultis0.Forexample,anoffsetof0wouldreturnrowsstartingwiththe1strow,whileanoffsetof100wouldreturnrowsstartingwiththe101strow.Loopthroughtransactionsinbatchesbycombiningoffsetandlimit.Forexample,togetrowsinbatchesof100,requestoffset=0&limit=100inthefirstiterationoftheloop,whichwillreturnrows1-100.Theninthenextiterationoftheloop,requestoffset=100&limit=100,whichwillreturnrows101-200.
8.3.2 Examplerequest(tab-delimitedformat,subsetofcolumns):GEThttps://pslcdatashop.web.cmu.edu/services/datasets/114/samples/21/transactions?cols=row,anon_
student_id,session_id,time,duration,student_response_type,tutor_response_type,problem_name,ste
p_name,attempt_at_step,outcome,selection,input,feedback,kcs
8.3.3 Exampleresponse:SeeTable4-Exampletab-delimitedtransactiondata.
8.3.4 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-7"
result_message="Error.Invalidcolumn:feedbacks."/>
InteractingwithCachedData
DataShopmaintainsacachedexportfileforeachsample,whichisusedtoprovidedatawhenyourequestit.Duetochangesmadeinthewebapplicationormoredatabeinglogged,thecachedfilecanfallout-of-datewithwhatisavailableintheDataShopdatabase.Whenthishappens,arequestforthesamplewillreturnanerrorstatingthatthecachedfileisnotyetavailable.DataShopwillthenstartcachingthesample(ifithasn’talready).Youshouldtryyourrequestagainaftersometimehaspassed.Theamountoftimeneededforcachingvariesbetweenafewminutesandafewhours,dependingonthesizeofthesample.
23
Table2-Transactioncolumns
Columnnameinrequest Column(s)containedinresponse Datatype Notesonvalue
row Row numeric tx_id TransactionId string anon_student_id AnonStudentId string session_id SessionId string time Time date yyyy-MM-dd
HH:mm:sstime_zone TimeZone string Possiblyemptyduration Duration(sec) numeric Nullvaluesare
representedwithadot(“.”)
student_response_type StudentResponseType string Possiblyemptystudent_response_subtype StudentResponseSubtype string Possiblyemptytutor_response_type TutorResponseType string Possiblyemptytutor_response_subtype TutorResponseSubtype string Possiblyemptyproblem_hierarchy ProblemHierarchy string problem_name ProblemName string problem_view ProblemView numeric problem_start_time ProblemStartTime date yyyy-MM-dd
HH:mm:ssstep_name StepName string Possiblyemptyattempt_at_step AttemptAtStep numeric Possiblyemptyifstep
namenotprovidedindata.
outcome Outcome string Possiblyemptyselection Selection string action Action string input Input string feedback FeedbackText,FeedbackClassification string,string Bothpossiblyemptyhelp_level HelpLevel string Possiblyemptytotal_num_hints Total#Hints numeric Possiblyemptycondition ConditionName,ConditionType
Thesetwocolumnswillappearforeachconditionthatappliestothestudent(theremaybemorethanone).
string,string Possiblyempty
kcs KC(KCModelName),KCCategory(KCModelName)IncludesallKCsforallmodels.OnecolumnperKCpermodel.MultiplecolumnsperKCmodelinthecasewheremorethanoneKCisassociatedwiththetransaction.
string Possiblyempty
school School string Possiblyemptyclass Class string Possiblyempty
Note:Formoredocumentationonthesecolumnsandthesemanticsoftheformat,seetheImportFileVerificationTooldocumentationandExportByTransactionasdocumentedintheDataShopwebapplication.
24
Table3–Customfieldcolumnsincludedwhenthe“cfs”parameteris‘all’oralistofcustomfieldIDs
Columnname Description Datatype Notesonvalue
CF(CustomFieldName) Asinglecolumnpercustomfieldrequested.
variable
Table4-Exampletab-delimitedtransactiondata
Row AnonStudentId SessionId Time Duration(sec) StudentResponseType TutorResponseType ProblemName StepName
1 D8DD5 D8DD5-Jan07-15-12-09
2008-01-0715:12:18.0
ATTEMPT RESULT CHARGE1A (CHOOSE-ANSWERMC-11)
2 D8DD5 D8DD5-Jan07-15-12-09
2008-01-0715:12:45.0
27 ATTEMPT RESULT CHARGE1A (CHOOSE-ANSWERMC-22)
AttemptAtStep
Outcome Selection Input FeedbackText
FeedbackClassification
KC(Default) KCCategory(Default)
KC(Unique-step)
KCCategory(Unique-step)
1 CORRECT MC-1 1 SELECT-MC-ANSWER
KC1797
1 CORRECT MC-2 2 SELECT-MC-ANSWER
KC1241
26
8.4 GetStudent-StepRecords
http://pslcdatashop.web.cmu.edu/services/datasets/[id]/[?samples/id]/stepsReturnszeroormorestudent-steprecordsintab-delimitedformat,optionallyzipped.Ifasampleisnotspecifiedthenthe“AllData”sampleisreturned.Notethatthespecifieddatasetmustbereleasedforyoutogetitsstudent-steprecords.
See“InteractingwithCachedData”noteabove.
8.4.1 RequestParameterszip
trueorfalse.Defaultisfalse.Iftrue,thedataiszipped.
cols
Optionallistofcolumnnames,comma-delimited.Defaultistoincludeallcolumns.SeeTable5–Student-stepcolumnsbelowforthelistofcolumnvalues.
cfs[comingsoon]
all,none,[ids].Defaultisall.Optionallyspecifywhethertoincludeall,none,orsomecustomfields.Ifall,includeallcustomfields.Ifnone,nocustomfieldsareincluded.Ifacomma-delimitedlistofids,thenthespecifiedcustomfieldsareincluded,e.g.cfs=123,456.
kcms
allornone.Defaultisall.OptionallyspecifywhethertoincludeallKCmodelsornone.Ifall,includeallKCmodels.Ifnone,noKCmodelsareincluded.SeeTable7belowforlistofcolumnsincludedwitheachKCmodel.(AfuturereleaseofwebserviceswillsupportrequestingasubsetofKCmodelsbyspecifyingacomma-delimitedlistofKCmodelIDs).
headers
trueorfalse.Defaultistrue.Specifywhetheraheaderrowshouldbeincludedintheoutput.Iffalse,aheaderrowisomitted.
limit
Maximumnumberofstudent-steprowstoretrieve.Defaultis100,maximumis5,000.
offset
Fromthebeginningofthedata,thenumberofstudent-steprowstoskip.Defaultis0.Forexample,anoffsetof0wouldreturnrowsstartingwiththe1strow,whileanoffsetof100wouldreturnrowsstartingwiththe101strow.Loopthroughrowsinbatchesbycombiningoffsetandlimit.Forexample,togetrowsinbatchesof100,requestoffset=0&limit=100inthefirstiterationoftheloop,whichwillreturnrows1-100.Theninthenextiterationoftheloop,requestoffset=100&limit=100,whichwillreturnrows101-200.
27
8.4.2 Examplerequest(subsetofcolumns):GEThttps://pslcdatashop.web.cmu.edu/services/datasets/114/samples/21/steps?cols=row,anon_student
_id,condition,problem_hierarchy,problem_name,step_name,step_duration,first_attempt&kcms=all
8.4.3 Exampleresponse:SeeTable7-Exampletab-delimitedstepdata.
8.4.4 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?>
<pslc_datashop_message
result_code="-7"
result_message="Error.Invalidcolumn:time_zones."/>
28
Table5–Student-stepcolumns
Columnnameinrequest Column(s)containedinresponse Datatype Notesonvalue
row Row numeric anon_student_id AnonStudentId string problem_hierarchy ProblemHierarchy
Singlecolumn(differentthanGetTransactions).
string
problem_name ProblemName string problem_view ProblemView numeric step_name StepName string step_start_time StepStartTime date yyyy-MM-dd
HH:mm:ssfirst_transaction_time FirstTransactionTime date “correct_transaction_time CorrectTransactionTime date “step_end_time StepEndTime date “step_duration StepDuration(sec) numeric Nullvaluesare
representedwithadot(“.”)
correct_step_duration CorrectStepDuration(sec) numeric Nullvaluesarerepresentedwithadot(“.”)
error_step_duration ErrorStepDuration(sec) numeric Nullvaluesarerepresentedwithadot(“.”)
first_attempt FirstAttempt string Possiblyemptyincorrects Incorrects numeric Possiblyemptyhints Hints numeric Possiblyemptycorrects Corrects numeric Possiblyemptycondition Condition
Inthecaseofastudentassignedtomultipleconditions(factorsinafactorialdesign),conditionnamesareseparatedbyacommaandspace.ThisdiffersfromtheformatinGetTransactions.
string
Note:Formoredocumentationonthesecolumnsandthesemanticsoftheformat,seeStudent-StepRollupasdocumentedintheDataShopwebapplication..
29
Table6–KCmodelcolumnsincludedwhenrequestedusingthe“kcms”parameter
Columnname Description Datatype Notesonvalue
KC(KCModelName) InthecaseofmultipleKCsassignedtoasinglestep,KCnamesareseparatedbytwotildes(“~~”).
string Possiblyempty
Opportunity(KCModelName)
OpportunitynumberforthelistedKC(s).InthecaseofmultipleKCsassignedtoasinglestep,opportunitynumbervaluesareseparatedbytwotildes(“~~”)andaregiveninthesameorderastheKCnames.
numeric Possiblyempty
PredictedErrorRate(KCModelName)
PredictederrorrateforthelistedKC(s).InthecaseofmultipleKCsassignedtoasinglestep,predictederrorratevaluesareseparatedbytwotildes(“~~”)andaregiveninthesameorderastheKCnames.
numeric Possiblyempty
Note:ForeachKCmodel,thethreecolumnslistedintheabovetablewillappearintheoutput.
Important:TheformatoftheKCmodelcolumnsreturnedbyGetStudent-StepRecordsisdifferentfromtheGetTransactionswebservice.IntheGetTransactionswebservice,multipleKCsassociatedwithatransactionresultinmultiplecolumns(onecolumnperKC).IntheGetStudent-StepRecordswebservice,multipleKCsarecontainedinasinglevalueanddelimitedwithtwotildes(“~~”).ThesameruleisappliedtotheOpportunityandPredictedErrorRatecolumns.
30
Table7-Exampletab-delimitedstepdata
Row AnonStudentId Condition ProblemHierarchy ProblemName StepName StepDuration(sec)
FirstAttempt
1 D8DD5 a Unit1,Section2 CHARGE1A (CHOOSE-
ANSWERMC-1
1)
5 correct
2 D8DD5 a Unit1,Section2 CHARGE1A (CHOOSE-
ANSWERMC-2
2)
27 correct
KC(Default) Opportunity(Default)
PredictedErrorRate(Default)
KC(Unique-step) Opportunity(Unique-step)
PredictedErrorRate(Unique-step)
SELECT-MC-
ANSWER~~APPLY-
THEOREM
4~~3 0.553~~0.754 KC1797 2 0.876
SELECT-MC-
ANSWER~~APPLY-
THEOREM
5~~4 0.451~~0.750 KC1241 3 0.639
9 ExternalAnalysesDataShopsupportsaddinganddeletingexternalanalysesviawebservicesorthewebapplication.Anexternalanalysisisafileattachedtoadatasetthatdescribestheresultofananalysisonthatdata.Inadditiontothefileitself,whichcanbeofanytype,theanalysisalsohasarequiredtitleandoptionalfieldsforadescription,statisticalmodelused,andrelevantKCmodel.
9.1 AccessandownershipADataShopusermayaddanexternalanalysistoadatasetinaprojectthattheyhave“edit”or“admin”accessto.Thevariousaccesstypesaredescribedinsection8.1.2.
Toviewalistofexternalanalysesortoretrievethecontentofasingleanalysis,theusermusthave“view”,“edit”,or“admin”access.
Anexternalanalysishasanowner,theuserwhocreatedit.OnlytheownerofanexternalanalysisoraDataShopadministratorcandeletetheexternalanalysis(ormodifyitinthewebapplication).Todeleteanexternalanalysis,theusermustbeboththeownerofthatanalysisandhave“edit”access.
9.2 AddExternalAnalysis
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/analyses/addAddanddescribeanewexternalanalysis.AnIDisassignedbyDataShopafterasuccessfuladd,andisreturnedintheresponseXML.ThisIDcanbeusedinotheroperationsthatreferenceit.Thisserviceexpectstextcontentonly;binaryfilescanbeaddedthroughthewebapplication.Forthepurposesofdisplayinginthewebapplication,DataShopwillgenerateafilenameforthetextcontentaddedthroughthisservice.
9.2.1 RequestPOSTParametersThebodyoftherequestRequired.Theanalysistexttobestored.Sincetheentirebodyoftherequestwillbetreatedastheanalysis,anyparametersmustbepassedaspartoftherequestURL.
titleRequired.Namefortheanalysis.Mustbenomorethan255characters.
descriptionDescriptionoftheanalysis.Mustbenomorethan500characters.
kc_modelValidIDofaKCmodelforthisdataset.KCmodelIDscanbeobtainedfromaverboserequestfordatasetmetadata.
statistical_modelStatisticalmodelusedinthegenerationofthisanalysis.Mustbenomorethan100characters.
32
9.2.2 Examplerequest:PUThttps://pslcdatashop.web.cmu.edu/services/datasets/123/analyses/add?title=Bayesian%20Knowledge%20Tracing%20model%20with%20cross-validation&kc_model=7
9.2.3 ExamplerequestusingsampleDataShopwebservicesclient:C:\DS_webservices_java1.5>java-jardist/datashop-webservices.jar"https://pslcdatashop.web.cmu.edu/services/datasets/76/analyses/add?title=Demo%20Title"filename_of_file
9.2.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success."analysis_id="3"/>
9.2.5 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-8" result_message="Error.Requiredfield(s)missing:title."/>
33
9.3 GetExternalAnalysesMetadata
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/analysesGetalistingofexternalanalyseswithmetadataforthespecifieddataset.
9.3.1 RequestParametersNone.
9.3.2 Examplerequesttogetallexternalanalyses:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/388/analyses
9.3.3 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_messageresult_code="0"result_message="Success."> <analysis id="1"> <title>Rasch(1plIRT)modelwithcross-validation</title> <description></description> <kc_model_name>Area</kc_model_name> <statistical_model>Rasch</statistical_model><file_name>ds76__Rasch.txt</file_name><owner>[email protected]</owner><added>2012-06-06</added> </analysis></pslc_datashop_message>
9.3.4 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-1" result_message="Error.DatasetID45isnotvalid."/>
9.4 GetExternalAnalysis
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/analyses/[id]Getanexternalanalysis,identifiedbyitsID.Returnsthecontentsofthefile.
9.4.1 ParametersNone.
9.4.2 Examplerequesttogetanexternalanalysis:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/42/analyses/3
9.4.3 Exampleresponse: DATASETID: 76 DATE: 2012-06-04 10:42:46 KC MODEL: ANY
34
MODEL: Rasch MODEL SETUP: lme4, all defaults COMPUTED BY: R Data points: 5388 loglikelihood: -2750.70090 AIC: 5507.40180 BIC: 5527.17759 RMSE: 0.39183 A': 0.77800 10-FOLD CROSS-VALIDATED RMSE USER-STRATIFIED: 0.41557 10-FOLD CROSS-VALIDATED RMSE STEP-STRATIFIED: 0.43114 10-FOLD CROSS-VALIDATED RMSE UN-STRATIFIED: 0.40701 10-FOLD CROSS-VALIDATED A' USER-STRATIFIED: 0.68308 10-FOLD CROSS-VALIDATED A' STEP-STRATIFIED: 0.58122 10-FOLD CROSS-VALIDATED A' UN-STRATIFIED: 0.72249 ...
9.4.4 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-9" result_message="Error.Externalanalysis3isnotvalidfordataset42."/>
9.5 DeleteExternalAnalysis
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/analyses/[id]/deleteRemoveanexternalanalysis.Youmusthave“edit”or“admin”accesstothedatasetandbetheowneroftheexternalanalysis.
Norequestparameters.Norequesttextcontent;URLservesasthespacefortheparameters.
9.5.1 Examplerequesttodeleteanexternalanalysis:DELETEhttps://pslcdatashop.web.cmu.edu/services/datasets/42/analyses/3/delete
9.5.2 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success.Externalanalysis3successfullydeleted."/>
9.5.3 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-12" result_message="Error.Insufficientprivilegestodeleteexternalanalysis3.Youarenottheowner.”/>
35
10 CustomFieldsDataShopsupportsaddingandmodifyingcustomfieldsatthetransactionlevel.Thissectiondescribescustomfieldsandhowyoucanusethem,andincludestheAPIforcreating,retrieving,andmodifyingcustomfieldsthroughwebservices.
Acustomfieldisanewcolumnyoudefineforannotatingtransactiondata.Althoughthefeatureisnewtowebservices,somedatasetsinDataShopalreadyhavecustomfields.Thisisbecausesometutorshavebeeninstrumentedtorecordcustomfieldswhilelogging.Atloggingtime,customfieldscanbeassociatedwithacontext,tool,ortutormessage.
Someexamplesincludeafieldthatcapturesthetimeofeachtutorresponsetothemillisecond;afieldnotingtheagentthattooktheactioninamulti-agentsystem;andafieldrecordingacategorizationoftheproblemthestudentisworkingon.
10.1 AccessandownershipAcustomfieldhasanowner,theuserwhocreatedit.Userswhohaveeditoradminpermissionforaprojectcancreatecustomfieldsforadatasetinit.Onlytheowner,projectadministrator,oraDataShopadministratorcandelete,modifythemetadata,orsetthevaluesforthecustomfield.OnlyDataShopadministratorscandeletecustomfieldsthatwereloggedwiththedata.
10.2 DataTypesAcustomfieldcanbeofoneofthefollowingdatatypes:
Datatype Notesonvaluenumber Mustbeanintegerorfloat.Anintegeris
anumberwithoutadecimalplace,whileafloatisafloatingpointnumber,whichmeansithasadecimalplace.
string Mustbenomorethan65,000characters.date Mustbeformattedas
yyyy-MM-ddHH:mm:ss
10.3 AddCustomField
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/customfields/addAddanddescribeanewcustomfield.AnIDisassignedbyDataShopafterasuccessfuladd,andisreturnedintheresponseXML.ThisIDcanbeusedinotheroperationsthatreferenceit.
10.3.1 RequestParametersNone.
10.3.2 RequestPostParameters
Allfieldsexceptdescriptionarerequired.
36
§ name:descriptivenameforthenewcustomfield.Mustbeuniqueacrossallcustomfieldsforthedataset.Mustbenomorethan255characters.
§ description:descriptionforthenewcustomfield.Mustbenomorethan500characters.§ level:thelevelofaggregationthatthecustomfielddescribes.Theonlyacceptedvalueforthe
currentversionofthiswebserviceistransaction.Futureversionsmaysupportotherlevelssuchassteporstudent.Cannotbemodifiedlater.
10.3.3 ExamplerequestusingsampleDataShopwebservicesclient:C:\DS_webservices_java1.5>java-jardist/datashop-webservices.jar"https://pslcdatashop.web.cmu.edu/services/datasets/123/customfields/add"filename_of_file
10.3.4 Examplerequest:POSThttps://pslcdatashop.web.cmu.edu/services/datasets/123/customfields/add
<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message> <custom_field> <name>pBoredom</name> <description>Probabilitythestudentisboredatthistransaction, calculatedusingRyanBaker’sboredomdetector.</description> <level>transaction</level> </custom_field></pslc_datashop_message>
10.3.5 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success."custom_field_id="211"/>
10.3.6 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-8" result_message="Error. Required field(s) missing: Name." />SeeLearningCurve
DataShopsupportslearningcurvecategorizationofKnowledgeComponents(KCs)aswellasretrievalofthelearningcurvedatapointsthemselves.Thissectiondescribesthecategorizationsandhowtheyandthedatapointscanberetrievedthroughwebservices.
IntheDataShopwebapplicationlearningcurvesforadatasetandskillmodelareplacedinoneoffourcategories:TooLittleData,LowandFlat,NoLearningandStillHigh.Learningcurvesthatdonotfallintoanyoftheabove"bad"or"atrisk"categoriesarelabeled“Good”astheyappeartoindicatesubstantialstudentlearning.
37
ThealgorithmforcategorizingKCsfirstdiscardspointsineachcurvebasedonthestudentthreshold.Ifapointhasfewerthanthatnumberofstudents,itisignored.Withinthepointsofcurveremaining:
• Ifthenumberofpointsisbelowtheopportunitythreshold,thenthatcurvehastoolittledata.• Ifallpointsofthecurvearebeneaththelowerrorthreshold,thenthecurveislowandflat.• Iftheslopeofthepredictedlearningcurve(asdeterminedbytheAFMalgorithm)isbelowthe
AFMslopethreshold,thenthecurveshowsnolearning.• Ifthelastpointofthecurveisabovethehigherrorthreshold,thenthecurveisstillhigh.
Aswiththewebapplication,theusermustspecifythedatasetingeneratingthewebserviceslearningcurveclassificationreport.Theusercanoptionallyspecifyaskillmodel;thedefaultbehaviorwillincludeallskillmodelsforthedatasetinthereport.Theabovethresholdshavedefaultvaluesortheusermayspecifythemandoverridethedefaultvalue.Theoutputisinplaintext,tab-delimitedformat.Inadditiontothelearningcurvecategory,thereportalsoincludestheKCintercept,KCslope,uniquestepcountandstepinstancecount.
10.4 AccessAnyuserwhohasviewrighttoadatasetcanusethiswebservice.
10.5 GetLearningCurve
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurves/classify[?kc_model=modelName]Getalistingoflearningcurvecategoriesforallskillsforthespecifieddatasetandskillmodel.
10.5.1 RequestParameterskc_modelNotrequired.DefaultallKCMsforthedataset.Casesensitive.
opportunity_thresholdNotrequired.Default3.Anygraphpointthathaslowerthanthisopportunitycountiseliminated.
student_thresholdNotrequired.Default10.Anygraphpointthathaslowerthanthisstudentcountiseliminated.
low_error_thresholdNotrequired.Default20.Anygraphpointthathaslowerthanthiserrorrateiseliminated.
high_error_thresholdNotrequired.Default40.Anygraphpointthathashigherthanthiserrorrateiseliminated.
AFM_slope_thresholdNotrequired.Default0.001.Anygraphpointthathaslowerthanthisslopeiseliminated.
38
10.5.2 Examplerequestwithdefault:
GEThttps://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurve/classify[?kc_model=Area]
10.5.3 Examplerequestwithspecifiedparameter:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurve/classify[?kc_model=Area&opportunity_threshold=1&student_threshold=2]
10.5.4 Exampleresponseonsuccess:
Dataset: Geometry Area (1996-97)AFM slope threshold: 0.001 Student threshold: 10 Opportunity threshold: 3 Low error threshold: 20.0 High error threshold: 40.0 KC Model KC Name Category KC Intercept KC Slope # unique steps #opportunity 1 step instances # step instances Area Area formula No learning 0.9598860130611057 0.0 11 50 1784 Area Non-area formula Good 0.9359422484296835 0.0018665230448641058 22 59 3083 Geometry Geometry No learning 0.9690713757580114 2.226319206785172E-4 22 59 4843 Summary KC Model %Good %No learning %Low and flat %Still high %Too little data # observation AIC Item CV Area 50 50 0 0 0 5104 5642,15 Geometry 0 100 0 0 0 5104 0.408165
10.5.5 Exampleresponseonerror:<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_messageresult_code="-1"result_message="Error.Dataset9isnotvalid."/>
<?xml version="1.0" encoding="UTF-8"?> <pslc_datashop_message result_code="-18" result_message="Error. Skill model area is notvalid."/>
10.6 GetLearningCurvePoints
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurves/points?kc_model=modelName&skill=skillNameGetthelearningcurvedatapointsforthespecifiedskillmodelandskill.Theoutput,inXMLformat,givestheopportunitynumber(x-coordinate)aswellasthenecessarydatatoplotanyof:errorrate,assistancescore,predictederrorrate,average#ofincorrects,average#ofhints,stepduration,andcorrectstepduration.Foreachpoint,thenumberofobservations,stepdurationobservations,correct
39
stepdurationobservations,errorstepdurationobservations,studentcount,problemcountandskillcountarealsogiven.
Ifthespecifieddatasethasa‘highStakes’customfielddefined(thisistrueforOLIdatasets)thentheoutputwillalsoincludethehigh_stakes_error_ratevalue.TheDataShopwebapplicationplotsthispointattheendoftheerror_ratecurve,e.g.,atthemaxopportunitynumber.
10.6.1 RequestParameterskc_modelRequired.Thenameofskillmodelofinterest.Casesensitive.
skillRequired.Thenameoftheskillofinterest.Casesensitive.
10.6.2 Examplerequestwithspecifiedparameters:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/76/learningcurve/points?kc_model=Textbook&skill=circle-area
10.6.3 Example(partial)responseonsuccess:<?xml version="1.0" encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success."> <learning_curve_point> <error_rates>0.0</error_rates> <assistance_score>0.0</assistance_score> <predicted_error_rate>31.297</predicted_error_rate> <avg_incorrects>0.0</avg_incorrects> <avg_hints>0.0</avg_hints> <step_duration>59.675</step_duration> <correct_step_duration>59.675</correct_step_duration> <opportunity_number>1</opportunity_number> <observations>133</observations> <step_duration_observations>117</step_duration_observations> <correct_step_duration_observations>117</correct_step_duration_observations> <error_step_duration_observations>0</error_step_duration_observations> <students_count>133</students_count> <problems_count>3</problems_count> <skills_count>1</skills_count> <steps_count>4</steps_count> </learning_curve_point> … <high_stakes_error_rate>15.108</high_stakes_error_rate> </learning_curve_point> </pslc_datashop_message>
10.6.4 Exampleresponseonerror:<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_messageresult_code="-1"result_message="Error.Dataset9isnotvalid."/>
40
<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_message result_code="-18" result_message="Error. Skill model area is notvalid."/>
41
11 KCMImportDataShopsupportsaddingKCmodelstoadatasetviawebservice.ThisprocessiscalledKCMimport.ThissectiondescribestherequiredparametersanddataforKCMimport,theacceptableformatforimportdataandtheexpectedresultsafterKCMimport.
DatashopwebinterfaceallowsuserstoimportaKCMtoadataset.KCMimportmakesthesamefunctionalityavailableasawebservice.Similartothewebapplication,KCMimportrequiresadatasetIDandadatafilethatcontainsthemappingsofstepstoskills.StepsarerepresentedasstepIDandtheyshouldbeassociatedwiththespecifieddataset.AfterthenewKCMandthenewskillsandmappingsoftheskillstostepsaresavedtothedatabase,aggregationforthisKCMandstatisticalparameters(LL,AIC,BIC,CV,etc.)willbecomputedandsaved.
11.1 AccessUserwhohaseditingrighttoadatasetcanusethiswebservicetoimportaKCMtothedataset.
11.2 ImportKCM
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/importkcm/ImportaKCMtothedatasetspecified
11.2.1 RequestParametersfile:required,thefilethatstoresmappingsofstepIDsandskills
11.2.2 ExamplerequestusingDataShopwebservicesclient:C:\DS_webservices_java1.5>java-jardist/datashop-webservices.jar"https://pslcdatashop.web.cmu.edu/services/datasets/123/importkcm/"filename_of_file
11.2.3 Examplefortab-delimiteddatafile:POSThttps://pslcdatashop.web.cmu.edu/services/datasets/123/importkcm/
StepID KC(New_KCM) KC(AnotherNew_KCM)617b8c4a416f7eb515d56bf7fa7eab80 skill1 skill40b062c22b215ab6e6d80e09ea09880b5skill2 skill4ebdf2271d8f64bebb4c9f0cda65ccab0 skill1 skill53a9a903dbb2845762e7735147a08ea05skill1 skill5b0b071e0a6dee842078d8ac31babfd71 skill2 skill60cdd9ea7c8bbe389199a76fbed089a36 skill3 skill7
11.2.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success. KCM(s): New KCM, Another New KCM saved successfully.ModelvaluesarenowbeingcomputedforthenewKCM(s)."/>
42
Note:AfterthenewKCM(s)is(are)savedsuccessfully,Datashopwillstartaprocessto reaggregate the dataset and compute AFM and Cross Validation for the newKCM(s).Theamountoftimeneededforthisprocessvariesdependingonthesizeofthedataset.TheusercanusetheDatashopwebapplicationorDatashopwebservice(DatasetMetadataservice)tocheckthefinalresultsatalatertime.
11.2.5 Exampleresponseonerror:Whendatasetidisnotfound:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-1" result_message="Error.Dataset[id]isnotvalid."/>When user doesn’t have editing right to the dataset:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-2" result_message="Error.Dataset[id]isnotaccessible."/>When input file format is not valid, such as file header doesn’t have column “Step ID”:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error. Bad file format. The step identifier column "Step ID" was notfound."/>When input file format is not valid, such as no KCM found in headers:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.NoKCMfoundtoimport."/>When input file format is not valid, such as KCM name has invalid characters:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.Invalidcharacter(s)foundinmodelname."/> Note:Validcharacters forKCmodelnames includespace,dash,underscore, lettersandnumbers.When input file format is not valid, such as KCM name is too long (max is 50 characters)<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.Modelnameis…,andit’stoolong:55."/>When input file format is not valid, such as KCM already exists in Datashop<?xmlversion="1.0"encoding="UTF-8"?>
43
<pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.Modelnameis…,anditexistsalready."/>When input file format is not valid, such as duplicate KCM names found in import file<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.DuplicateKCMnamesfoundinimportfile."/>WheninputfilecontainsinvalidstepID,i.e.stepIDdoesn’texistforthespecifieddatasetID:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-20" result_message="Error.InvalidstepIDfound:….."/>When a KCM import already running for this dataset<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-22" result_message="KCM import already running (since 2015-04-06 8:31:43). Please tryimportingyourmodelagainafterithascompleted."/>
45
11.3 GetCustomFieldMetadata
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/customfields/[?id]Getalistingofcustomfieldswithmetadataforthespecifieddataset,oraboutjustasinglecustomfield.
11.3.1 RequestParametersminetrueorfalse.Defaultisfalse.Iftrue,onlyretrievemetadataforcustomfieldsyouown.
11.3.2 Examplerequesttogetallcustomfields:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/388/customfields
11.3.3 Examplerequesttogetasinglecustomfield:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/388/customfields/45
11.3.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_messageresult_code="0"result_message="Success."> <custom_field id="45"> <name>pBoredom</name> <description>Probability the student is bored at this transaction, calculatedusingRyanBaker’sboredomdetector.</description> <type>number</type> <level>transaction</level> <owner>username</owner> <added>2013-04-22</added> </custom_field></pslc_datashop_message>
11.3.5 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-11" result_message="Error.Customfield45notfound."/>
11.4 SetCustomField
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/customfields/[id]/setAnnotatetransactiondatawithcustomfields.ThecustomfieldmustfirstbecreatedusingtheAddCustomFieldmethod.Supportsannotationforasinglecustomfieldacrosstransactions,sotoannotateatransactionwithmultiplecustomfields,usemultiplerequests.Thiscanonlybedonebythecustom-fieldowner,projectadministrator,oraDataShopadministratoronuser-createdcustomfields.
11.4.1 RequestParametersNone.
46
11.4.2 Examplerequest(tab-delimited):TransactionId value69902b300b768a522d19da399622a2ff 0.323
53dc58f4cdad5cee279ed6b13d664d69 HINT_MSG
afc5e2f613482506c0dcf2d38627e4f3 2014-11-0818:56:55
11.4.3 ExamplerequestusingsampleDataShopwebservicesclient:C:\DS_webservices_java1.5>java-jardist/datashop-webservices.jar"https://pslcdatashop.web.cmu.edu/services/datasets/123/customfields/211/set"filename_of_file
11.4.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success.Annotated2transactions."/>
11.4.5 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-10" result_message="Error.Invaliddata."/>
11.5 DeleteCustomField
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/customfields/[id]/deleteRemoveacustomfieldentirely,themetadataandallthevaluesassociatedwithtransactions.Thiscanonlybedonebythecustom-fieldowner,projectadministrator(user-createdcustomfields),oraDataShopadministrator.
Norequestparameters.Norequesttextcontent;URLservesasthespacefortheparameters.
11.5.1 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success.Customfieldsuccessfullyremovedfrom1,231transactions."/>
11.5.2 Exampleresponseonerror:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-11" result_message="Error.Customfield2notfound."/>
47
12 LearningCurveDataShopsupportslearningcurvecategorizationofKnowledgeComponents(KCs)aswellasretrievalofthelearningcurvedatapointsthemselves.Thissectiondescribesthecategorizationsandhowtheyandthedatapointscanberetrievedthroughwebservices.
IntheDataShopwebapplicationlearningcurvesforadatasetandskillmodelareplacedinoneoffourcategories:TooLittleData,LowandFlat,NoLearningandStillHigh.Learningcurvesthatdonotfallintoanyoftheabove"bad"or"atrisk"categoriesarelabeled“Good”astheyappeartoindicatesubstantialstudentlearning.
ThealgorithmforcategorizingKCsfirstdiscardspointsineachcurvebasedonthestudentthreshold.Ifapointhasfewerthanthatnumberofstudents,itisignored.Withinthepointsofcurveremaining:
• Ifthenumberofpointsisbelowtheopportunitythreshold,thenthatcurvehastoolittledata.• Ifallpointsofthecurvearebeneaththelowerrorthreshold,thenthecurveislowandflat.• Iftheslopeofthepredictedlearningcurve(asdeterminedbytheAFMalgorithm)isbelowthe
AFMslopethreshold,thenthecurveshowsnolearning.• Ifthelastpointofthecurveisabovethehigherrorthreshold,thenthecurveisstillhigh.
Aswiththewebapplication,theusermustspecifythedatasetingeneratingthewebserviceslearningcurveclassificationreport.Theusercanoptionallyspecifyaskillmodel;thedefaultbehaviorwillincludeallskillmodelsforthedatasetinthereport.Theabovethresholdshavedefaultvaluesortheusermayspecifythemandoverridethedefaultvalue.Theoutputisinplaintext,tab-delimitedformat.Inadditiontothelearningcurvecategory,thereportalsoincludestheKCintercept,KCslope,uniquestepcountandstepinstancecount.
12.1 AccessAnyuserwhohasviewrighttoadatasetcanusethiswebservice.
12.2 GetLearningCurve
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurves/classify[?kc_model=modelName]Getalistingoflearningcurvecategoriesforallskillsforthespecifieddatasetandskillmodel.
12.2.1 RequestParameterskc_modelNotrequired.DefaultallKCMsforthedataset.Casesensitive.
opportunity_thresholdNotrequired.Default3.Anygraphpointthathaslowerthanthisopportunitycountiseliminated.
student_thresholdNotrequired.Default10.Anygraphpointthathaslowerthanthisstudentcountiseliminated.
48
low_error_thresholdNotrequired.Default20.Anygraphpointthathaslowerthanthiserrorrateiseliminated.
high_error_thresholdNotrequired.Default40.Anygraphpointthathashigherthanthiserrorrateiseliminated.
AFM_slope_thresholdNotrequired.Default0.001.Anygraphpointthathaslowerthanthisslopeiseliminated.
12.2.2 Examplerequestwithdefault:
GEThttps://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurve/classify[?kc_model=Area]
12.2.3 Examplerequestwithspecifiedparameter:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurve/classify[?kc_model=Area&opportunity_threshold=1&student_threshold=2]
12.2.4 Exampleresponseonsuccess:
Dataset: Geometry Area (1996-97)AFM slope threshold: 0.001 Student threshold: 10 Opportunity threshold: 3 Low error threshold: 20.0 High error threshold: 40.0 KC Model KC Name Category KC Intercept KC Slope # unique steps #opportunity 1 step instances # step instances Area Area formula No learning 0.9598860130611057 0.0 11 50 1784 Area Non-area formula Good 0.9359422484296835 0.0018665230448641058 22 59 3083 Geometry Geometry No learning 0.9690713757580114 2.226319206785172E-4 22 59 4843 Summary KC Model %Good %No learning %Low and flat %Still high %Too little data # observation AIC Item CV Area 50 50 0 0 0 5104 5642,15 Geometry 0 100 0 0 0 5104 0.408165
12.2.5 Exampleresponseonerror:<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_messageresult_code="-1"result_message="Error.Dataset9isnotvalid."/>
<?xml version="1.0" encoding="UTF-8"?> <pslc_datashop_message result_code="-18" result_message="Error. Skill model area is notvalid."/>
49
12.3 GetLearningCurvePoints
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/learningcurves/points?kc_model=modelName&skill=skillNameGetthelearningcurvedatapointsforthespecifiedskillmodelandskill.Theoutput,inXMLformat,givestheopportunitynumber(x-coordinate)aswellasthenecessarydatatoplotanyof:errorrate,assistancescore,predictederrorrate,average#ofincorrects,average#ofhints,stepduration,andcorrectstepduration.Foreachpoint,thenumberofobservations,stepdurationobservations,correctstepdurationobservations,errorstepdurationobservations,studentcount,problemcountandskillcountarealsogiven.
Ifthespecifieddatasethasa‘highStakes’customfielddefined(thisistrueforOLIdatasets)thentheoutputwillalsoincludethehigh_stakes_error_ratevalue.TheDataShopwebapplicationplotsthispointattheendoftheerror_ratecurve,e.g.,atthemaxopportunitynumber.
12.3.1 RequestParameterskc_modelRequired.Thenameofskillmodelofinterest.Casesensitive.
skillRequired.Thenameoftheskillofinterest.Casesensitive.
12.3.2 Examplerequestwithspecifiedparameters:GEThttps://pslcdatashop.web.cmu.edu/services/datasets/76/learningcurve/points?kc_model=Textbook&skill=circle-area
12.3.3 Example(partial)responseonsuccess:<?xml version="1.0" encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success."> <learning_curve_point> <error_rates>0.0</error_rates> <assistance_score>0.0</assistance_score> <predicted_error_rate>31.297</predicted_error_rate> <avg_incorrects>0.0</avg_incorrects> <avg_hints>0.0</avg_hints> <step_duration>59.675</step_duration> <correct_step_duration>59.675</correct_step_duration> <opportunity_number>1</opportunity_number> <observations>133</observations> <step_duration_observations>117</step_duration_observations> <correct_step_duration_observations>117</correct_step_duration_observations> <error_step_duration_observations>0</error_step_duration_observations> <students_count>133</students_count> <problems_count>3</problems_count> <skills_count>1</skills_count> <steps_count>4</steps_count>
50
</learning_curve_point> … <high_stakes_error_rate>15.108</high_stakes_error_rate> </learning_curve_point> </pslc_datashop_message>
12.3.4 Exampleresponseonerror:<?xml version="1.0" encoding="UTF-8"?>
<pslc_datashop_messageresult_code="-1"result_message="Error.Dataset9isnotvalid."/>
<?xml version="1.0" encoding="UTF-8"?> <pslc_datashop_message result_code="-18" result_message="Error. Skill model area is notvalid."/>
51
13 KCMImportDataShopsupportsaddingKCmodelstoadatasetviawebservice.ThisprocessiscalledKCMimport.ThissectiondescribestherequiredparametersanddataforKCMimport,theacceptableformatforimportdataandtheexpectedresultsafterKCMimport.
DatashopwebinterfaceallowsuserstoimportaKCMtoadataset.KCMimportmakesthesamefunctionalityavailableasawebservice.Similartothewebapplication,KCMimportrequiresadatasetIDandadatafilethatcontainsthemappingsofstepstoskills.StepsarerepresentedasstepIDandtheyshouldbeassociatedwiththespecifieddataset.AfterthenewKCMandthenewskillsandmappingsoftheskillstostepsaresavedtothedatabase,aggregationforthisKCMandstatisticalparameters(LL,AIC,BIC,CV,etc.)willbecomputedandsaved.
13.1 AccessUserwhohaseditingrighttoadatasetcanusethiswebservicetoimportaKCMtothedataset.
13.2 ImportKCM
https://pslcdatashop.web.cmu.edu/services/datasets/[id]/importkcm/ImportaKCMtothedatasetspecified
13.2.1 RequestParametersfile:required,thefilethatstoresmappingsofstepIDsandskills
13.2.2 ExamplerequestusingDataShopwebservicesclient:C:\DS_webservices_java1.5>java-jardist/datashop-webservices.jar"https://pslcdatashop.web.cmu.edu/services/datasets/123/importkcm/"filename_of_file
13.2.3 Examplefortab-delimiteddatafile:POSThttps://pslcdatashop.web.cmu.edu/services/datasets/123/importkcm/
StepID KC(New_KCM) KC(AnotherNew_KCM)617b8c4a416f7eb515d56bf7fa7eab80 skill1 skill40b062c22b215ab6e6d80e09ea09880b5skill2 skill4ebdf2271d8f64bebb4c9f0cda65ccab0 skill1 skill53a9a903dbb2845762e7735147a08ea05skill1 skill5b0b071e0a6dee842078d8ac31babfd71 skill2 skill60cdd9ea7c8bbe389199a76fbed089a36 skill3 skill7
13.2.4 Exampleresponseonsuccess:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="0" result_message="Success. KCM(s): New KCM, Another New KCM saved successfully.ModelvaluesarenowbeingcomputedforthenewKCM(s)."/>
52
Note:AfterthenewKCM(s)is(are)savedsuccessfully,Datashopwillstartaprocessto reaggregate the dataset and compute AFM and Cross Validation for the newKCM(s).Theamountoftimeneededforthisprocessvariesdependingonthesizeofthedataset.TheusercanusetheDatashopwebapplicationorDatashopwebservice(DatasetMetadataservice)tocheckthefinalresultsatalatertime.
13.2.5 Exampleresponseonerror:Whendatasetidisnotfound:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-1" result_message="Error.Dataset[id]isnotvalid."/>When user doesn’t have editing right to the dataset:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-2" result_message="Error.Dataset[id]isnotaccessible."/>When input file format is not valid, such as file header doesn’t have column “Step ID”:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error. Bad file format. The step identifier column "Step ID" was notfound."/>When input file format is not valid, such as no KCM found in headers:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.NoKCMfoundtoimport."/>When input file format is not valid, such as KCM name has invalid characters:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.Invalidcharacter(s)foundinmodelname."/> Note:Validcharacters forKCmodelnames includespace,dash,underscore, lettersandnumbers.When input file format is not valid, such as KCM name is too long (max is 50 characters)<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.Modelnameis…,andit’stoolong:55."/>When input file format is not valid, such as KCM already exists in Datashop<?xmlversion="1.0"encoding="UTF-8"?>
53
<pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.Modelnameis…,anditexistsalready."/>When input file format is not valid, such as duplicate KCM names found in import file<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-19" result_message="Error.Badfileformat.DuplicateKCMnamesfoundinimportfile."/>WheninputfilecontainsinvalidstepID,i.e.stepIDdoesn’texistforthespecifieddatasetID:<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-20" result_message="Error.InvalidstepIDfound:….."/>When a KCM import already running for this dataset<?xmlversion="1.0"encoding="UTF-8"?><pslc_datashop_message result_code="-22" result_message="KCM import already running (since 2015-04-06 8:31:43). Please tryimportingyourmodelagainafterithascompleted."/>
54
AppendixA
AllPossibleResultCodesResultCode
HTTPStatusCode Description Servicesthatcouldreturnthisresultcode
0 200OK Success.[Optionalmessage] All-1 404NotFound Error.Dataset[id]isnotvalid. All-2 401Unauthorized Error.Dataset[id]isnotaccessible. All-3 404NotFound Error.Sample[id]isnotvalidfordataset
[id].GetSamples,GetTransactions,GetStudent-Steps
-4 401Unauthorized Error.Sample[id]isnotaccessiblefordataset[id].
GetSamples,GetTransactions,GetStudent-Steps
-5 400BadRequest Error.Invalidrequestparameter:[parameter].
All
-6 400BadRequest Error.Invalidvalueforparameter[param]:[value].
All
-7 401Unauthorized Error.Dataset[id]isnotreleased. GetTransactions,GetStudent-Steps
-8 400BadRequest Error.Requiredfield(s)missing:[fields]. AddExternalAnalysis,AddCustomField,GetLearningCurve
-9 404NotFound Error.[Externalanalysis/Customfield][id]isnotvalidfordataset[id].
Get/deleteExternalAnalysis,AllCustomFieldservices
-10 400BadRequest Error.Invaliddata. AddExternalAnalysis,SetCustomField
-11 404NotFound Error.Customfield[id]notfound. DeleteCustomField-12 401Unauthorized Error.Insufficientprivilegesto
[add/delete/set][an/a][externalanalysis/customfield][id].[Youarenottheowner.]
DeleteExternalAnalysis,DeleteCustomField,SetCustomField,AddExternalAnalysis,AddCustomField
-13 409Conflict Error.Customfieldwithname[name]alreadyexistsforthisdataset.
AddCustomField
-14 404NotFound Error.[Transactions/Student-steps]cachefileforsample[N][doesnotexist/isout-of-date].Cachingprocessisstarting.Tryagainlater.
GetTransactions,GetStudent-Steps
-15 400BadRequest Error.Parameter[parameter]mustbenomorethan[N]characters.
AddexternalanalysisGenerateDatasetId
-16 400BadRequest Error.Invalidvalueforelement AddCustomField
55
‘[element]’:[value]-17 400BadRequest InvalidXMLformat. AddCustomField-18 404NotFound Error.Skillmodelname[name]isnot
valid.GetLearningCurve
-19 400BadRequest Error.Badfileformat.Thestepidentifiercolumn"StepID"wasnotfoundOr:NoKCMfoundtoimport.Or:Invalidcharacter(s)foundinmodelname.Or:Modelnameis…,andit'stoolong:…Or:Modelnameis…,anditexistsalready.Or:DuplicateKCMnamesarefoundinimportfile.
KCMimport
-20 400BadRequest Error.InvalidstepID KCMimport-22 503Serviceunavailable Error:KCModelImportalreadyrunning
(since2015-04-068:31:43).Pleasetryimportingyourmodelagainafterithascompleted.
KCMimport
-99 404NotFound Error.NowebservicefoundmatchingtheURL.ForalistofvalidURLs,seehttp://pslcdatashop.org/api/
All
-100 500InternalServerError
Unknownerror. All
-101 401Unauthorized Authorizationfailed.Checkyourcredentials.
All
-102 406NotAcceptable Thiscontentisavailableonlyas[contenttype].
All
-103 405MethodNotAllowed
Operationnotsupported.(Notetoreader:thisisforunsupportedPUT/POST/DELETEmethods.)
All
-104 405MethodNotAllowed
[Method]requestsnotsupported.(Notetoreader:thisisformethodshead,options,etc.)
All
56
AppendixB
RevisionHistory
Revision DateReleasedRevision0.3 October24,2013Addedsection“CustomFields”andupdatedtheresultcodestable.Revision0.23 October11,2012Addedsection“ExternalAnalyses”andupdatedtheresultcodestable.Revision0.22 December17,2010Addednewcross-validationelementsandnumberofparameterstoexampleXMLforGetdatasetmetadata(verbose).Alsochangedelement“lfa_status”to“logistic_regression_model_status”inthesamesection.Revision0.21 June29,2010Added“domain”elementtoGetDatasetMetadataexamplesaswebservicesnowincludea“domain”element(ifit’sset)inadditionto“learnlab”.