matlab代码中向量的点乘-IntroToMachineLearning:Comp490

  • M8_858543
    了解作者
  • 36.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-27 13:16
    上传日期
matlab代码中向量的点乘 Python程式设计作业 该存储库包含Andrew Ng教授教的编程作业的python版本。 这也许是最受欢迎的在线机器学习入门课程。 除了受欢迎之外,它还是任何有兴趣的学生可以上的最好的机器学习课程之一,以开始机器学习。 此类的一个不幸方面是编程分配是在MATLAB或OCTAVE中进行的,这可能是因为此类是在python成为机器学习中的通用语言之前进行的。 在过去的几年中,Python机器学习生态系统呈指数增长,并且仍保持增长势头。 我怀疑许多想开始机器学习之旅的学生也想使用Python来开始它。 出于这些原因,我决定用Python重写所有编程任务,以便学生从学习之初就可以熟悉它的生态系统。 这些分配与班级无缝协作,不需要在MATLAB分配中发布任何材料。 以下是这些作业分配的一些新功能和有用功能: 分配使用,与原始MATLAB / OCTAVE分配相比,它提供了直观的流程。 原始的赋值指令已被完全重写,用于引用MATLAB / OCTAVE功能的部分已更改为引用其python对应内容。 现在,重新编写的说明与python入门代码一起嵌入在Jupyter
IntroToMachineLearning-main.zip
  • IntroToMachineLearning-main
  • Exercise5
  • utils.py
    5.1KB
  • __pycache__
  • utils.cpython-36.pyc
    5KB
  • exercise5.ipynb
    98.4KB
  • Figures
  • polynomial_learning_curve.png
    20.5KB
  • polynomial_learning_curve_reg_1.png
    19KB
  • learning_curve_random.png
    18.6KB
  • learning_curve.png
    19.7KB
  • polynomial_regression_reg_1.png
    20.7KB
  • linear_fit.png
    14.9KB
  • polynomial_regression_reg_100.png
    21KB
  • polynomial_regression.png
    23KB
  • cross_validation.png
    14KB
  • token.pkl
    55B
  • Data
  • ex5data1.mat
    1.3KB
  • ex4weights.mat
    77.7KB
  • ex4data1.mat
    7.2MB
  • environment.yml
    149B
  • Exercise1
  • utils.py
    1.8KB
  • __pycache__
  • utils.cpython-36.pyc
    1.8KB
  • exercise1.ipynb
    272.1KB
  • Figures
  • dataset1.png
    12.1KB
  • regression_result.png
    17KB
  • cost_function.png
    119.8KB
  • learning_rate.png
    8.5KB
  • token.pkl
    55B
  • Data
  • ex1data1.txt
    1.3KB
  • ex1data2.txt
    657B
  • Exercise6
  • exercise6.ipynb
    349.4KB
  • utils.py
    23.1KB
  • __pycache__
  • utils.cpython-36.pyc
    19.4KB
  • Figures
  • dataset1.png
    7.8KB
  • svm_dataset2.png
    113KB
  • word_indices.png
    71.8KB
  • svm_predictors.png
    18.1KB
  • email_cleaned.png
    54.4KB
  • svm_c1.png
    12.7KB
  • vocab.png
    24.7KB
  • dataset3.png
    20KB
  • email.png
    87.6KB
  • dataset2.png
    78.8KB
  • svm_dataset3_best.png
    38.8KB
  • svm_c100.png
    11.9KB
  • token.pkl
    55B
  • Data
  • spamSample2.txt
    245B
  • vocab.txt
    19.8KB
  • ex6data1.mat
    981B
  • ex6data2.mat
    7.4KB
  • emailSample2.txt
    1.3KB
  • ex6data3.mat
    5.9KB
  • spamTest.mat
    110.1KB
  • emailSample1.txt
    393B
  • spamTrain.mat
    418.8KB
  • spamSample1.txt
    655B
  • __pycache__
  • submission.cpython-36.pyc
    3.4KB
  • Exercise3
  • utils.py
    3.2KB
  • exercise3.ipynb
    514.3KB
  • __pycache__
  • utils.cpython-36.pyc
    3KB
  • Figures
  • neuralnetwork.png
    53.7KB
  • token.pkl
    55B
  • Data
  • ex3data1.mat
    7.2MB
  • ex3weights.mat
    77.7KB
  • Exercise2
  • utils.py
    4.8KB
  • __pycache__
  • utils.cpython-36.pyc
    4.3KB
  • Figures
  • decision_boundary3.png
    22.9KB
  • decision_boundary4.png
    20.8KB
  • decision_boundary2.png
    21.3KB
  • decision_boundary1.png
    19.6KB
  • exercise2.ipynb
    119.5KB
  • token.pkl
    55B
  • Data
  • ex2data2.txt
    2.2KB
  • ex2data1.txt
    3.7KB
  • Exercise4
  • exercise4.ipynb
    333.1KB
  • utils.py
    8KB
  • __pycache__
  • utils.cpython-36.pyc
    7KB
  • Figures
  • ex4-backpropagation.png
    42.3KB
