Skip to content

Commit

Permalink
Merge 5f5f666 into 8e479db
Browse files Browse the repository at this point in the history
  • Loading branch information
gyrdym committed Oct 5, 2019
2 parents 8e479db + 5f5f666 commit ccc9022
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## 5.0.2
- `xrange` dependency removed
- `ml_dataframe` 0.0.11 supported

## 5.0.1
- `xrange` package version locked

Expand Down
16 changes: 10 additions & 6 deletions example/black_friday/black_friday.dart
@@ -1,6 +1,5 @@
import 'package:ml_dataframe/ml_dataframe.dart';
import 'package:ml_preprocessing/ml_preprocessing.dart';
import 'package:xrange/zrange.dart';

Future processDataSetWithCategoricalData() async {
final dataFrame = await fromCsv('example/black_friday/black_friday.csv',
Expand All @@ -15,14 +14,19 @@ Future processDataSetWithCategoricalData() async {
).process(dataFrame);

final observations = encoded.toMatrix();
final genderEncoded = observations.submatrix(columns: ZRange.closed(0, 1));
final ageEncoded = observations.submatrix(columns: ZRange.closed(2, 8));

final genderEncoded = observations.sample(columnIndices: [0, 1]);

final ageEncoded = observations.sample(columnIndices: [2, 3, 4, 5, 6, 7, 8]);

final cityCategoryEncoded = observations
.submatrix(columns: ZRange.closed(9, 11));
.sample(columnIndices: [9, 10, 11]);

final stayInCityEncoded = observations
.submatrix(columns: ZRange.closed(12, 16));
.sample(columnIndices: [12, 13, 14, 15, 16]);

final maritalStatusEncoded = observations
.submatrix(columns: ZRange.closed(17, 18));
.sample(columnIndices: [17, 18]);

print('Features:');

Expand Down
2 changes: 0 additions & 2 deletions example/main.dart
@@ -1,5 +1,3 @@
import 'dart:async';

import 'package:ml_dataframe/ml_dataframe.dart';
import 'package:ml_preprocessing/ml_preprocessing.dart';
import 'package:ml_preprocessing/src/encoder/encode_as_integer_labels.dart';
Expand Down
7 changes: 3 additions & 4 deletions pubspec.yaml
@@ -1,17 +1,16 @@
name: ml_preprocessing
description: Popular algorithms of data preprocessing for machine learning
version: 5.0.1
version: 5.0.2
author: Ilia Gyrdymov <ilgyrd@gmail.com>
homepage: https://github.com/gyrdym/ml_preprocessing

environment:
sdk: '>=2.4.0 <3.0.0'

dependencies:
ml_dataframe: ^0.0.4
ml_linalg: ^11.0.0
ml_dataframe: 0.0.11
ml_linalg: ^12.1.0
quiver: ^2.0.2
xrange: 0.0.6

dev_dependencies:
benchmark_harness: '>=1.0.0 <2.0.0'
Expand Down

0 comments on commit ccc9022

Please sign in to comment.