The transition from Manhattan 2 to 2.05 is spot on, with a minor preference to 3 which should have been less than 2.0 perhaps.
And 1 to 1.34 also looks good
And Queens riders mainly stay in Queens, 3 goes to 2.76.
Although using 1,2,3 as a numeric is clearly flawed since these are really more like classes, which is where the linear model limitation is clear. But it was a neat experiment.
Make simple linear model using the extremely simple single independent variable dataset of just the borough,
linear-model
(def fname "201510-citibike-tripdata.simple.csv")
(defn load-csv-data [fname] (let [ table (with-open [reader (io/reader fname)] (->> (csv/read-csv reader) (mapv pass))) header-row (first table) columns (->> (rest table) (parse-table-as-doubles) (mtrix/transpose))] {:header header-row :columns columns} ))
2
), what sayeth our lineareth modeleth,; matrix-project.core=> (def inputs [1 2 3])
'matrix-project.core/inputs
matrix-project.core=> (simple-predict simple-model inputs) (1.3395737290675385 2.0510127251666574 2.7624517212657764)
(1.3395737290675385 2.0510127251666574 2.7624517212657764)
2
to2.05
is spot on, with a minor preference to3
which should have been less than2.0
perhaps.1
to1.34
also looks good3
goes to2.76
.