Skip to content

Commit 51c16c8

Browse files
authored
ml libraries upgraded (#223)
1 parent fddbe17 commit 51c16c8

File tree

10 files changed

+29
-22
lines changed

10 files changed

+29
-22
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 16.11.0
4+
- `ml_preprocessing` version upgraded to 7.0.2
5+
- `ml_dataframe` version upgraded to 1.0.0
6+
37
## 16.10.5
48
- KnnClassifier:
59
- Proofreading the documentation

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ in your dependencies:
9494

9595
````
9696
dependencies:
97-
ml_dataframe: ^0.5.1
98-
ml_preprocessing: ^6.0.0
97+
ml_dataframe: ^1.0.0
98+
ml_preprocessing: ^7.0.2
9999
````
100100

101101
We need these repos to parse raw data in order to use it further. For more details, please
@@ -128,14 +128,14 @@ final samples = await fromCsv('datasets/pima_indians_diabetes_database.csv');
128128

129129
#### For a flutter application:
130130

131-
Be sure that you have ml_dataframe package version at least 0.5.1 and ml_algo package version at least 16.0.0
131+
Be sure that you have ml_dataframe package version at least 1.0.0 and ml_algo package version at least 16.0.0
132132
in your pubspec.yaml:
133133

134134
````
135135
dependencies:
136136
...
137137
ml_algo: ^16.0.0
138-
ml_dataframe: ^0.5.1
138+
ml_dataframe: ^1.0.0
139139
...
140140
````
141141

e2e/decision_tree_classifier/decision_tree_classifier_save_as_svg_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ void main() async {
99
() async {
1010
final samples = (await fromCsv('e2e/_datasets/iris.csv'))
1111
.shuffle()
12-
.dropSeries(seriesNames: ['Id']);
12+
.dropSeries(names: ['Id']);
1313
final pipeline = Pipeline(samples, [
14-
encodeAsIntegerLabels(
15-
featureNames: ['Species'],
14+
toIntegerLabels(
15+
columnNames: ['Species'],
1616
),
1717
]);
1818
final processed = pipeline.process(samples);

e2e/decision_tree_classifier/decision_tree_classifier_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import 'package:test/test.dart';
88
Future<Vector> evaluateClassifier(MetricType metric, DType dtype) async {
99
final samples = (await fromCsv('e2e/_datasets/iris.csv'))
1010
.shuffle()
11-
.dropSeries(seriesNames: ['Id']);
11+
.dropSeries(names: ['Id']);
1212
final pipeline = Pipeline(samples, [
13-
encodeAsIntegerLabels(
14-
featureNames: ['Species'],
13+
toIntegerLabels(
14+
columnNames: ['Species'],
1515
),
1616
]);
1717
final numberOfFolds = 5;

e2e/knn_classifier/knn_classifier_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import 'package:test/test.dart';
88
Future<Vector> evaluateKnnClassifier(MetricType metric, DType dtype) async {
99
final samples = (await fromCsv('e2e/_datasets/iris.csv'))
1010
.shuffle()
11-
.dropSeries(seriesNames: ['Id']);
11+
.dropSeries(names: ['Id']);
1212
final targetName = 'Species';
1313
final pipeline = Pipeline(samples, [
14-
encodeAsIntegerLabels(
15-
featureNames: [targetName],
14+
toIntegerLabels(
15+
columnNames: [targetName],
1616
),
1717
]);
1818
final processed = pipeline.process(samples);

e2e/lasso_regressor/lasso_regressor_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Future<Vector> evaluateLassoRegressor(
88
MetricType metricType, DType dtype) async {
99
final samples = (await fromCsv('e2e/_datasets/advertising.csv'))
1010
.shuffle()
11-
.dropSeries(seriesNames: ['Num']);
11+
.dropSeries(names: ['Num']);
1212
final targetName = 'Sales';
1313
final validator = CrossValidator.kFold(
1414
samples,

e2e/softmax_regressor/softmax_regressor_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Future<Vector> evaluateSoftmaxRegressor(
99
MetricType metricType, DType dtype) async {
1010
final samples = (await fromCsv('e2e/_datasets/iris.csv'))
1111
.shuffle()
12-
.dropSeries(seriesNames: ['Id']);
12+
.dropSeries(names: ['Id']);
1313
final pipeline = Pipeline(samples, [
14-
encodeAsOneHotLabels(
15-
featureNames: ['Species'],
14+
toOneHotLabels(
15+
columnNames: ['Species'],
1616
),
1717
]);
1818
final classNames = ['Iris-setosa', 'Iris-versicolor', 'Iris-virginica'];

lib/src/di/common/init_common_module.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void initCommonModule() {
3333
injector
3434
..registerSingletonIf<EncoderFactory>(
3535
() => (DataFrame data, Iterable<String> targetNames) =>
36-
Encoder.oneHot(data, featureNames: targetNames),
36+
Encoder.oneHot(data, columnNames: targetNames),
3737
dependencyName: oneHotEncoderFactoryKey)
3838
..registerSingletonIf<RandomizerFactory>(
3939
() => const RandomizerFactoryImpl())

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ml_algo
22
description: Machine learning algorithms, Machine learning models performance evaluation functionality
3-
version: 16.10.5
3+
version: 16.11.0
44
homepage: https://github.com/gyrdym/ml_algo
55

66
environment:
@@ -10,9 +10,9 @@ dependencies:
1010
collection: ^1.16.0
1111
injector: ^2.0.0
1212
json_annotation: ^4.0.0
13-
ml_dataframe: ^0.5.1
13+
ml_dataframe: ^1.0.0
1414
ml_linalg: ^13.7.0
15-
ml_preprocessing: ^6.0.1
15+
ml_preprocessing: ^7.0.2
1616
quiver: ^3.0.0
1717
xrange: ^2.0.0
1818

test/mocks.mocks.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ class _FakeKernel_17 extends _i1.Fake implements _i19.Kernel {}
173173

174174
class _FakeKnnClassifier_18 extends _i1.Fake implements _i20.KnnClassifier {}
175175

176-
class _FakeDataFrame_19 extends _i1.Fake implements _i21.DataFrame {}
176+
class _FakeDataFrame_19 extends _i1.Fake implements _i21.DataFrame {
177+
@override
178+
String toString({int? maxRows = 10, int? maxCols = 7}) => super.toString();
179+
}
177180

178181
class _FakeLinearOptimizer_20 extends _i1.Fake implements _i22.LinearOptimizer {
179182
}

0 commit comments

Comments
 (0)