You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With image augmentation, number of images in the dataset times this multiplier is used for training. (default: 3)
48
64
49
65
**Other Parameters:**
66
+
50
67
`--debug/--no-debug`
68
+
51
69
Enable/disable debugging. Debugging mode uses a smaller dataset for faster execution. (default: False)
52
70
53
71
Most of the parameters are self explanatory, here I explain only some of the more obscure of them:
@@ -86,15 +104,19 @@ Running these four command will generate the following files:
86
104
`LogisticRegression.py` trains a classifier for Kaggle’s dogs vs. cats dataset. It accepts the following command line arguments:
87
105
88
106
`--imageSize`
107
+
89
108
Logistic regression expects all samples to have the same number of features. imageSize is used to specify the size to which all images in a dataset will be rescaled to (default: 100)
90
109
91
110
`--solver {lbfgs,sag,saga}`
111
+
92
112
Choose the solver used to minimize the cost function for logistic regression (default: lbfgs)
93
113
94
114
`--rescale / –-no-rescale`
115
+
95
116
Enable rescaling pixel values in images to [0.0, 1.0] and standardize all images so that each pixel has a zero mean and 1.0 standard deviation (default: --no-rescale)
96
117
97
118
`--debug / --no-debug`
119
+
98
120
Enable debugging. In debugging mode, only first 100 images are used
99
121
100
122
On first run, `LogisticRegression.py` stores the entire dataset as numpy arrays after rescaling (if specified) to a npz array. On subsequent runs, it loads this file to save time on resizing images and rescaling pixel values. The fitted model is saved to a file with prefix LRModel. Finally, `LogisticRegression.py` appends its results to `LogisticRegression.csv` with the following columns: solver, image size, rescaled, training accuracy, validation accuracy, time taken to fit model, and total time. This makes it easy to compare results from different parameters.
0 commit comments