Skip to content

Commit

Permalink
Merge pull request #111 from scicloj/2-beta5
Browse files Browse the repository at this point in the history
2 beta5
  • Loading branch information
daslu authored Jan 16, 2025
2 parents 2d5c883 + 1687865 commit 16e52f3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).

## [2-beta5] - unreleased
- updated deps (Metamorph.ml, Tableplot)

## [2-beta4] - 2025-01-01
- removed the Scicloj.ml.smile from the direct Noj dependencies (though it is still recommended to use with Noj)
- updated deps (Metamorph.ml. Scicloj.ml.tribuo, Clay, Tableplot)
Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


(def lib 'org.scicloj/noj)
(def version "2-beta4")
(def version "2-beta5")
(def snapshot (str version "-SNAPSHOT"))
(def class-dir "target/classes")

Expand Down
4 changes: 2 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
org.scicloj/kindly {:mvn/version "4-beta14"}
generateme/fastmath {:mvn/version "3.0.0-alpha3"}
aerial.hanami/aerial.hanami {:mvn/version "0.20.1"}
org.scicloj/tableplot {:mvn/version "1-beta6"}
org.scicloj/metamorph.ml {:mvn/version "0.11.1"}
org.scicloj/tableplot {:mvn/version "1-beta9"}
org.scicloj/metamorph.ml {:mvn/version "0.12"}
org.scicloj/sklearn-clj {:mvn/version "0.4.1"}
org.scicloj/scicloj.ml.xgboost {:mvn/version "6.2.0"}

Expand Down
4 changes: 2 additions & 2 deletions model-integration-tests/model_integration_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ warnings.simplefilter('ignore')")
(def other-specs [
[0.28 {:model-type :smile.classification/mlp
:layer-builders [mlp-hidden-layer-builder mlp-output-layer-builder]}]
[0.30 {:model-type :metamorph.ml/dummy-classifier}]])
[0.2 {:model-type :metamorph.ml/dummy-classifier}]])

(def model-specs
(concat
Expand Down Expand Up @@ -364,7 +364,7 @@ warnings.simplefilter('ignore')")
(println :mae mae)

(is (>
0.4 ;; dummy-model has mae of 0.69
0.4
mae) (format "mae validation failed: %s" model-map))))


Expand Down
11 changes: 4 additions & 7 deletions notebooks/noj_book/interactions_ols.clj
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,10 @@ So, for this specific data, we should go for the model with the interaction mode
preprocessed-data
[:sales] ;; predictor
[
[:youtube '(identity youtube)] ;; youtube stays as-is
[:facebook '(identity facebook)] ;; facebook stays as-is
[:youtube*facebook '(* youtube facebook)] ;; new term is created

]

))
[:youtube '(identity :youtube)] ;; youtube stays as-is
[:facebook '(identity :facebook)] ;; facebook stays as-is
[:youtube*facebook '(* :youtube :facebook)] ;; new term is created
]))


;; The result of the `create-design-matrix` function is directly "ready" to be used
Expand Down
5 changes: 1 addition & 4 deletions notebooks/noj_book/ml_basic.clj
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ split
(def dummy-model (ml/train (:train split)
{:model-type :metamorph.ml/dummy-classifier}))

;; TODO: Is the dummy model wrong about the majority?

(def dummy-prediction
(ml/predict (:test split) dummy-model))
;; It always predicts a single class, as expected:
Expand All @@ -239,9 +237,8 @@ split
(loss/classification-accuracy
(:survived (ds-cat/reverse-map-categorical-xforms (:test split)))
(:survived (ds-cat/reverse-map-categorical-xforms dummy-prediction)))
;; Its performance is poor, even worse than a coin flip.

(kindly/check = 0.3973063973063973)
(kindly/check = 0.6026936026936027)

;; ## Logistic regression
;; Next model to use is Logistic Regression:
Expand Down

0 comments on commit 16e52f3

Please sign in to comment.