当前位置: 首页>>代码示例>>Python>>正文


Python FileSystem.loadCourseList方法代码示例

本文整理汇总了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)
开发者ID:jinpa,项目名称:MOOC-data,代码行数:18,代码来源:CombineResultsQuiz.py

示例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)
开发者ID:jinpa,项目名称:MOOC-data,代码行数:23,代码来源:CombineResults.py

示例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))
开发者ID:jinpa,项目名称:MOOC-data,代码行数:41,代码来源:CombineResults.py


注:本文中的FileSystem.FileSystem.loadCourseList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。