hanmq / machinelearning_zhouzhihua_problemsets Goto Github PK
View Code? Open in Web Editor NEWExercises answers to the book "machine-learning" written by Zhou Zhihua。周志华《机器学习》课后习题,个人解答。各算法都拿numpy和pandas实现了一遍
Exercises answers to the book "machine-learning" written by Zhou Zhihua。周志华《机器学习》课后习题,个人解答。各算法都拿numpy和pandas实现了一遍
您好,想问问BpNeuralNetwork.py里卖弄104行的计算公式da_last = -(y_ / a_last - (1 - y_) / (1 - a_last))是在算什么呢,因为我看了后面代码里面sigmoid反向传播有用到,应该是对应书本公式5.10中y真实值和预测值的差
line 63, in sigmoid
a = 1 / (1 + np.exp(-z))
^^^^^^^^^^
TypeError: loop of ufunc does not support argument 0 of type float which has no callable exp method
你好,我看你的代码写的是
p1 = sigmoid(np.dot(X_hat, beta)),
但书中说令p1(x_hat;beta) = p(y=1 | x_hat;beta)
而根据公式3.23来看,你那个代码是好像不对
还是说我的理解有错误?
这里的p1(x_hat;beta) = p(y=1 | x_hat;beta)
是否等于公式3.23?
您好,您的代码中有些随着时间问题出现了兼容性的问题,比如AODE中的pandas模块有些代码已经不能很好的工作了;再加之,感到您的repo确实优秀和周老师的文笔确实精彩,不更新实在是可惜了,我就在您的基础上按照框架的形式重新开发,并且使用C++做了多后端支持。
没看懂y=xw1/w0是从哪里推出来的 不是y=wTx嘛
不知道是否为版本问题,7.3中的39、40行代码需要改成下面这样才能运行:
# 计算正样本中,该属性每个取值的数量,并且加1,即拉普拉斯平滑
xi1_value_count = pd.value_counts(xi1).reindex(unique_value, fill_value=0) + 1
# 计算反样本中,该属性每个取值的数量,并且加1,即拉普拉斯平滑
xi0_value_count = pd.value_counts(xi0).reindex(unique_value, fill_value=0) + 1
附上我的pandas
版本:2.0.3
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.