本文整理汇总了Python中FileSystem.FileSystem.loadCourseList方法的典型用法代码示例。如果您正苦于以下问题:Python FileSystem.loadCourseList方法的具体用法?Python FileSystem.loadCourseList怎么用?Python FileSystem.loadCourseList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSystem.FileSystem
的用法示例。
在下文中一共展示了FileSystem.loadCourseList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mergeCorrelationResults
# 需要导入模块: from FileSystem import FileSystem [as 别名]
# 或者: from FileSystem.FileSystem import loadCourseList [as 别名]
def mergeCorrelationResults(projectName):
courseList = FileSystem.loadCourseList()
resultsDir = os.path.join(FileSystem.getResultsDir(),projectName)
results = []
for course in courseList:
currDir = os.path.join(resultsDir,course)
path = os.path.join(currDir,'ForumActivityVsQuizScore_regression.csv')
pathStats = os.path.join(currDir,'CourseStats.csv')
try:
currResults = loadRegressionResults(path)
currCourseStats = loadCourseStats(pathStats)
results.append((course,currResults,currCourseStats))
except IOError:
continue
outputPath = os.path.join(resultsDir,'mergedCorrelationResults.csv')
writeMergedCorrelationResults(results, outputPath)
示例2: mergeCorrelationResults
# 需要导入模块: from FileSystem import FileSystem [as 别名]
# 或者: from FileSystem.FileSystem import loadCourseList [as 别名]
def mergeCorrelationResults(projectName):
courseList = FileSystem.loadCourseList()
resultsDir = os.path.join(FileSystem.getResultsDir(),projectName)
resultsScore = []
resultsLectures = []
for course in courseList:
currDir = os.path.join(resultsDir,course)
pathScore = os.path.join(currDir,'allForumVsFinalScore_regression.csv')
pathLectures = os.path.join(currDir,'allForumVsLecturesViewed_regression.csv')
try:
currResults = loadRegressionResults(pathScore)
resultsScore.append((course,currResults))
except IOError:
continue
try:
currResults = loadRegressionResults(pathLectures)
resultsLectures.append((course,currResults))
except IOError:
continue
outputPath = os.path.join(resultsDir,'mergedCorrelationResults.csv')
writeMergedCorrelationResults(resultsScore,resultsLectures,outputPath)
示例3: combineResults
# 需要导入模块: from FileSystem import FileSystem [as 别名]
# 或者: from FileSystem.FileSystem import loadCourseList [as 别名]
def combineResults(projectName):
courseList = FileSystem.loadCourseList()
resultsDir = os.path.join(FileSystem.getResultsDir(),projectName)
forumActivities = []
finalGrades = []
forumActivities2 = []
lecturesViewed = []
for course in courseList:
currDir = os.path.join(resultsDir, course)
pathScore = os.path.join(currDir,'allForumVsFinalScore.csv')
try:
forumActivity, finalGrade = loadResults(pathScore)
forumActivities += forumActivity
finalGrades += finalGrade
except IOError:
continue
pathLectures = os.path.join(currDir,'allForumVsLecturesViewed.csv')
try:
forumActivity, numLectures = loadResults(pathLectures)
forumActivities2 += forumActivity
lecturesViewed += numLectures
except IOError:
continue
outputPathScore = os.path.join(resultsDir,'allForumVsFinalScore.csv')
regressOutputPathScore = os.path.join(resultsDir,'allForumVsFinalScore_regression.csv')
outputPathLectures = os.path.join(resultsDir,'allForumVsLectures.csv')
regressOutputPathLectures = os.path.join(resultsDir,'allForumVsLectures_regression.csv')
forumActivitiesHistPath = os.path.join(resultsDir,'allForum_hist.csv')
finalGradesHistPath = os.path.join(resultsDir,'finalScore_hist.csv')
lecturesHistPath = os.path.join(resultsDir,'lecturesViewed_hist.csv')
writeResults(forumActivities, finalGrades, outputPathScore)
writeRegressionResults(forumActivities, finalGrades, regressOutputPathScore)
writeResults(forumActivities, lecturesViewed, outputPathLectures)
writeRegressionResults(forumActivities2, lecturesViewed, regressOutputPathLectures)
writeHistogram(forumActivities, forumActivitiesHistPath, limits = (-3.0,3.0))
writeHistogram(finalGrades, finalGradesHistPath, limits = (-3.0, 3.0))
writeHistogram(lecturesViewed, lecturesHistPath, limits = (-3.0, 3.0))