pdf文档 Experiment 2: Logistic Regression and Newton's Method

196.41 KB 4 页 0 评论
语言 格式 评分
英语
.pdf
3
摘要
The experiment involves implementing logistic regression using Newton's Method to solve a binary classification problem. The dataset consists of 40 students admitted to college and 40 who were not, with features representing scores from two standardized exams. The task is to build a model that estimates college admission chances. The exercise compares gradient descent and Newton's Method, focusing on convergence rates, decision boundaries, and probability predictions. Instructions include plotting data, implementing algorithms, and analyzing results.
AI总结
本文档描述了一个使用牛顿法实现逻辑回归的实验,主要包括以下内容: 1. **实验目的**:通过Newton's Method实现逻辑回归,解决分类问题。 2. **数据集**:包含40名被录取和40名未被录取的高中生,每个样本包括两个标准化考试分数和录取标签(1表示录取,0表示未录取)。 3. **数据可视化**:使用Matlab/Octave将数据分为两类并绘制,+'表示录取,'o'表示未录取。 4. **梯度下降法**: - 初始化θ=0,设置收敛阈值ε=10⁻⁶。 -更新规则:θ ← θ - α∇θL(θ)。 - 实验问题包括收敛所需迭代次数、最终θ值、目标函数L(θ)的变化、决策边界的绘制以及特定学生未被录取的概率。 5. **牛顿法**: - 更新规则:θ(t+1) = θ(t) - H⁻¹∇θL。 - Hessian矩阵H的定义:H = (1/m)Σ[hθ(x(i))(1 - hθ(x(i)))x(i)x(i)ᵀ]。 - 实验问题类似于梯度下降,但收敛速度更快,通常在5-15次迭代内收敛。 6. **对比分析**:通过比较梯度下降和牛顿法,探讨两种方法的优缺点。 实验结果要求绘制决策边界并计算特定学生的录取概率。通过本实验可以比较两种优化方法的性能差异。
P1
P2
P3
P4
下载文档到本地,方便使用
文档评分
请文明评论,理性发言.