easy_ml 0.2.0.pre.rc103 → 0.2.0.pre.rc104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/easy_ml/column.rb +12 -0
- data/app/models/easy_ml/models/xgboost.rb +1 -1
- data/lib/easy_ml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 617edee53d32c1340b1a996a48e6a8a60d8cccff4345e27b2e5cf2ffc926c4ac
|
4
|
+
data.tar.gz: 225c133b9365d62e579e39e862ef76efaf7759d1c40a59b89968441381c8c5ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a31abca5a4086eab323b1dfc112c05f89682bbe1fab0211ed111a0978cdc43f45dfd3ece03c6920001cfb4286d22b41e52421d280f02476e2feb63f0214eefd
|
7
|
+
data.tar.gz: 1f109b18e911eee6f81fe797f80320cf37a06e5ae25e4eb76894ffa98dbc931a66b63264462d36ce58e29ab0a7b95e90d522457e53b4fc15a71ece5473d73389
|
@@ -528,6 +528,18 @@ module EasyML
|
|
528
528
|
|
529
529
|
return Polars.col(name).cast(expected_dtype).alias(name) if expected_dtype == actual_type
|
530
530
|
|
531
|
+
if encoding.present?
|
532
|
+
encoding_cast = case encoding.to_sym
|
533
|
+
when :one_hot
|
534
|
+
Polars.col(series.name).cast(Polars::Boolean).alias(series.name)
|
535
|
+
when :ordinal
|
536
|
+
Polars.col(series.name).cast(Polars::Int64).alias(series.name)
|
537
|
+
when :embedding
|
538
|
+
Polars.col(series.name).alias(series.name)
|
539
|
+
end
|
540
|
+
return encoding_cast
|
541
|
+
end
|
542
|
+
|
531
543
|
cast_statement = case expected_dtype.to_s
|
532
544
|
when /Polars::List/
|
533
545
|
# we should start tracking polars args so we can know what type of list it is
|
@@ -498,7 +498,7 @@ module EasyML
|
|
498
498
|
feature_cols -= [weights_col] if weights_col
|
499
499
|
|
500
500
|
# Get features, labels and weights
|
501
|
-
exploded = explode_embeddings(xs)
|
501
|
+
exploded = explode_embeddings(xs.select(feature_cols))
|
502
502
|
feature_cols = exploded.columns
|
503
503
|
features = lazy ? exploded.collect.to_numo : exploded.to_numo
|
504
504
|
|
data/lib/easy_ml/version.rb
CHANGED