playpureo / ml-and-dl Goto Github PK
View Code? Open in Web Editor NEWself-learning
self-learning
下载的解压文件损坏
首先感谢你的贡献,正因为你开源的资料让我在学习吴恩达的机器学习编程作业时有了充分的参考。但是在我运行的过程中,发现一些小问题,可能是因为python版本不同,所以导致我的代码报错,现将问题指出,以方便后来的学习者。
在2.logistic regression中的第41和42行涉及到log函数,运行会报错:
RuntimeWarning: divide by zero encountered in log xxxxxxxx
这是因为当某些数据log涉及到无穷的时候,原始的np.log中内存的计算单位内存就会益出,导致后续无法计算,所以我们为期新增一个有固定值的小数位。保证其计算的时候浮点数维持在1e-5,运行不会报错。因此该两行代码改为
first = np.multiply(-y, np.log(sigmoid(X * theta.T) + 1e-5))
second = np.multiply((1-y), np.log(1 - sigmoid(X * theta.T) + 1e-5))
我的python版本为python 3.9,希望对出现同样问题的同学有参考价值。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.