ml_algo 13.3.4 copy "ml_algo: ^13.3.4" to clipboard
ml_algo: ^13.3.4 copied to clipboard

outdated

Machine learning algorithms written in native dart

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}');
}
103
likes
0
pub points
82%
popularity

Publisher

verified publisherml-algo.com

Machine learning algorithms written in native dart

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

injector, ml_dataframe, ml_linalg, quiver, xrange

More

Packages that depend on ml_algo