<html>
<head>
<title>Evernote Export</title>
<basefont face="微软雅黑" size="2" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="exporter-version" content="Evernote Windows/305825 (zh-CN, DDL); Windows/10.0.15063 (Win64);"/>
<style>
body, td {
font-family: 微软雅黑;
font-size: 10pt;
}
</style>
</head>
<body>
<a name="531"/>
<div>
<span><div><h1 style="box-sizing: border-box; margin: 0.8em 0px; padding: 0px; text-align: start; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-size: 36pt; background-color: rgb(255, 255, 255); color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 1.1;">Planar data classification with one hidden layer</span></span></h1><h2 style="box-sizing: border-box; margin: 0.8em 0px; padding: 0px; text-align: start; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span style="box-sizing: border-box; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="background-color: rgb(255, 255, 255); font-size: 36pt; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 1.1;">1 - Packages</span></span></h2><div style="box-sizing: border-box; margin: 0px 0px 1.7em; padding: 0px; word-wrap: break-word; word-break: normal; font-size: 16px; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><div><span style="font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;">Let’s first import all the packages that you will need during this assignment. </span></div><div><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;">- </span><a href="http://blog.csdn.net/Koala_Tree/article/details/www.numpy.org" style="box-sizing: border-box; background-color: transparent; outline: none; font-size: 16px; color: rgb(202, 12, 22); font-family: 'microsoft yahei'; line-height: 27.2px;">numpy</a><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;"> is the fundamental package for scientific computing with Python. </span></div><div><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;">- </span><a href="http://scikit-learn.org/stable/" style="box-sizing: border-box; background-color: transparent; outline: none; font-size: 16px; color: rgb(202, 12, 22); font-family: 'microsoft yahei'; line-height: 27.2px;">sklearn</a><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;"> provides simple and efficient tools for data mining and data analysis. </span></div><div><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;">- </span><a href="http://matplotlib.org/" style="box-sizing: border-box; background-color: transparent; outline: none; font-size: 16px; color: rgb(202, 12, 22); font-family: 'microsoft yahei'; line-height: 27.2px;">matplotlib</a><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;"> is a library for plotting graphs in Python. </span></div><div><span style="background-color: rgb(255, 255, 255); font-size: 16px; color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;">- testCases_v2 provides some test examples to assess the correctness of your functions </span></div><div style="margin-top: 1em; margin-bottom: 1em;"><div><span style="font-size: 16px; background-color: rgb(255, 255, 255); color: rgb(63, 63, 63); font-family: 'microsoft yahei'; line-height: 27.2px;">- planar_utils provide various useful functions used in this assignment</span></div><div><span style="font-size: 16px;"><span style="box-sizing: border-box; word-wrap: break-word; word-break: normal; font-size: 12pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(168, 168, 168); font-family: 'microsoft yahei'; line-height: 1.1;">译:<span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);">让我们首先导入您在这个任务期间需要的所有软件包。</span></span></span></div><div><span style="font-size: 16px;"><span style="box-sizing: border-box; word-wrap: break-word; word-break: normal; font-size: 12pt; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(168, 168, 168); font-family: 'microsoft yahei'; line-height: 1.1;"><span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);"><br/></span></span></span></div><div><span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);">- numpy是用Python进行科学计算的基本包。</span></div><div><span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);">- sklearn为数据挖掘和数据分析提供了简单高效的工具。</span></div><div><span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);">- matplotlib是一个用于用Python绘制图形的库。</span></div><div><span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);">- testCases_v2提供了一些测试示例来评估函数的正确性</span></div><div><span style="font-family: microsoft yahei; font-size: 12pt; color: rgb(168, 168, 168);">- planar_utils提供了在这个任务中使用的各种有用的函数</span></div></div></div><div style="box-sizing: border-box; font-size: 14px; white-space: nowrap; padding: 5px 5px 5px 60px; margin: 0px 0px 1.7em; word-break: break-all; word-wrap: break-word; background-color: rgba(128, 128, 128, 0.0470588); border: 1px solid rgba(128, 128, 128, 0.0745098); border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; position: relative; overflow-y: hidden; overflow-x: auto; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="box-sizing: border-box; font-size: 12.6px; padding: 0px; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal;"><div><span style="box-sizing: border-box; background-color: rgba(128, 128, 128, 0.0470588); font-size: 12.6px; color: rgb(136, 0, 0); font-family: 'Source Code Pro', monospace; line-height: 23.8px;"># Package imports</span><span style="box-sizing: border-box; background-color: rgba(128, 128, 128, 0.0470588); font-size: 12.6px; color: rgb(0, 0, 136); font-family: 'Source Code Pro', monospace; line-height: 23.8px;">import</span> <span style="background-color: rgba(128, 128, 128, 0.0470588); font-size: 12.6px; color