Skip to content

Commit 4854bc6

Browse files
Merge pull request #526 from timgates42/bugfix_typos
docs: Fix a few typos
2 parents f33d59f + f510d5b commit 4854bc6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Diff for: Chapter3_MCMC/github_pull.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
variables of interest:
55
indp. variables
6-
- language, given as a binary variable. Need 4 positions for 5 langagues
6+
- language, given as a binary variable. Need 4 positions for 5 languages
77
- #number of days created ago, 1 position
88
- has wiki? Boolean, 1 position
99
- followers, 1 position

Diff for: Chapter5_LossFunctions/DarkWorldsMetric.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def calc_delta_r(x_predicted,y_predicted,x_true,y_true):
2929
x_true, y_true: vector for known x- and y-positions (1 to 3 elements)
3030
Returns:
3131
radial_distance: vector containing the scalar distances between the predicted halo centres and the true halo centres (1 to 3 elements)
32-
true_halo_idexes: vector containing indexes of the input true halos which matches the predicted halo indexes (1 to 3 elements)
32+
true_halo_indexes: vector containing indexes of the input true halos which matches the predicted halo indexes (1 to 3 elements)
3333
measured_halo_indexes: vector containing indexes of the predicted halo position with the reference to the true halo position.
3434
e.g if true_halo_indexes=[0,1] and measured_halo_indexes=[1,0] then the first x,y coordinates of the true halo position matches the second input of the predicted x,y coordinates.
3535
"""
@@ -45,7 +45,7 @@ def calc_delta_r(x_predicted,y_predicted,x_true,y_true):
4545
#I will pass back
4646

4747
#Pick a combination of true and predicted
48-
a=['01','012'] #Input for the permutatiosn, 01 number halos or 012
48+
a=['01','012'] #Input for the permutations, 01 number halos or 012
4949
count=0 #For the index of the distances array
5050
true_halo_indexes=[] #The tuples which will show the order of halos picked
5151
predicted_halo_indexes=[]
@@ -116,7 +116,7 @@ def calc_theta(x_predicted, y_predicted, x_true, y_true, x_ref, y_ref):
116116
x_true[x_true != x_predicted])) # Angle of the estimate
117117
#wrt true halo centre
118118

119-
#Before finding the angle with the zero line as the line joiing the halo and the reference
119+
#Before finding the angle with the zero line as the line joining the halo and the reference
120120
#point I need to convert the angle produced by Python to an angle between 0 and 2pi
121121
phi =convert_to_360(phi, x_predicted-x_true,\
122122
y_predicted-y_true)
@@ -238,7 +238,7 @@ def main_score( nhalo_all, x_true_all, y_true_all, x_ref_all, y_ref_all, sky_pre
238238
#true positions. These are found by matching up the true halos to
239239
#the predicted halos such that the average of all the radial distances
240240
#is optimal. it also contains indexes of the halos used which are used to
241-
#show which halo has been mathced to which.
241+
#show which halo has been matched to which.
242242

243243
r_index_index = calc_delta_r(x_predicted, y_predicted, x_true, \
244244
y_true)
@@ -375,7 +375,7 @@ def main(user_fname, fname):
375375
#true positions. These are found by matching up the true halos to
376376
#the predicted halos such that the average of all the radial distances
377377
#is optimal. it also contains indexes of the halos used which are used to
378-
#show which halo has been mathced to which.
378+
#show which halo has been matched to which.
379379

380380
r_index_index = calc_delta_r(x_predicted, y_predicted, x_true, \
381381
y_true)

Diff for: Chapter7_BayesianMachineLearning/auc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def tied_rank(x):
3434

3535
def auc(actual, posterior):
3636
"""
37-
Computes the area under the receiver-operater characteristic (AUC)
37+
Computes the area under the receiver-operator characteristic (AUC)
3838
3939
This function computes the AUC error metric for binary classification.
4040

Diff for: sandbox/Chapter10_/github_datapull.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060
except ImportError as e:
6161
print e
6262
print "requests / BeautifulSoup not found. Using data pulled on Feburary 11, 2013"
63-
_data = np.genfromtxt( "data/gh_forks.csv", delimiter = "," ) #cehck this.
63+
_data = np.genfromtxt( "data/gh_forks.csv", delimiter = "," ) #check this.
6464
forks_to_explore = _data[:,0]
6565
repo_with_forks = _data[:,1]
6666

67-
_data = np.genfromtxt( "data/gh_stars.csv", delimiter = "," ) #cehck this.
67+
_data = np.genfromtxt( "data/gh_stars.csv", delimiter = "," ) #check this.
6868
stars_to_explore = _data[:,0]
6969
repo_with_stars = _data[:,1]
7070

0 commit comments

Comments
 (0)