Skip to content

Commit

Permalink
Merge 04c0bab into f284ced
Browse files Browse the repository at this point in the history
  • Loading branch information
gyrdym committed Mar 11, 2019
2 parents f284ced + 04c0bab commit 1b2572a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## 9.2.3
- Examples for Linear regression and Logistic regression updated (vector's `normalize` method used)
- `CategoricalDataEncoderType`: one-hot encoding documentation corrected

## 9.2.2
- Softmax regression example added to README

Expand Down
2 changes: 1 addition & 1 deletion example/classification/logistic_regression.dart
Expand Up @@ -9,7 +9,7 @@ Future binaryClassification() async {
);

final features = (await data.features)
.mapColumns((vector) => vector / vector.norm());
.mapColumns((column) => column.normalize());
final labels = await data.labels;
final validator = CrossValidator.kFold(numberOfFolds: 5);
final logisticRegressor = LinearClassifier.logisticRegressor(
Expand Down
2 changes: 1 addition & 1 deletion example/regression/stochastic_gradient_descent.dart
Expand Up @@ -10,7 +10,7 @@ Future bostonHousingRegression() async {
);

final features = (await data.features)
.mapColumns((vector) => vector / vector.norm());
.mapColumns((column) => column.normalize());
final labels = await data.labels;

final folds = 5;
Expand Down
Expand Up @@ -18,12 +18,12 @@
///
/// '31+' will be encoded as [0.0, 0.0, 1.0]
///
/// Also, we have some data of this category - a list of `'AGE'` values:
/// Let's say, we have some data of this category - a list of `'AGE'` values:
/// ```
/// ['0-17', '0-17', '18-30', '18-30', '18-30', '31+']
/// ```
///
/// After one-hot encoding the data will be look as:
/// After one-hot encoding the data will look like:
/// ```
/// [[1.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
/// ```
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Expand Up @@ -280,7 +280,7 @@ packages:
name: ml_linalg
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.2"
version: "6.1.0"
mockito:
dependency: "direct dev"
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
@@ -1,6 +1,6 @@
name: ml_algo
description: Machine learning algorithms written in native dart (without bindings to any popular ML libraries, just pure Dart implementation)
version: 9.2.2
version: 9.2.3
author: Ilia Gyrdymov <ilgyrd@gmail.com>
homepage: https://github.com/gyrdym/ml_algo

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

dependencies:
csv: ^4.0.0
ml_linalg: ^6.0.2
ml_linalg: ^6.1.0
tuple: ^1.0.2
logging: ^0.11.3+2

Expand Down

0 comments on commit 1b2572a

Please sign in to comment.