<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Ch01\n",
    "\n",
    "## What is machine learning\n",
    "There are seveal different definitions of ML.\n",
    "For me, my favouriate definition comes from <NAME>, 1997 in a engineering-oriented way:\n",
    "A computer program is said to learn from experience E with respect to some task T and some performance \n",
    "measure P, if its performance on T, as measured by P, improves with experice E.\n",
    "\n",
    "## Why use machine learning\n",
    "\n",
    "Machine learning is great for:\n",
    "\n",
    "comlex problem/fluctuating environments/large data/no good solution using traditionl method\n",
    "\n",
    "Supervised learning: traning data includins the desired solutions, called labels. 邮件的垃圾邮件分类是一个非常好的supervised learning的例子。在训练集中，每一个sample（邮件）都被标记为spam或者ham，这就是labels，而这个过程的最终结果就是让邮箱系统能够自己将邮件进行分类。\n",
    "另一个典型的任务是去预测一个目标数值，即regression问题。例如预测一辆车的价格：给定一些列的汽车features（mileage，age，brand等等），这些特征被称作 predictors。为了实现训练目标，我们需要一个包含许多案例的数据集，其中不仅包含了这些predictors，还有相对应的labels（这里，就是价格）。\n",
    "\n",
    "注意 attribute 和 feature 的区别：尽管很多人经常相互替换地使用这两个词。但是严格地说，在机器学习中，attribute 是一种data type，例如 Mileage。然而 feature 则可以根据不同上下文关系有不同的含义，但通常意义上来说，feature 是 attribute 加上它的 value，例如 Mileage = 15000.\n",
    "\n",
    "注意 feature 和 preditors 的区别：在我看来，predictors 一定属于feature，但是feature不一定就是predictor。只有当你把这个feature用来作为训练时，这个feature才叫做predictor\n",
    "\n",
    "\n",
    "\n",
    "## Types of Machine Learning Systems\n",
    "\n",
    "We can classify them in borad categories based on:\n",
    "\n",
    "- whether or not they are trained with human supervison (supervise, unsupervised, semisupervised, reinforcement)\n",
    "\n",
    "- whether or not they can incrementally on the fly (online versus batch learning)\n",
    "\n",
    "- whether they work by simply comparing new data points to known data points, or instead detect patterns in the traning data and build a predictive model, much like scientists do (instance-based versus model-based learning)."
   ]
  },<commit_msg>move text<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Ch01\n",
    "\n",
    "## What is machine learning\n",
    "There are seveal different definitions of ML.\n",
    "For me, my favouriate definition comes from <NAME>, 1997 in a engineering-oriented way:\n",
    "A computer program is said to learn from experience E with respect to some task T and some performance \n",
    "measure P, if its performance on T, as measured by P, improves with experice E.\n",
    "\n",
    "## Why use machine learning\n",
    "\n",
    "Machine learning is great for:\n",
    "\n",
    "comlex problem/fluctuating environments/large data/no good solution using traditionl method\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "## Types of Machine Learning Systems\n",
    "\n",
    "We can classify them in borad categories based on:\n",
    "\n",
    "- whether or not they are trained with human supervison (supervise, unsupervised, semisupervised, reinforcement)\n",
    "\n",
    "Supervised learning: traning data includins the desired solutions, called labels. 邮件的垃圾邮件分类是一个非常好的supervised learning的例子。在训练集中，每一个sample（邮件）都被标记为spam或者ham，这就是labels，而这个过程的最终结果就是让邮箱系统能够自己将邮件进行分类。\n",
    "另一个典型的任务是去预测一个目标数值，即regression问题。例如预测一辆车的价格：给定一些列的汽车features（mileage，age，brand等等），这些特征被称作 predictors。为了实现训练目标，我们需要一个包含许多案例的数据集，其中不仅包含了这些predictors，还有相对应的labels（这里，就是价格）。\n",
    "\n",
    "注意 attribute 和 feature 的区别：尽管很多人经常相互替换地使用这两个词。但是严格地说，在机器学习中，attribute 是一种data type，例如 Mileage。然而 feature 则可以根据不同上下文关系有不同的含义，但通常意义上来说，feature 是 attribute 加上它的 value，例如 Mileage = 15000.\n",
    "\n",
    "注意 feature 和 preditors 的区别：在我看来，predictors 一定属于feature，但是feature不一定就是predictor。只有当你把这个feature用来作为训练时，这个feature才叫做predictor\n",
    "\n",
    "\n",
    "- whether or not they can incrementally on the fly (online versus batch learning)\n",
    "\n",
    "- whether they work by simply comparing new data points to known data points, or instead detect patterns in the traning data and build a predictive model, much like scientists do (instance-based versus model-based learning)."
   ]
  },
{'fraction_non_alphanumeric': 0.11390602752728998, 'fraction_numerical': 0.005220692928334125, 'mean_word_length': 4.041866028708134, 'pattern_counts': {'":': 8, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1372184', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1741, 'n_words': 419}