File tree Expand file tree Collapse file tree 7 files changed +12
-0
lines changed
online-binary-classification/lib
online-sgd-regression/lib Expand file tree Collapse file tree 7 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ var data = require( './data.js' );
3131*
3232* @param {string } name - dataset name
3333* @param {Options } [options] - dataset options
34+ * @throws {RangeError } unsupported/unrecognized dataset name
3435* @returns {* } dataset
3536*/
3637function datasets ( name ) {
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ var getFile = require( './get_file.js' );
4343* @param {(PositiveInteger|PositiveIntegerArray) } [options.year] - year(s)
4444* @param {PositiveIntegerArray } [options.range] - year range
4545* @param {(string|StringArray) } [options.party] - political party
46+ * @throws {RangeError } unrecognized property value
4647* @returns {ObjectArray } SOTU addresses
4748*
4849* @example
Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ function innerProduct( x ) {
126126* @constructor
127127* @param {PositiveInteger } dim - number of feature weights (excluding bias/intercept term)
128128* @param {boolean } intercept - boolean indicating whether a bias/intercept weight should be implicitly assumed
129+ * @throws {TypeError } first argument must be a positive integer
130+ * @throws {TypeError } second argument must be a boolean primitive
129131*/
130132function WeightVector ( dim , intercept ) {
131133 var i ;
Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ function innerProduct( x ) {
126126* @constructor
127127* @param {PositiveInteger } dim - number of feature weights (excluding bias/intercept term)
128128* @param {boolean } intercept - boolean indicating whether a bias/intercept weight should be implicitly assumed
129+ * @throws {TypeError } first argument must be a positive integer
130+ * @throws {TypeError } second argument must be a boolean primitive
129131*/
130132function WeightVector ( dim , intercept ) {
131133 var i ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ var PMF = require( './pmf.js' );
3030*
3131* @private
3232* @param {string } name - distribution name
33+ * @throws {Error } unsupported/unrecognized distribution name
3334* @returns {Function } PMF
3435*/
3536function getPMF ( name ) {
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ function ascending( a, b ) {
5959* @param {integer } [options.nsteps=3] - number of iterations in the robust fit (fewer iterations translates to faster function execution)
6060* @param {NonNegativeNumber } [options.delta] - nonnegative parameter which may be used to reduce the number of computations
6161* @param {boolean } [options.sorted=false] - boolean indicating if the input array `x` is already in sorted order
62+ * @throws {TypeError } first argument must be a numeric array
63+ * @throws {TypeError } second argument must be a numeric array
64+ * @throws {Error } arguments `x` and `y` must have the same length
6265* @returns {Object } ordered x-values and fitted values
6366*/
6467function main ( x , y , options ) {
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ var roundn = require( '@stdlib/math/base/special/roundn' );
3535* @param {Object } [opts] - options object
3636* @param {PositiveInteger } [opts.numdigits=4] - number of digits after the decimal point
3737* @param {boolean } [opts.decision=true] - boolean indicating whether to print the test decision
38+ * @throws {TypeError } options argument must be an object
39+ * @throws {TypeError } must provide valid options
3840* @returns {string } formatted output
3941*/
4042function print ( opts ) { // eslint-disable-line stdlib/no-redeclare
You can’t perform that action at this time.
0 commit comments