mljs / matrix

Matrix manipulation and computation library
https://mljs.github.io/matrix/
MIT License
358 stars 54 forks source link

fix: Possibility to use text features by using label encoding #139

Closed aiday-mar closed 2 years ago

aiday-mar commented 2 years ago

Change in response to open issue 11 in ml-cart. It is possible to use text features using label encoding. The folder script contains an example of how the matrix module would be used with text features. If you want to run the script please install also ml-array-mean, and run : node categoricalFeaturesScript.js

codecov[bot] commented 2 years ago

Codecov Report

Merging #139 (875c650) into master (f198beb) will increase coverage by 0.44%. The diff coverage is 65.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   66.43%   66.88%   +0.44%     
==========================================
  Files          32       32              
  Lines        3197     3231      +34     
  Branches      503      517      +14     
==========================================
+ Hits         2124     2161      +37     
+ Misses        993      988       -5     
- Partials       80       82       +2     
Impacted Files Coverage Δ
src/matrix.js 76.05% <65.71%> (-0.38%) :arrow_down:
src/stat.js 76.69% <0.00%> (+11.27%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f198beb...875c650. Read the comment docs.

lpatiny commented 2 years ago

You may rather implement this matrix utility function in https://github.com/mljs/spectra-processing