{
    "componentChunkName": "component---src-templates-docs-js",
    "path": "/projects/p3",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linnaeus University","language":"en"}},"mdx":{"fields":{"id":"f22cd0b3-76f3-58ae-943a-e968022fb8f7","title":"P3 – Text Classification","slug":"/projects/p3"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"P3 – Text Classification\",\n  \"metaTitle\": \"2DV515 | P3\",\n  \"metaDescription\": \"metaDescription\",\n  \"order\": 4\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"This is one of the pre-defined project ideas you can choose for your project.\"), mdx(\"h2\", null, \"Text classification of Wikipedia articles\"), mdx(\"p\", null, \"You are required to use Python and Scikit-learn for this project.\"), mdx(\"p\", null, \"Classify the Wikipedia 300 dataset (150 articles about Video games, 150 about Programming) using machine learning. The dataset can be downloaded at the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"../assignments/datasets\"\n  }, \"Datasets\"), \" page.\"), mdx(\"p\", null, \"For text classification, the bag-of-words approach where you convert an article to word counts is typically used. An improvement is TF-IDF (Term Frequency-Inverse Document Frequency), which converts from word counts to word frequencies. TF-IDF is especially useful if the size of the articles varies a lot. Suitable algorithms for text classification are Multinomial Na\\xEFve Bayes (MultinomialNB) and Support Vector Machines with linear kernels (LinearSVC).\"), mdx(\"p\", null, \"You can read about text classification in Scikit-learn \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html\"\n  }, \"here\"), \".\"), mdx(\"h2\", null, \"Grading\"), mdx(\"table\", null, mdx(\"tr\", null, mdx(\"th\", null, \"Grade\"), mdx(\"th\", null, \"Requirements\")), mdx(\"tr\", null, mdx(\"td\", null, \"E\"), mdx(\"td\", null, mdx(\"ul\", null, mdx(\"li\", null, \"Classify the dataset using MultinomailNB and LinearSVC with the bag-of-words approach\"), mdx(\"li\", null, \"Evaluate accuracy on the same data as used for training the algorithms\")))), mdx(\"tr\", null, mdx(\"td\", null, \"C-D\"), mdx(\"td\", null, mdx(\"ul\", null, mdx(\"li\", null, \"Also evaluate accuracy using 10-fold cross validation.\")))), mdx(\"tr\", null, mdx(\"td\", null, \"A-B\"), mdx(\"td\", null, mdx(\"ul\", null, mdx(\"li\", null, \"Use TF-IDF to convert from word counts to word frequencies.\"), mdx(\"li\", null, \"Does TF-IDF improve classification accuracy when using cross-validation?\"))))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#text-classification-of-wikipedia-articles","title":"Text classification of Wikipedia articles"},{"url":"#grading","title":"Grading"}]},"parent":{"relativePath":"projects/p3.md"},"frontmatter":{"metaTitle":"2DV515 | P3","metaDescription":"metaDescription"}},"allMdx":{"edges":[{"node":{"fields":{"slug":"/","title":"Web Intelligence (2DV515)"}}},{"node":{"fields":{"slug":"/_playground/_todo-examination","title":"TODO: Examination"}}},{"node":{"fields":{"slug":"/_playground","title":"Playground"}}},{"node":{"fields":{"slug":"/assignments/a1","title":"A1 - Recommendation System"}}},{"node":{"fields":{"slug":"/_playground/expectations","title":"Expectations"}}},{"node":{"fields":{"slug":"/assignments/a2","title":"A2 - Clustering"}}},{"node":{"fields":{"slug":"/assignments/a3","title":"A3 - Search Engine"}}},{"node":{"fields":{"slug":"/assignments/a4","title":"A4 - Machine Learning"}}},{"node":{"fields":{"slug":"/assignments","title":"Assignments"}}},{"node":{"fields":{"slug":"/assignments/datasets","title":"Datasets"}}},{"node":{"fields":{"slug":"/lectures","title":"Lectures"}}},{"node":{"fields":{"slug":"/lectures/lecture01","title":"L01 - Introduction"}}},{"node":{"fields":{"slug":"/lectures/lecture02","title":"L02 - Recommendation Systems"}}},{"node":{"fields":{"slug":"/lectures/lecture03","title":"L03 - Clustering"}}},{"node":{"fields":{"slug":"/lectures/lecture04","title":"L04 - Search Engines"}}},{"node":{"fields":{"slug":"/lectures/lecture05","title":"L05 - What is Machine Learning?"}}},{"node":{"fields":{"slug":"/lectures/lecture07","title":"L07 - Naïve Bayes"}}},{"node":{"fields":{"slug":"/projects","title":"Projects"}}},{"node":{"fields":{"slug":"/projects/p2","title":"P2 – Clustering"}}},{"node":{"fields":{"slug":"/projects/p1","title":"P1 – Recommendation System"}}},{"node":{"fields":{"slug":"/projects/p3","title":"P3 – Text Classification"}}},{"node":{"fields":{"slug":"/projects/p4","title":"P4 – Web scraping"}}},{"node":{"fields":{"slug":"/projects/project","title":"Project"}}},{"node":{"fields":{"slug":"/sandbox/code","title":"Code"}}},{"node":{"fields":{"slug":"/sandbox/basic-elements","title":"Basic elements"}}},{"node":{"fields":{"slug":"/sandbox/exercise","title":"Exercises"}}},{"node":{"fields":{"slug":"/sandbox/frontmatter","title":"Frontmatter"}}},{"node":{"fields":{"slug":"/sandbox/hint","title":"Hint"}}},{"node":{"fields":{"slug":"/sandbox","title":"Sandbox"}}},{"node":{"fields":{"slug":"/sandbox/markdown-import","title":"Imported markdown"}}},{"node":{"fields":{"slug":"/sandbox/mermaid","title":"Mermaid"}}},{"node":{"fields":{"slug":"/lectures/lecture06","title":"L06 - Data and Learning"}}},{"node":{"fields":{"slug":"/sandbox/tabs","title":"Tabs"}}},{"node":{"fields":{"slug":"/sandbox/youtube","title":"YouTube"}}},{"node":{"fields":{"slug":"/study-guide/communication","title":"Communication"}}},{"node":{"fields":{"slug":"/study-guide/deadlines-and-submissions","title":"Deadlines and Submissions"}}},{"node":{"fields":{"slug":"/study-guide/grading","title":"Grading"}}},{"node":{"fields":{"slug":"/study-guide/registration","title":"Registration"}}},{"node":{"fields":{"slug":"/study-guide/welcome","title":"🎉 Welcome"}}},{"node":{"fields":{"slug":"/projects/_DEPRECATED/project","title":"Project"}}},{"node":{"fields":{"slug":"/study-guide/guides/git-and-multiple-computers","title":"Git and multiple computers"}}},{"node":{"fields":{"slug":"/study-guide/guides/an-introduction-to-git","title":"An introduction to Git"}}},{"node":{"fields":{"slug":"/study-guide/guides/git-commit-best-practices","title":"Git commit best practices"}}},{"node":{"fields":{"slug":"/study-guide/guides","title":"Guides"}}},{"node":{"fields":{"slug":"/study-guide/guides/set-up-git","title":"Set up Git"}}},{"node":{"fields":{"slug":"/study-guide/guides/multiple-git-user-configs","title":"Multiple Git user configs"}}},{"node":{"fields":{"slug":"/study-guide/instructors","title":"Instructors"}}},{"node":{"fields":{"slug":"/study-guide/guides/submit-an-assignment-as-a-merge-request","title":"Submit an assignment as a merge request"}}},{"node":{"fields":{"slug":"/study-guide/guides/troubleshooting-ssh","title":"Troubleshooting SSH"}}},{"node":{"fields":{"slug":"/study-guide/guides/this-happens-with-git-commands","title":"This happens with Git commands"}}},{"node":{"fields":{"slug":"/study-guide/readings","title":"Readings"}}},{"node":{"fields":{"slug":"/study-guide","title":"Study Guide"}}}]}},"pageContext":{"id":"f22cd0b3-76f3-58ae-943a-e968022fb8f7"}},
    "staticQueryHashes": ["253607798","3706406642","710574383"]}