(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(["exports", "rxjs/operators", "../internals/modelTrainer", "./predict"], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports, require("rxjs/operators"), require("../internals/modelTrainer"), require("./predict"));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, global.operators, global.modelTrainer, global.predict);
    global.classifier = mod.exports;
  }
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _operators, _modelTrainer, _predict) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.default = void 0;
  _modelTrainer = _interopRequireDefault(_modelTrainer);
  _predict = _interopRequireDefault(_predict);

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  const classifier = function classifier({
    learningRate = 0.3,
    initialState = {}
  }) {
    return source$ => source$.pipe((0, _modelTrainer.default)({
      learningRate,
      initialIntercept: initialState.intercept || 0,
      initialWeights: initialState.weights
    }));
  };

  var _default = classifier;
  _exports.default = _default;
});
//# sourceMappingURL=classifier.js.map