MLDL
文章平均质量分 52
based on Ang‘s courses
IEChis
三分钟超人
展开
-
Deep learning practice of ANg(C1week4))
目的:搭建多层神经网络分析:如上次作业,并构建好、、、的基本函数。注意初始化参数时w的初始化与上次的不同。先将功能拆分实现,再进行组合,就可以完成一个。最后可以试试,以及进行。原创 2022-09-03 12:56:26 · 329 阅读 · 0 评论 -
Deep learning practice of ANg(C1week3)
目的:建立有一个隐藏层的神经网络来对样本进行分类。分析:首先(特征数、样本数),可以直接用shape获知,还可以画出数据散点图,初步判断其特征。然后。接下来就可以进行、、、来优化。得到模型后,就可以用它进行测试集的了。......原创 2022-08-30 22:27:45 · 289 阅读 · 0 评论 -
Deep learning practice of ANg(C1week2)
Supervised Learning: Train the algorithm according to labelled example.Unsupervised Learning: Train the algorithm according to unlabelled example.原创 2022-03-11 08:06:54 · 91 阅读 · 0 评论 -
Machine learning practice of ANg(ex8_cofi)
for self-useCodecofiCostFuncfunction [J, grad] = cofiCostFunc(params, Y, R, num_users, num_movies, ... num_features, lambda)%COFICOSTFUNC Collaborative filtering cost function% [J, grad] = COFICOSTFUNC(params, Y原创 2022-03-03 21:32:09 · 89 阅读 · 0 评论 -
Machine learning practice of ANg(ex8)
for self-useCodeestimateGaussianfunction [mu sigma2] = estimateGaussian(X)%ESTIMATEGAUSSIAN This function estimates the parameters of a %Gaussian distribution using the data in X% [mu sigma2] = estimateGaussian(X), % The input X is the datas原创 2022-03-03 20:00:17 · 47 阅读 · 0 评论 -
Machine learning practice of ANg(ex7_pca)
for self-useCodepcafunction [U, S] = pca(X)%PCA Run principal component analysis on the dataset X% [U, S, X] = pca(X) computes eigenvectors of the covariance matrix of X% Returns the eigenvectors U, the eigenvalues (on diagonal) in S%% Use原创 2022-03-02 22:59:41 · 81 阅读 · 0 评论 -
Machine learning practice of ANg(ex7)
for self-useCodefindClosestCentroidsfunction idx = findClosestCentroids(X, centroids)%FINDCLOSESTCENTROIDS computes the centroid memberships for every example% idx = FINDCLOSESTCENTROIDS (X, centroids) returns the closest centroids% in idx fo原创 2022-03-02 21:40:18 · 52 阅读 · 0 评论 -
Machine learning practice of ANg(ex6_spam)
for self-useCodeprocessEmailfunction word_indices = processEmail(email_contents)%PROCESSEMAIL preprocesses a the body of an email and%returns a list of word_indices % word_indices = PROCESSEMAIL(email_contents) preprocesses % the body of an原创 2022-03-02 13:14:07 · 602 阅读 · 0 评论 -
Machine learning practice of ANg(ex6)
for self-useCodegaussianKernelfunction sim = gaussianKernel(x1, x2, sigma)%RBFKERNEL returns a radial basis function kernel between x1 and x2% sim = gaussianKernel(x1, x2) returns a gaussian kernel between x1 and x2% and returns the value in原创 2022-03-01 22:51:56 · 366 阅读 · 0 评论 -
Machine learning practice of ANg(ex5)
for self-useCodelinearRegCostFunctionfunction [J, grad] = linearRegCostFunction(X, y, theta, lambda)%LINEARREGCOSTFUNCTION Compute cost and gradient for regularized linear %regression with multiple variables% [J, grad] = LINEARREGCOSTFUNCTION(X原创 2022-02-28 23:03:47 · 65 阅读 · 0 评论 -
Machine learning practice of ANg(ex4)
CodesigmoidGradientg = sigmoid(z).*(1-sigmoid(z)); %注意是对应元素相乘nnCostFunctionfunction [J grad] = nnCostFunction(nn_params, ... input_layer_size, ... hidden_layer_size, ...原创 2022-02-28 14:47:09 · 69 阅读 · 0 评论 -
Machine learning practice of ANg(ex3_nn)
for self-useCodepredictfunction p = predict(Theta1, Theta2, X)%PREDICT Predict the label of an input given a trained neural network% p = PREDICT(Theta1, Theta2, X) outputs the predicted label of X given the% trained weights of a neural networ原创 2022-02-27 10:28:21 · 286 阅读 · 0 评论 -
Machine learning practice of ANg(ex3)
for self-useHomeworkoneVsAllfunction [all_theta] = oneVsAll(X, y, num_labels, lambda)%ONEVSALL trains multiple logistic regression classifiers and returns all%the classifiers in a matrix all_theta, where the i-th row of all_theta %corresponds to原创 2022-02-26 22:35:39 · 157 阅读 · 0 评论 -
Machine learning practice of ANg(ex2_reg)
for self-useHomeworkcostFuctionRegit's the only difference compared with the ex2function [J, grad] = costFunctionReg(theta, X, y, lambda)%COSTFUNCTIONREG Compute cost and gradient for logistic regression with regularization% J = COSTFUNCTIONRE原创 2022-02-26 14:17:41 · 67 阅读 · 0 评论 -
Machine learning practice of ANg(ex2)
for self-useHomeworkplotData%% Machine Learning Online Class - Exercise 2: Logistic Regression%% Instructions% ------------% % This file contains code that helps you get started on the logistic% regression exercise. You will need to comple原创 2022-02-26 11:01:34 · 58 阅读 · 0 评论 -
Machine learning practice of ANg(ex1_multi)
record for self-usehomeworkfeatureNormalizationfunction [X_norm, mu, sigma] = featureNormalize(X)%FEATURENORMALIZE Normalizes the features in X % FEATURENORMALIZE(X) returns a normalized version of X where% the mean value of each feature is 0原创 2022-02-25 23:49:29 · 200 阅读 · 0 评论 -
Machine learning practice of ANg(ex1)
just record for self-usehomework(warmUpExercise omitted)plotDatafunction plotData(x, y)%PLOTDATA Plots the data points x and y into a new figure % PLOTDATA(x,y) plots the data points and gives the figure axes labels of% population and profi原创 2022-02-25 22:41:25 · 94 阅读 · 0 评论