ml_algo 13.3.7

  • Readme
  • Changelog
  • Example
  • Installing
  • 73

Build Status Coverage Status pub package Gitter Chat

Machine learning algorithms with dart #

What is the ml_algo for? #

The main purpose of the library - to give developers, interested both in Dart language and data science, native Dart implementation of machine learning algorithms. This library targeted to dart vm, so, to get smoothest experience with the lib, please, do not use it in a browser.

The library's content #

  • Model selection #

    • CrossValidator. Factory, that creates instances of cross validators. Cross validation allows researchers to fit different hyperparameters of machine learning algorithms, assessing prediction quality on different parts of a dataset.
  • Classification algorithms #

    • LogisticRegressor. A class, that performs linear binary classification of data. To use this kind of classifier your data have to be linearly separable.

    • SoftmaxRegressor. A class, that performs linear multiclass classification of data. To use this kind of classifier your data have to be linearly separable.

    • DecisionTreeClassifier A class, that performs classification, using decision trees. May work with data with non-linear patterns.

    • KnnClassifier A class, that performs classification, using k nearest neighbours algorithm - it makes prediction basing on first k closest observations to the given one.

  • Regression algorithms #

    • LinearRegressor. A class, that finds a linear pattern in training data and predicts a real numbers depending on the pattern.

    • KnnRegressor A class, that makes prediction for each new observation basing on first k closest observations from training data. It may catch non-linear pattern of the data.

Examples #

Logistic regression #

Let's classify records from well-known dataset - Pima Indians Diabets Database via Logistic regressor

Import all necessary packages. First, it's needed to ensure, if you have ml_preprocessing and ml_dataframe package in your dependencies:

dependencies:
  ml_dataframe: ^0.0.11
  ml_preprocessing: ^5.0.1

We need these repos to parse raw data in order to use it farther. For more details, please, visit ml_preprocessing repository page.

import 'dart:async';

import 'package:ml_algo/ml_algo.dart';
import 'package:ml_dataframe/ml_dataframe.dart';
import 'package:ml_preprocessing/ml_preprocessing.dart';

Download dataset from Pima Indians Diabets Database and read it (of course, you should provide a proper path to your downloaded file):

final samples = await fromCsv('datasets/pima_indians_diabetes_database.csv', headerExists: true);

Data in this file is represented by 768 records and 8 features. 9th column is a label column, it contains either 0 or 1 on each row. This column is our target - we should predict a class label for each observation. The column's name is class variable (0 or 1). Let's store it:

final targetColumnName = 'class variable (0 or 1)';

