Skip to content

Commit

Permalink
ml_linalg 9.0.0 supported: vector constructors corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
gyrdym committed Apr 16, 2019
1 parent b2f5700 commit 9819127
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 3.2.0
- `ml_linalg` 9.0.0 supported

## 3.1.0
- `Categorical data processing`: `encoders` parameter added to `DataFrame.fromCsv` constructor

Expand Down
2 changes: 1 addition & 1 deletion lib/src/categorical_encoder/encoder_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mixin EncoderMixin implements CategoricalDataEncoder {
}
_sourceToEncoded = _createSourceToEncodedMap(values.toList(
growable: false));
return Matrix.rows(
return Matrix.fromRows(
values.map((value) => _sourceToEncoded[value]).toList(growable: false),
dtype: dtype);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ class VariablesExtractorImpl implements VariablesExtractor {
});
return Tuple2(
featureColumns.isNotEmpty
? _filterMatrix(Matrix.columns(featureColumns, dtype: _dtype))
? _filterMatrix(Matrix.fromColumns(featureColumns, dtype: _dtype))
: null,
labelColumns.isNotEmpty
? _filterMatrix(Matrix.columns(labelColumns, dtype: _dtype))
? _filterMatrix(Matrix.fromColumns(labelColumns, dtype: _dtype))
: null
);
}

Matrix _filterMatrix(Matrix data) {
if (!_hasCategoricalData) return data;
return Matrix.rows(_rowIndices.map(data.getRow).toList(growable: true));
return Matrix.fromRows(_rowIndices.map(data.getRow).toList(growable: true));
}
}
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ml_preprocessing
description: Implementaion of popular algorithms of data preprocessing for machine learning
version: 3.1.0
version: 3.2.0
author: Ilia Gyrdymov <ilgyrd@gmail.com>
homepage: https://github.com/gyrdym/ml_preprocessing

Expand All @@ -9,7 +9,7 @@ environment:

dependencies:
csv: ^4.0.0
ml_linalg: ^7.0.0
ml_linalg: ^9.0.0
tuple: ^1.0.2
xrange: ^0.0.4

Expand Down

0 comments on commit 9819127

Please sign in to comment.