内容介绍
# [Coursera Machine Learning MOOC by Andrew Ng](https://www.coursera.org/learn/machine-learning) # Python Programming Assignments ![](machinelearning.jpg) This repositry contains the python versions of the programming assignments for the [Machine Learning online class](https://www.coursera.org/learn/machine-learning) taught by Professor Andrew Ng. This is perhaps the most popular introductory online machine learning class. In addition to being popular, it is also one of the best Machine learning classes any interested student can take to get started with machine learning. An unfortunate aspect of this class is that the programming assignments are in MATLAB or OCTAVE, probably because this class was made before python became the go-to language in machine learning. The Python machine learning ecosystem has grown exponentially in the past few years, and is still gaining momentum. I suspect that many students who want to get started with their machine learning journey would like to start it with Python also. It is for those reasons I have decided to re-write all the programming assignments in Python, so students can get acquainted with its ecosystem from the start of their learning journey. These assignments work seamlessly with the class and do not require any of the materials published in the MATLAB assignments. Here are some new and useful features for these sets of assignments: - The assignments use [Jupyter Notebook](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html), which provides an intuitive flow easier than the original MATLAB/OCTAVE assignments. - The original assignment instructions have been completely re-written and the parts which used to reference MATLAB/OCTAVE functionality have been changed to reference its `python` counterpart. - The re-written instructions are now embedded within the Jupyter Notebook along with the `python` starter code. For each assignment, all work is done solely within the notebook. - The `python` assignments can be submitted for grading. They were tested to work perfectly well with the original Coursera grader that is currently used to grade the MATLAB/OCTAVE versions of the assignments. - After each part of a given assignment, the Jupyter Notebook contains a cell which prompts the user for submitting the current part of the assignment for grading. ## Online workspace You can work on the assignments in an online workspace called [Deepnote](https://www.deepnote.com/). This allows you to play around with the code and access the assignments from your browser. [<img height="22" src="https://beta.deepnote.com/buttons/launch-in-deepnote.svg">](https://beta.deepnote.com/launch?template=data-science&url=https%3A%2F%2Fgithub.com%2Fdibgerge%2Fml-coursera-python-assignments) ## Downloading the Assignments To get started, you can start by either downloading a zip file of these assignments by clicking on the `Clone or download` button. If you have `git` installed on your system, you can clone this repository using : clone https://github.com/dibgerge/ml-coursera-python-assignments.git Each assignment is contained in a separate folder. For example, assignment 1 is contained within the folder `Exercise1`. Each folder contains two files: - The assignment `jupyter` notebook, which has a `.ipynb` extension. All the code which you need to write will be written within this notebook. - A python module `utils.py` which contains some helper functions needed for the assignment. Functions within the `utils` module are called from the python notebook. You do not need to modify or add any code to this file. ## Requirements These assignments has been tested and developed using the following libraries: - python==3.6.4 - numpy==1.13.3 - scipy==1.0.0 - matplotlib==2.1.2 - jupyter==1.0.0 - jupyter-client==5.0.1 We recommend using at least these versions of the required libraries or later. Python 2 is not supported. ## Python Installation We highly recommend using anaconda for installing python. [Click here](https://www.anaconda.com/download/) to go to Anaconda's download page. Make sure to download Python 3.6 version. If you are on a windows machine: - Open the executable after download is complete and follow instructions. - Once installation is complete, open `Anaconda prompt` from the start menu. This will open a terminal with python enabled. If you are on a linux machine: - Open a terminal and navigate to the directory where Anaconda was downloaded. - Change the permission to the downloaded file so that it can be executed. So if the downloaded file name is `Anaconda3-5.1.0-Linux-x86_64.sh`, then use the following command: `chmod a+x Anaconda3-5.1.0-Linux-x86_64.sh` - Now, run the installation script using `./Anaconda3-5.1.0-Linux-x86_64.sh`, and follow installation instructions in the terminal. Once you have installed python, create a new python environment will all the requirements using the following command: conda env create -f environment.yml After the new environment is setup, activate it using (windows) activate machine_learning or if you are on a linux machine source activate machine_learning Now we have our python environment all set up, we can start working on the assignments. To do so, navigate to the directory where the assignments were installed, and launch the jupyter notebook from the terminal using the command jupyter notebook This should automatically open a tab in the default browser. To start with assignment 1, open the notebook `./Exercise1/exercise1.ipynb`. ## Python Tutorials If you are new to python and to `jupyter` notebooks, no worries! There is a plethora of tutorials and documentation to get you started. Here are a few links which might be of help: - [Python Programming](https://pythonprogramming.net/introduction-to-python-programming/): A turorial with videos about the basics of python. - [Numpy and matplotlib tutorial](http://cs231n.github.io/python-numpy-tutorial/): We will be using numpy extensively for matrix and vector operations. This is great tutorial to get you started with using numpy and matplotlib for plotting. - [Jupyter notebook](https://medium.com/codingthesmartway-com-blog/getting-started-with-jupyter-notebook-for-python-4e7082bd5d46): Getting started with the jupyter notebook. - [Python introduction based on the class's MATLAB tutorial](https://github.com/mstampfer/Coursera-Stanford-ML-Python/blob/master/Coursera%20Stanford%20ML%20Python%20wiki.ipynb): This is the equivalent of class's MATLAB tutorial, in python. ## Caveats and tips - In many of the exercises, the regularization parameter $\lambda$ is denoted as the variable name `lambda_`, notice the underscore at the end of the name. This is because `lambda` is a reserved python keyword, and should never be used as a variable name. - In `numpy`, the function `dot` is used to perform matrix multiplication. The operation '*' only does element-by-element multiplication (unlike MATLAB). If you are using python version 3.5+, the operator '@' is the new matrix multiplication, and it is equivalent to the `dot` function. ## Acknowledgements - I would like to thank professor Andrew Ng and the crew of the Stanford Machine Learning class on Coursera for such an awesome class. - Some of the material used, especially the code for submitting assignments for grading is based on [`mstampfer`'s](https://github.com/mstampfer/Coursera-Stanford-ML-Python) python implementation of the assignments.
评论
    相关推荐
    • mosaic-jupyter
      小插图 关于 该存储库维护了一组小插图,这些小插图展示了Mission Bio分析软件包 小插图列表
    • Jupyter_notebooks:带有wardblonde的Jupyter笔记本的存储
      Jupyter_notebooks:带有wardblonde的Jupyter笔记本的存储
    • jupyter
      与environment.yml文件兼容的与Binder兼容的存储库。 通过单击上方或以下URL的蓝色徽标来访问此活页夹: 笔记 environment.yml文件应列出笔记本计算机所依赖的所有Python库,并指定它们是否使用以下conda命令...
    • Jupyter
      存储库包含一些用于处理示例jupyter笔记本。 -OpenTopography最近将其整个全局数据集集合转换为COG。 本笔记本示例重点介绍了Cloud Optimized Geotiffs(COG)的强大功能以及如何将其用于减少下载文件大小以及...
    • jupyterlab扩展教程
      对于开发安装(需要npm 4或更高版本),请在存储库目录中执行以下操作: npm install npm run build jupyter labextension link . 要重建软件包和JupyterLab应用程序: npm run build jupyter lab build
    • ProvBook:Jupyter笔记本的出处
      Jupyter Notebook的来源:跟踪并存储Jupyter Notebook执行的来源。 Jupyter Notebook的机器可读性:提供以机器可读格式下载笔记本的功能。 Jupyter Notebook运行的差异:比较Jupyter Notebook代码单元与输入的...
    • JupyterNotebooks
      Jupyter笔记本 getDisplacement笔记本 克隆此存储库 导航到安装目录 运行conda env create -f environment.yml以安装所有笔记本和脚本的所有必要软件包。 如果您更喜欢将其用于其他虚拟环境,则还有一个...
    • jupyterlab_apod
      对于开发安装(需要npm 4或更高版本),请在存储库目录中执行以下操作: npm install npm run build jupyter labextension link . 要重建软件包和JupyterLab应用程序: npm run build jupyter lab build
    • Jupyter-Versions:该存储库以Jupyter格式包含我的所有颂歌
      Jupyter-Versions:该存储库以Jupyter格式包含我的所有颂歌
    • Boston-Recreation-Tour:该存储库是为Coursera应用数据科学的顶点创建的,并存储Jupyter笔记本和
      Boston-Recreation-Tour:该存储库是为Coursera应用数据科学的顶点创建的,并存储Jupyter笔记本和波士顿娱乐之旅项目的文档