3

このファイルex1.m、私はオクターブで「開きます」が、何もしません。コードの最初の数行は...です。

%% Machine Learning Online Class - Exercise 1: Linear Regression

%  Instructions
%  ------------
% 
%  This file contains code that helps you get started on the
%  linear exercise. You will need to complete the following functions 
%  in this exericse:
%
%     warmUpExercise.m
%     plotData.m
%     gradientDescent.m
%     computeCost.m
%     gradientDescentMulti.m
%     computeCostMulti.m
%     featureNormalize.m
%     normalEqn.m
%
%  For this exercise, you will not need to change any code in this file,
%  or any other files other than those mentioned above.
%
% x refers to the population size in 10,000s
% y refers to the profit in $10,000s
%

%% Initialization
clear ; close all; clc

%% ==================== Part 1: Basic Function ====================
% Complete warmUpExercise.m 
fprintf('Running warmUpExercise ... \n');
fprintf('5x5 Identity Matrix: \n');
warmUpExercise()

fprintf('Program paused. Press enter to continue.\n');
pause;

など...もっと多くのファイルがありました、これを実行する方法がわかりません...

4

1 に答える 1

2

これは、www.coursera.orgから提供されているAndrew Ngのオンライン機械学習クラスの一部のようです。チュートリアルを自分で実行しようとした後、クラスのWebサイトのフォーラムでこれらの質問をする方が幸運かもしれません。

最初に、関連するすべてのファイルをディレクトリに配置する必要があります。次に、実際に割り当てを完了します。これらの割り当てのほとんどは、コードセクションを完了するまで何もしません。

このファイルには、線形演習を開始するのに役立つコードが含まれています。この演習では、次の機能を完了する必要があります。

 warmUpExercise.m
 plotData.m
 gradientDescent.m
 computeCost.m
 gradientDescentMulti.m
 computeCostMulti.m
 featureNormalize.m
 normalEqn.m

完了したら、Macターミナルを開き、ex1.mが配置されているディレクトリにcdします。プログラムを実行するoctaveには、ファイルの名前を拡張子なしで起動して入力します.m。タイプex1。または、octave -q ex1.mプログラムの実行が完了した後にオクターブシェルになりたくない場合は、ターミナルから入力することもできます。

于 2012-12-24T00:53:50.650 に答える