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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef3f840cce99d7205957fbb39a6b319a45035624dce2e4e10f681383cb088abf
4
- data.tar.gz: e25100f792ad48cfa4feab7eb652a2d6c49bfc6e28f3bcb97c8150f9bdd1bfc5
3
+ metadata.gz: 617edee53d32c1340b1a996a48e6a8a60d8cccff4345e27b2e5cf2ffc926c4ac
4
+ data.tar.gz: 225c133b9365d62e579e39e862ef76efaf7759d1c40a59b89968441381c8c5ee
5
5
  SHA512:
6
- metadata.gz: 5f58395d392158d149db34ad5019a0e011164ca8d331846553e44e6564a291d88323ad0090c1c5ded60f696940b30949cba4e1a614fa9cd502e94372ef949707
7
- data.tar.gz: 9497391351ad054308a985cc6b9e608f8dfef61be7417d66502cb11c26ca4f7825456b31aab010c016ac10feff791a8f7a01893743ecf11a26fabb9de7405b82
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
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyML
4
- VERSION = "0.2.0-rc103"
4
+ VERSION = "0.2.0-rc104"
5
5
 
6
6
  module Version
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_ml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.rc103
4
+ version: 0.2.0.pre.rc104
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Shollenberger