Then, we should create an instance of CrossValidator class for fitting hyperparameters of our model. We should pass training data (our samples variable), a list of target column names (in our case it's just a name stored in targetColumnName variable) and a number of folds into CrossValidator constructor.

final validator = CrossValidator.KFold(samples, [targetColumnName], numberOfFolds: 5);

All are set, so, we can do our classification.

Evaluate our model via accuracy metric:

final accuracy = validator.evaluate((samples, targetNames) => 
    LogisticRegressor(
        samples,
        targetNames[0], // remember, we provided a list of just a single name
        optimizerType: LinearOptimizerType.gradient,  
        initialLearningRate: .8,
        iterationsLimit: 500,
        batchSize: samples.rows.length,
        fitIntercept: true,
        interceptScale: .1,
        learningRateType: LearningRateType.constant
    ), MetricType.accuracy);

Let's print the score:

print('accuracy on classification: ${accuracy.toStringAsFixed(2)}');

We will see something like this:

acuracy on classification: 0.77

All the code above all together:

import 'package:ml_algo/ml_algo.dart';
import 'package:ml_dataframe/ml_dataframe.dart';
import 'package:ml_preprocessing/ml_preprocessing.dart';

Future main() async {
  final samples = await fromCsv('datasets/pima_indians_diabetes_database.csv', headerExists: true);
  final targetColumnName = 'class variable (0 or 1)';
  final validator = CrossValidator.KFold(samples, [targetColumnName], numberOfFolds: 5);
  final accuracy = validator.evaluate((samples, targetNames) => 
      LogisticRegressor(
          samples,
          targetNames[0], // remember, we provide a list of just a single name
          optimizerType: LinearOptimizerType.gradient,  
          initialLearningRate: .8,
          iterationsLimit: 500,
          batchSize: 768,
          fitIntercept: true,
          interceptScale: .1,
          learningRateType: LearningRateType.constant
      ), MetricType.accuracy);

  print('accuracy on classification: ${accuracy.toStringFixed(2)}');
}

K nearest neighbour regression #

Let's do some prediction with a well-known non-parametric regression algorithm - k nearest neighbours. Let's take a state of the art dataset - boston housing.

As usual, import all necessary packages

import 'package:ml_algo/ml_algo.dart';
import 'package:ml_dataframe/ml_dataframe.dart';
import 'package:ml_preprocessing/ml_preprocessing.dart';

and download and read the data

final samples = await fromCsv('lib/_datasets/housing.csv',
    headerExists: false,
    fieldDelimiter: ' ',
);

As you can see, the dataset is headless, that means, that there is no a descriptive line in the beginning of the file. So, we may use an autogenerated header in order to point, from what column we should take our target labels:

print(samples.header);

It will output the following:

(col_0, col_1, col_2, col_3, col_4, col_5, col_6, col_7, col_8, col_9, col_10, col_11, col_12, col_13)

Our target is col_13. Let's store it:

final targetColumnName = 'col_13';

Let's create a cross-validator instance:

final validator = CrossValidator.KFold(samples, [targetColumnName], numberOfFolds: 5);

Let the k parameter be equal to 4.

Assess a knn regressor with the chosen k value using MAPE metric

final error = validator.evaluate((samples, targetNames) => 
  KnnRegressor(samples, targetNames[0], 4), MetricType.mape);

Let's print our error

print('MAPE error on k-fold validation: ${error.toStringAsFixed(2)}%'); // it yields approx. 6.18

Contacts #

If you have questions, feel free to write me on

Changelog #

13.3.7 #

  • TreeLeafLabel: probability validation improvements

13.3.6 #

  • DecisionTreeClassifier: classifier instantiating refactored
  • TreeSolver: DI support added

13.3.5 #

  • SoftmaxRegressor: classifier instantiating refactored

13.3.4 #

  • LogisticRegressor: classifier instantiating refactored

13.3.3 #

  • KnnClassifierImpl: unit tests for predictProbability method added

13.3.2 #

  • KnnClassifier: classifier instantiating refactored

13.3.1 #

  • readme: KnnRegressor usage example fixed

13.3.0 #

  • KnnClassifier class added

13.2.0 #

  • KNN algorithm: standardization for distance added
  • KnnRegressor:
    • default kernel changed to gaussian
    • k parameter is required now

13.1.1 #

  • KNN regression: documentation for kernel function types added
  • KnnRegressor: finding weighted average using kernel function fixed

13.1.0 #

  • CrossValidator: onDataSplit hook added

13.0.0 #

  • Predictor's API: DataFrame used instead of Matrix
  • DecisionTreeSolver: data splitting logic fixed

12.1.2 #

  • xrange package version locked

12.1.1 #

  • ml_linalg 11.0.0 supported
  • Unit tests: iterable2dAlmostEqualTo and iterableAlmostEqualTo matchers used from ml_tech

12.1.0 #

  • Decision tree classifier added

12.0.2 #

  • ScoreToProbMapperFactory removed
  • ScoreToProbMapperType enum removed
  • ScoreToProbMapper: the entity renamed to LinkFunction

12.0.1 #

  • Cost function factory removed
  • Cost function type removed

12.0.0 #

  • Breaking change: GradientType enum removed
  • Breaking change: OptimizerType enum removed
  • Breaking change, Predictor: fit method removed, fitting is happening while a model is being created
  • Breaking change, Predictor: interface replaced with Assessable, redundant properties removed
  • Breaking change: LinearClassifier reorganized
  • Optimizers now have immutable state
  • InterceptPreprocessor replaced with a helper function addInterceptIf

11.0.1 #

  • Cross validator refactored
  • Data splitters refactored
  • Unit tests for cross validator added

11.0.0 #

  • Added immutable state to all the predictor subclasses

10.3.0 #

  • kernels added:
    • uniform
    • epanechnikov
    • cosine
    • gaussian
  • NoNParametricRegressor.nearestNeighbour: added possibility to specify the kernel function

10.2.1 #

  • test coverage restored

10.2.0 #

  • NoNParametricRegressor class added
  • KNNRegressor class added
  • ml_linalg v9.0.0 supported

10.1.0 #

  • ml_linalg v7.0.0 support

10.0.0 #

  • Data preprocessing: all the entities moved to separate repo - ml_preprocessing

9.2.4 #

  • Data preprocessing: All categorical values are now converted to String type

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

9.2.1 #

  • README corrected

9.2.0 #

  • LinearClassifier.logisticRegressor: numerical stability improved
  • LinearClassifier.logisticRegressor: probabilityThreshold parameter added
  • DataFrame.fromCsv: parameter fieldDelimiter added

9.1.0 #

  • DataFrame: labelName parameter added

9.0.0 #

  • ml_linalg v6.0.2 supported
  • Classifier: type of weightsByClasses changed from Map to Matrix
  • SoftmaxRegressor: more detailed unit tests for softmax regression added
  • Data preprocessing: DataFrame introduced (former MLData)

8.0.0 #

  • LinearClassifier.softmaxRegressor implemented
  • Metric interface refactored (getError renamed to getScore)

7.2.0 #

  • SoftmaxMapper added (aka Softmax activation function)

7.1.0 #

  • ConvergenceDetector added (this entity stops the optimizer when it is needed)

7.0.0 #

  • All the exports packed into ml_algo entry

6.2.0 #

  • Coefficients in optimizers now are a matrix
  • InitialWeightsGenerator instantiating fixed: dtype is passed now

6.1.0 #

  • LinkFunction renamed to ScoreToProbMapper
  • ScoreToProbMapper accepts vector and returns vector instead of a scalar

6.0.6 #

  • Pedantic package integration added
  • Some linter issues fixed

6.0.5 #

  • Coveralls integration added
  • dartfm check task added

6.0.4 #

  • Documentation for linear regression corrected
  • Documentation for MLData corrected

6.0.3 #

  • Documentation for logistic regression corrected

6.0.2 #

  • Tests corrected: removed import test_api.dart

6.0.1 #

  • Readme corrected

6.0.0 #

  • Library fully refactored:
    • add possibility to set certain data type for numeric computations
    • all algorithms now are more generic
    • a lot of unit tests added
    • bug fixes

5.2.0 #

  • Ordinal encoder added
  • Float32x4CsvMlData significantly extended

5.1.0 #

  • Real-life example added (black friday dataset)
  • rows parameter added to Float32x4CsvMlData
  • Unknown categorical values handling strategy types added

5.0.0 #

  • One hot encoder integrated into CSV ML data

4.3.3 #

  • Performance test for one hot encoder added

4.3.2 #

  • One hot encoder implemented

4.3.1 #

  • enum for categorical data encoding added

4.3.0 #

  • Cross validator factory added
  • README updated

4.2.0 #

  • csv-parser added

4.1.0 #

  • ml_linalg removed from export file
  • README refreshed
  • General datasets directory created

4.0.0 #

  • ml_linal ^4.0.0 supported

3.5.4 #

  • README.md updated
  • build_runner dependency updated

3.5.3 #

  • dartfmt tool applied to all necessary files

3.5.2 #

  • Travis configuration file name corrected

3.5.1 #

  • Travis integration added

3.5.0 #

  • Vectorized cost functions applied

3.4.0 #

  • ml_linalg 2.0.0 supported

3.3.0 #

  • Matrix-based gradient calculation added for log likelihood cost function

3.2.0 #

  • Matrix-based gradient calculation added for squared cost function

3.1.2 #

  • Description corrected

3.1.1 #

  • dartfm tool applied

3.1.0 #

  • Get rid of MLVector's deprecated methods

3.0.0 #

  • Library public release

2.0.0 #

  • ml_linalg supported

1.2.1 #

  • subVector -> subvector

1.2.0 #

  • Matrices support added

1.1.1 #

  • Examples fixed, dependencies fixed

1.1.0 #

  • Support of updated linalg package

1.0.1 #

  • Readme updated, dependencies fixed

1.0.0 #

  • Migration to dart 2.0

0.38.1 #

0.38.0 #

  • Lasso solution refactored

0.37.0 #

  • Support of linalg package (former simd_vector)

0.36.0 #

  • Intercept term considered (fitIntercept and interceptScale parameters)

0.35.1 #

  • Logistic regression tests improved

0.35.0 #

  • One versus all refactored, tests for logistic regression added

0.34.0 #

  • One versus all classifier

0.33.0 #

  • Gradient descent regressor type enum added

0.32.1 #

  • Gradient optimizer unit tests

0.32.0 #

  • Get rid of derivative computation

0.31.0 #

  • Get rid of di package usage

0.30.1 #

  • File structure flattened

0.30.0 #

  • Redundant gradient optimizers removed

0.29.0 #

  • part ... part of directives removed

0.28.0 #

  • Coordinate descent optimizer added
  • Lasso regressor added

0.27.0 #

  • Gradient calculation changed

0.26.1 #

  • Code was optimized (removed unnecessary)
  • Refactoring

0.26.0 #

  • More distinct modularity was added to the library
  • Unit tests were fixed

0.25.0 #

  • Tests for gradient optimizers were added
  • Gradient calculator was created as a separate entity
  • Initial weights generator was created as a separate entity
  • Learning rate generator was created as a separate entity

0.24.0 #

  • All implementations were hidden

0.23.0 #

  • findMaxima and findMinima methods were added to Optimizer interface

0.22.0 #

  • File structure reorganized, predictor classes refactored
  • README.md updated

0.21.0 #

  • Logistic regression model added (with example)

0.20.2 #

  • README.md updated

0.20.1 #

  • simd_vector dependency url fixed

0.20.0 #

  • Repository dependency corrected (dart_vector -> simd_vector)

0.19.0 #

  • Support for Float32x4Vector class was added (from dart_vector library)
  • Type List for label (target) list replaced with Float32List (in Predictor.train() and Optimizer.optimize())

0.18.0 #

  • class Vector and enum Norm were extracted to separate library (https://github.com/gyrdym/dart_vector.git)

0.17.0 #

  • Common interface for loss function was added
  • Derivative calculation was fixed (common canonical method was used)
  • Squared loss function was added as a separate class

0.16.0 #

  • README.md was actualized

0.15.0 #

  • Tests for gradient optimizers were added
  • Interfaces (almost for all entities) for DI and IOC mechanism were added
  • Randomizer class was added
  • Removed separate classes for k-fold cross validation and lpo cross validation, now it resides in CrossValidation class

0.14.0 #

  • L1 and L2 regularization added

0.13.0 #

  • Script for running all unit tests added

0.12.0 #

  • Vector interface removed
  • Regular vector implementation removed
  • TypedVector -> Vector
  • Implicit vectors constructing replaced with explicit new-instantiation

0.11.0 #

  • Entity names correction

0.10.0 #

  • K-fold cross validation added (KFoldCrossValidation)
  • Leave P out cross validation added (LpoCrossValidation)
  • DataTrainTestSplitter was removed

0.9.0 #

  • copy, fill methods were added to Vector

0.8.0 #

  • Reflection was removed for all cases (Vector instantiation, Optimizer instantiation)

0.7.0 #

  • Abstract Vector-class was added as a base for typed and regular vector classes

0.6.0 #

  • Manhattan norm support was added

0.5.2 #

  • README file was extended and clarified

0.5.1 #

  • Random interval obtaining for the mini-batch gradient descent was fixed

0.5.0 #

  • BGDOptimizer, MBGDOptimizer and GradientOptimizer were added

0.4.0 #

  • OptimizerInterface was added
  • Stochastic gradient descent optimizer was extracted from the linear regressor class
  • Line separators changed for all files (CRLF -> LF)

0.3.1 #

  • tests for sum, abs, fromRange methods of the TypedVector were added
  • tests for DataTrainTestSplitter was added

0.3.0 #

  • MAPE cost function was added

0.2.0 #

  • SGD Regressor refactored (rmse on training removed, estimator added) + example extended

0.1.0 #

  • Implementation of -, *, / operators and all vectors methods added to the TypedVector

0.0.1 #

  • Initial version

example/main.dart

import 'package:ml_algo/ml_algo.dart';
import 'package:ml_dataframe/ml_dataframe.dart';

/// A simple usage example using synthetic data. To see more complex examples,
/// please, visit other directories in this folder
Future main() async {
  // Let's create a dataframe with fitting data, let's assume, that the target
  // column is the fifth column (column with index 4)
  final dataFrame = DataFrame(<Iterable<num>>[
    [ 2,  3, 4,  5, 4.3],
    [12, 32, 1,  3, 3.5],
    [27,  3, 0, 59, 2.1],
  ], headerExists: false);

  // Let's create a regressor itself and train it
  final regressor = LinearRegressor(
      dataFrame, 'col_4',
      iterationsLimit: 100,
      initialLearningRate: 0.0005,
      learningRateType: LearningRateType.constant);

  // Let's see adjusted coefficients
  print('Regression coefficients: ${regressor.coefficients}');
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ml_algo: ^13.3.7

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ml_algo/ml_algo.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
51
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Nov 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:ml_algo/ml_algo.dart with components: io.

Health suggestions

Fix lib/src/classifier/logistic_regressor/logistic_regressor_factory.dart. (-1 points)

Analysis of lib/src/classifier/logistic_regressor/logistic_regressor_factory.dart reported 2 hints:

line 2 col 8: Unused import: 'package:ml_algo/src/linear_optimizer/linear_optimizer.dart'.

line 6 col 8: Unused import: 'package:ml_linalg/vector.dart'.

Fix lib/src/linear_optimizer/convergence_detector/convergence_detector.dart. (-0.50 points)

Analysis of lib/src/linear_optimizer/convergence_detector/convergence_detector.dart reported 1 hint:

line 1 col 1: Prefer using /// for doc comments.

Format lib/src/classifier/_helpers/log_likelihood_optimizer_factory.dart.

Run dartfmt to format lib/src/classifier/_helpers/log_likelihood_optimizer_factory.dart.

Fix additional 94 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/classifier/_mixins/linear_classifier_mixin.dart (Run dartfmt to format lib/src/classifier/_mixins/linear_classifier_mixin.dart.)
  • lib/src/classifier/decision_tree_classifier/decision_tree_classifier.dart (Run dartfmt to format lib/src/classifier/decision_tree_classifier/decision_tree_classifier.dart.)
  • lib/src/classifier/decision_tree_classifier/decision_tree_classifier_factory.dart (Run dartfmt to format lib/src/classifier/decision_tree_classifier/decision_tree_classifier_factory.dart.)
  • lib/src/classifier/decision_tree_classifier/decision_tree_classifier_factory_impl.dart (Run dartfmt to format lib/src/classifier/decision_tree_classifier/decision_tree_classifier_factory_impl.dart.)
  • lib/src/classifier/decision_tree_classifier/decision_tree_classifier_impl.dart (Run dartfmt to format lib/src/classifier/decision_tree_classifier/decision_tree_classifier_impl.dart.)
  • lib/src/classifier/knn_classifier/_helpers/create_knn_classifier.dart (Run dartfmt to format lib/src/classifier/knn_classifier/_helpers/create_knn_classifier.dart.)
  • lib/src/classifier/knn_classifier/knn_classifier.dart (Run dartfmt to format lib/src/classifier/knn_classifier/knn_classifier.dart.)
  • lib/src/classifier/knn_classifier/knn_classifier_factory.dart (Run dartfmt to format lib/src/classifier/knn_classifier/knn_classifier_factory.dart.)
  • lib/src/classifier/knn_classifier/knn_classifier_factory_impl.dart (Run dartfmt to format lib/src/classifier/knn_classifier/knn_classifier_factory_impl.dart.)
  • lib/src/classifier/knn_classifier/knn_classifier_impl.dart (Run dartfmt to format lib/src/classifier/knn_classifier/knn_classifier_impl.dart.)
  • lib/src/classifier/linear_classifier.dart (Run dartfmt to format lib/src/classifier/linear_classifier.dart.)
  • lib/src/classifier/logistic_regressor/_helpers/create_logistic_regressor.dart (Run dartfmt to format lib/src/classifier/logistic_regressor/_helpers/create_logistic_regressor.dart.)
  • lib/src/classifier/logistic_regressor/logistic_regressor.dart (Run dartfmt to format lib/src/classifier/logistic_regressor/logistic_regressor.dart.)
  • lib/src/classifier/logistic_regressor/logistic_regressor_factory_impl.dart (Run dartfmt to format lib/src/classifier/logistic_regressor/logistic_regressor_factory_impl.dart.)
  • lib/src/classifier/logistic_regressor/logistic_regressor_impl.dart (Run dartfmt to format lib/src/classifier/logistic_regressor/logistic_regressor_impl.dart.)
  • lib/src/classifier/softmax_regressor/_helpers/create_softmax_regressor.dart (Run dartfmt to format lib/src/classifier/softmax_regressor/_helpers/create_softmax_regressor.dart.)
  • lib/src/classifier/softmax_regressor/softmax_regressor.dart (Run dartfmt to format lib/src/classifier/softmax_regressor/softmax_regressor.dart.)
  • lib/src/classifier/softmax_regressor/softmax_regressor_factory.dart (Run dartfmt to format lib/src/classifier/softmax_regressor/softmax_regressor_factory.dart.)
  • lib/src/classifier/softmax_regressor/softmax_regressor_factory_impl.dart (Run dartfmt to format lib/src/classifier/softmax_regressor/softmax_regressor_factory_impl.dart.)
  • lib/src/classifier/softmax_regressor/softmax_regressor_impl.dart (Run dartfmt to format lib/src/classifier/softmax_regressor/softmax_regressor_impl.dart.)
  • lib/src/common/sequence_elements_distribution_calculator/distribution_calculator_factory_impl.dart (Run dartfmt to format lib/src/common/sequence_elements_distribution_calculator/distribution_calculator_factory_impl.dart.)
  • lib/src/common/sequence_elements_distribution_calculator/distribution_calculator_impl.dart (Run dartfmt to format lib/src/common/sequence_elements_distribution_calculator/distribution_calculator_impl.dart.)
  • lib/src/cost_function/cost_function_factory.dart (Run dartfmt to format lib/src/cost_function/cost_function_factory.dart.)
  • lib/src/cost_function/cost_function_factory_impl.dart (Run dartfmt to format lib/src/cost_function/cost_function_factory_impl.dart.)
  • lib/src/cost_function/log_likelihood.dart (Run dartfmt to format lib/src/cost_function/log_likelihood.dart.)
  • lib/src/cost_function/squared.dart (Run dartfmt to format lib/src/cost_function/squared.dart.)
  • lib/src/di/dependencies.dart (Run dartfmt to format lib/src/di/dependencies.dart.)
  • lib/src/helpers/add_intercept_if.dart (Run dartfmt to format lib/src/helpers/add_intercept_if.dart.)
  • lib/src/helpers/features_target_split.dart (Run dartfmt to format lib/src/helpers/features_target_split.dart.)
  • lib/src/helpers/get_probabilities.dart (Run dartfmt to format lib/src/helpers/get_probabilities.dart.)
  • lib/src/helpers/validate_initial_coefficients.dart (Run dartfmt to format lib/src/helpers/validate_initial_coefficients.dart.)
  • lib/src/knn_kernel/epanechnikov_kernel.dart (Run dartfmt to format lib/src/knn_kernel/epanechnikov_kernel.dart.)
  • lib/src/knn_kernel/gaussian_kernel.dart (Run dartfmt to format lib/src/knn_kernel/gaussian_kernel.dart.)
  • lib/src/knn_kernel/uniform_kernel.dart (Run dartfmt to format lib/src/knn_kernel/uniform_kernel.dart.)
  • lib/src/knn_solver/knn_solver_factory.dart (Run dartfmt to format lib/src/knn_solver/knn_solver_factory.dart.)
  • lib/src/knn_solver/knn_solver_factory_impl.dart (Run dartfmt to format lib/src/knn_solver/knn_solver_factory_impl.dart.)
  • lib/src/knn_solver/knn_solver_impl.dart (Run dartfmt to format lib/src/knn_solver/knn_solver_impl.dart.)
  • lib/src/linear_optimizer/coordinate_optimizer/coordinate_descent_optimizer.dart (Run dartfmt to format lib/src/linear_optimizer/coordinate_optimizer/coordinate_descent_optimizer.dart.)
  • lib/src/linear_optimizer/gradient_optimizer/gradient_optimizer.dart (Run dartfmt to format lib/src/linear_optimizer/gradient_optimizer/gradient_optimizer.dart.)
  • lib/src/linear_optimizer/initial_coefficients_generator/initial_coefficients_generator_factory.dart (Run dartfmt to format lib/src/linear_optimizer/initial_coefficients_generator/initial_coefficients_generator_factory.dart.)
  • lib/src/linear_optimizer/initial_coefficients_generator/initial_coefficients_generator_factory_impl.dart (Run dartfmt to format lib/src/linear_optimizer/initial_coefficients_generator/initial_coefficients_generator_factory_impl.dart.)
  • lib/src/linear_optimizer/linear_optimizer.dart (Run dartfmt to format lib/src/linear_optimizer/linear_optimizer.dart.)
  • lib/src/linear_optimizer/linear_optimizer_factory.dart (Run dartfmt to format lib/src/linear_optimizer/linear_optimizer_factory.dart.)
  • lib/src/linear_optimizer/linear_optimizer_factory_impl.dart (Run dartfmt to format lib/src/linear_optimizer/linear_optimizer_factory_impl.dart.)
  • lib/src/link_function/link_function_factory.dart (Run dartfmt to format lib/src/link_function/link_function_factory.dart.)
  • lib/src/link_function/link_function_factory_impl.dart (Run dartfmt to format lib/src/link_function/link_function_factory_impl.dart.)
  • lib/src/link_function/logit/float32_inverse_logit_link_function_mixin.dart (Run dartfmt to format lib/src/link_function/logit/float32_inverse_logit_link_function_mixin.dart.)
  • lib/src/link_function/logit/inverse_logit_link_function.dart (Run dartfmt to format lib/src/link_function/logit/inverse_logit_link_function.dart.)
  • lib/src/link_function/softmax/float32_softmax_link_function_mixin.dart (Run dartfmt to format lib/src/link_function/softmax/float32_softmax_link_function_mixin.dart.)
  • lib/src/link_function/softmax/softmax_link_function.dart (Run dartfmt to format lib/src/link_function/softmax/softmax_link_function.dart.)
  • lib/src/metric/regression/mape.dart (Run dartfmt to format lib/src/metric/regression/mape.dart.)
  • lib/src/model_selection/cross_validator/cross_validator.dart (Run dartfmt to format lib/src/model_selection/cross_validator/cross_validator.dart.)
  • lib/src/model_selection/cross_validator/cross_validator_impl.dart (Run dartfmt to format lib/src/model_selection/cross_validator/cross_validator_impl.dart.)
  • lib/src/model_selection/data_splitter/data_splitter_factory.dart (Run dartfmt to format lib/src/model_selection/data_splitter/data_splitter_factory.dart.)
  • lib/src/model_selection/data_splitter/data_splitter_factory_impl.dart (Run dartfmt to format lib/src/model_selection/data_splitter/data_splitter_factory_impl.dart.)
  • lib/src/model_selection/data_splitter/data_splitter_type.dart (Run dartfmt to format lib/src/model_selection/data_splitter/data_splitter_type.dart.)
  • lib/src/model_selection/data_splitter/k_fold_data_splitter.dart (Run dartfmt to format lib/src/model_selection/data_splitter/k_fold_data_splitter.dart.)
  • lib/src/predictor/assessable_predictor_mixin.dart (Run dartfmt to format lib/src/predictor/assessable_predictor_mixin.dart.)
  • lib/src/regressor/_helpers/squared_cost_optimizer_factory.dart (Run dartfmt to format lib/src/regressor/_helpers/squared_cost_optimizer_factory.dart.)
  • lib/src/regressor/knn_regressor/knn_regressor.dart (Run dartfmt to format lib/src/regressor/knn_regressor/knn_regressor.dart.)
  • lib/src/regressor/knn_regressor/knn_regressor_factory.dart (Run dartfmt to format lib/src/regressor/knn_regressor/knn_regressor_factory.dart.)
  • lib/src/regressor/knn_regressor/knn_regressor_factory_impl.dart (Run dartfmt to format lib/src/regressor/knn_regressor/knn_regressor_factory_impl.dart.)
  • lib/src/regressor/knn_regressor/knn_regressor_impl.dart (Run dartfmt to format lib/src/regressor/knn_regressor/knn_regressor_impl.dart.)
  • lib/src/regressor/linear_regressor/linear_regressor.dart (Run dartfmt to format lib/src/regressor/linear_regressor/linear_regressor.dart.)
  • lib/src/regressor/linear_regressor/linear_regressor_impl.dart (Run dartfmt to format lib/src/regressor/linear_regressor/linear_regressor_impl.dart.)
  • lib/src/tree_solver/_helpers/create_decision_tree_solver.dart (Run dartfmt to format lib/src/tree_solver/_helpers/create_decision_tree_solver.dart.)
  • lib/src/tree_solver/decision_tree_solver.dart (Run dartfmt to format lib/src/tree_solver/decision_tree_solver.dart.)
  • lib/src/tree_solver/leaf_detector/leaf_detector.dart (Run dartfmt to format lib/src/tree_solver/leaf_detector/leaf_detector.dart.)
  • lib/src/tree_solver/leaf_detector/leaf_detector_factory.dart (Run dartfmt to format lib/src/tree_solver/leaf_detector/leaf_detector_factory.dart.)
  • lib/src/tree_solver/leaf_detector/leaf_detector_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/leaf_detector/leaf_detector_factory_impl.dart.)
  • lib/src/tree_solver/leaf_detector/leaf_detector_impl.dart (Run dartfmt to format lib/src/tree_solver/leaf_detector/leaf_detector_impl.dart.)
  • lib/src/tree_solver/leaf_label/leaf_label.dart (Run dartfmt to format lib/src/tree_solver/leaf_label/leaf_label.dart.)
  • lib/src/tree_solver/leaf_label/leaf_label_factory_factory.dart (Run dartfmt to format lib/src/tree_solver/leaf_label/leaf_label_factory_factory.dart.)
  • lib/src/tree_solver/leaf_label/leaf_label_factory_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/leaf_label/leaf_label_factory_factory_impl.dart.)
  • lib/src/tree_solver/leaf_label/majority_leaf_label_factory.dart (Run dartfmt to format lib/src/tree_solver/leaf_label/majority_leaf_label_factory.dart.)
  • lib/src/tree_solver/split_assessor/majority_split_assessor.dart (Run dartfmt to format lib/src/tree_solver/split_assessor/majority_split_assessor.dart.)
  • lib/src/tree_solver/split_assessor/split_assessor.dart (Run dartfmt to format lib/src/tree_solver/split_assessor/split_assessor.dart.)
  • lib/src/tree_solver/split_assessor/split_assessor_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/split_assessor/split_assessor_factory_impl.dart.)
  • lib/src/tree_solver/split_selector/greedy_split_selector.dart (Run dartfmt to format lib/src/tree_solver/split_selector/greedy_split_selector.dart.)
  • lib/src/tree_solver/split_selector/split_selector.dart (Run dartfmt to format lib/src/tree_solver/split_selector/split_selector.dart.)
  • lib/src/tree_solver/split_selector/split_selector_factory.dart (Run dartfmt to format lib/src/tree_solver/split_selector/split_selector_factory.dart.)
  • lib/src/tree_solver/split_selector/split_selector_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/split_selector/split_selector_factory_impl.dart.)
  • lib/src/tree_solver/splitter/greedy_splitter.dart (Run dartfmt to format lib/src/tree_solver/splitter/greedy_splitter.dart.)
  • lib/src/tree_solver/splitter/nominal_splitter/nominal_splitter.dart (Run dartfmt to format lib/src/tree_solver/splitter/nominal_splitter/nominal_splitter.dart.)
  • lib/src/tree_solver/splitter/nominal_splitter/nominal_splitter_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/splitter/nominal_splitter/nominal_splitter_factory_impl.dart.)
  • lib/src/tree_solver/splitter/nominal_splitter/nominal_splitter_impl.dart (Run dartfmt to format lib/src/tree_solver/splitter/nominal_splitter/nominal_splitter_impl.dart.)
  • lib/src/tree_solver/splitter/numerical_splitter/numerical_splitter.dart (Run dartfmt to format lib/src/tree_solver/splitter/numerical_splitter/numerical_splitter.dart.)
  • lib/src/tree_solver/splitter/numerical_splitter/numerical_splitter_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/splitter/numerical_splitter/numerical_splitter_factory_impl.dart.)
  • lib/src/tree_solver/splitter/numerical_splitter/numerical_splitter_impl.dart (Run dartfmt to format lib/src/tree_solver/splitter/numerical_splitter/numerical_splitter_impl.dart.)
  • lib/src/tree_solver/splitter/splitter.dart (Run dartfmt to format lib/src/tree_solver/splitter/splitter.dart.)
  • lib/src/tree_solver/splitter/splitter_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/splitter/splitter_factory_impl.dart.)
  • lib/src/tree_solver/tree_node.dart (Run dartfmt to format lib/src/tree_solver/tree_node.dart.)
  • lib/src/tree_solver/tree_solver_factory.dart (Run dartfmt to format lib/src/tree_solver/tree_solver_factory.dart.)
  • lib/src/tree_solver/tree_solver_factory_impl.dart (Run dartfmt to format lib/src/tree_solver/tree_solver_factory_impl.dart.)

Maintenance suggestions

The package description is too short. (-10 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.1 <3.0.0
injector ^1.0.8 1.0.8
ml_dataframe 0.0.11 0.0.11
ml_linalg ^12.3.0 12.6.0
quiver ^2.0.2 2.1.2+1
xrange 0.0.8 0.0.8
Transitive dependencies
csv 4.0.3
matcher 0.12.6
meta 1.1.8
path 1.6.4
stack_trace 1.9.3
Dev dependencies
benchmark_harness >=1.0.0 <2.0.0
build_runner ^1.1.2
build_test ^0.10.2
grinder ^0.8.3
ml_tech ^0.0.8
mockito ^3.0.0
test ^1.2.0