diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/README.md b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/README.md new file mode 100644 index 000000000000..65a3f5553567 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/README.md @@ -0,0 +1,234 @@ + + +# squaredHinge + +> Compute the [squared hinge loss][squared-hinge-loss]. + +
+ +The [squared hinge loss][squared-hinge-loss] is defined as + + + +```math +\ell(t, y, p) = \begin{cases} (t - yp)^2 & \text{if } yp \leq t \\ 0 & \text{otherwise} \end{cases} +``` + + + +
+ + + +
+ +## Usage + +```javascript +var squaredHinge = require( '@stdlib/ml/base/loss/float64/squared-hinge' ); +``` + +#### squaredHinge( t, y, p ) + +Computes the [squared hinge loss][squared-hinge-loss]. + +```javascript +var v = squaredHinge( 1.0, 1.0, 0.782 ); +// returns ~0.0475 + +v = squaredHinge( 1.0, 1.0, -0.999 ); +// returns ~3.996 +``` + +The function accepts the following arguments: + +- **t**: margin threshold. +- **y**: true target value. +- **p**: predicted value. + +If any argument is `NaN`, the function returns `NaN`. + +```javascript +var v = squaredHinge( NaN, 1.0, 0.782 ); +// returns NaN + +v = squaredHinge( 1.0, NaN, 0.782 ); +// returns NaN + +v = squaredHinge( 1.0, 1.0, NaN ); +// returns NaN + +v = squaredHinge( NaN, NaN, NaN ); +// returns NaN +``` + +If `y` is not +1 or -1, the function returns `NaN`. + +```javascript +var v = squaredHinge( 1.0, -0.9, 1.0 ); +// returns NaN + +v = squaredHinge( 1.0, 0.453, 0.76 ); +// returns NaN +``` + +
+ + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var sample = require( '@stdlib/random/sample' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var squaredHinge = require( '@stdlib/ml/base/loss/float64/squared-hinge' ); + +var y = sample( [ -1.0, 1.0 ], { + 'size': 100 +}); +var opts = { + 'dtype': 'float64' +}; +var t = uniform( 100, 0.0, 5.0, opts ); +var p = uniform( 100, -5.0, 5.0, opts ); + +logEachMap( 'squaredHinge(%0.4f, %0.4f, %0.4f) = %0.4f', t, y, p, squaredHinge ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/ml/base/loss/float64/squared_hinge.h" +``` + +#### stdlib_base_float64_squared_hinge( t, y, p ) + +Computes the [squared hinge loss][squared-hinge-loss]. + +```c +double out = stdlib_base_float64_squared_hinge( 1.0, 1.0, 0.782 ); +// returns ~0.0475 +``` + +The function accepts the following arguments: + +- **t**: `[in] double` margin threshold. +- **y**: `[in] double` true target value. +- **p**: `[in] double` predicted value. + +```c +double stdlib_base_float64_squared_hinge( const double t, const double y, const double p ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/ml/base/loss/float64/squared_hinge.h" +#include + +int main( void ) { + const double t[] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 }; + const double y[] = { -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; + const double p[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 }; + + double v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_float64_squared_hinge( t[ i ], y[ i ], p[ i ] ); + printf( "squaredHinge(%lf, %lf, %lf) = %lf\n", t[ i ], y[ i ], p[ i ], v ); + } +} +``` + +
+ + + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/benchmark.js b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/benchmark.js new file mode 100644 index 000000000000..74531abc910f --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/benchmark.js @@ -0,0 +1,59 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var sample = require( '@stdlib/random/sample' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pkg = require( './../package.json' ).name; +var squaredHinge = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var len; + var y; + var p; + var v; + var i; + + len = 100; + y = sample( [ -1.0, 1.0 ], { + 'size': len + }); + p = uniform( len, -2.0, 2.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = squaredHinge( 1.0, y[ i%y.length ], p[ i%p.length ] ); + if ( isnan( v ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( v ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/benchmark.native.js new file mode 100644 index 000000000000..606314238156 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/benchmark.native.js @@ -0,0 +1,69 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var sample = require( '@stdlib/random/sample' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var squaredHinge = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( squaredHinge instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var len; + var y; + var p; + var v; + var i; + + len = 100; + y = sample( [ -1.0, 1.0 ], { + 'size': len + }); + p = uniform( len, -2.0, 2.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = squaredHinge( 1.0, y[ i%y.length ], p[ i%p.length ] ); + if ( isnan( v ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( v ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/c/native/Makefile b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/c/native/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/c/native/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/c/native/benchmark.c new file mode 100644 index 000000000000..9df84f2ce88b --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/benchmark/c/native/benchmark.c @@ -0,0 +1,157 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/ml/base/loss/float64/squared_hinge.h" +#include +#include +#include +#include +#include + +#define NAME "squared_hinge" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +/** +* Randomly samples either +1 or -1. +* +* @return randomly sampled value (+1 or -1) +*/ +static double random_sample( void ) { + double v = (double)rand() / ( (double)RAND_MAX ); + if ( v >= 0.5 ) { + return 1.0; + } + return -1.0; +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double *p; + double *y; + double v; + double t; + int i; + + p = (double *) malloc( 100 * sizeof( double ) ); + y = (double *) malloc( 100 * sizeof( double ) ); + for ( i = 0; i < 100; i++ ) { + y[ i ] = random_sample(); + p[ i ] = random_uniform( -2.0, 2.0 ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + v = stdlib_base_float64_squared_hinge( 1.0, y[ i % 100 ], p[ i % 100 ] ); + if ( v != v ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( v != v ) { + printf( "should not return NaN\n" ); + } + free( y ); + free( p ); + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::native::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/binding.gyp b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/repl.txt b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/repl.txt new file mode 100644 index 000000000000..872241aab6dd --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/repl.txt @@ -0,0 +1,42 @@ + +{{alias}}( t, y, p ) + Computes the squared hinge loss. + + If any argument is `NaN`, the function returns `NaN`. + + If `y` is not +1 or -1, the function returns `NaN`. + + When `t = 1.0`, we get the loss used by SVM. + + Parameters + ---------- + t: number + Margin threshold. + + y: number + True target value. + + p: number + Predicted value. + + Returns + ------- + v: number + Squared hinge loss. + + Examples + -------- + > var v = {{alias}}( 1.0, 1.0, 0.782 ) + ~0.0475 + > v = {{alias}}( 1.0, 1.0, 0.202 ) + ~0.6368 + > v = {{alias}}( 1.0, 1.0, -0.999 ) + ~3.996 + > v = {{alias}}( 1.0, -1.0, 0.2 ) + 1.44 + > v = {{alias}}( 1.0, 1.0, NaN ) + NaN + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/types/index.d.ts b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/types/index.d.ts new file mode 100644 index 000000000000..47ed48342446 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/types/index.d.ts @@ -0,0 +1,59 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Compute the squared hinge loss. +* +* ## Notes +* +* - If `y` is not +1 or -1, the function returns `NaN`. +* - When `t = 1.0`, we get the loss used by SVM. +* +* @param t - margin threshold +* @param y - true target value +* @param p - predicted value +* @returns squared hinge loss +* +* @example +* var v = squaredHinge( 1.0, 1.0, 0.782 ); +* // returns ~0.0475 +* +* @example +* var v = squaredHinge( 1.0, 1.0, 0.202 ); +* // returns ~0.6368 +* +* @example +* var v = squaredHinge( 1.0, 1.0, -0.999 ); +* // returns ~3.996 +* +* @example +* var v = squaredHinge( 1.0, -1.0, 0.2 ); +* // returns 1.44 +* +* @example +* var v = squaredHinge( 1.0, -1.0, -1.5 ); +* // returns 0.0 +*/ +declare function squaredHinge( t: number, y: number, p: number ): number; + + +// EXPORTS // + +export = squaredHinge; diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/types/test.ts b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/types/test.ts new file mode 100644 index 000000000000..7744847fe402 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/docs/types/test.ts @@ -0,0 +1,71 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import squaredHinge = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + squaredHinge( 1.0, 1.0, 0.782 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a first argument which is not a number... +{ + squaredHinge( true, 1.0, 0.782 ); // $ExpectError + squaredHinge( false, 1.0, 0.782 ); // $ExpectError + squaredHinge( null, 1.0, 0.782 ); // $ExpectError + squaredHinge( undefined, 1.0, 0.782 ); // $ExpectError + squaredHinge( '5', 1.0, 0.782 ); // $ExpectError + squaredHinge( [], 1.0, 0.782 ); // $ExpectError + squaredHinge( {}, 1.0, 0.782 ); // $ExpectError + squaredHinge( ( x: number ): number => x, 1.0, 0.782 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + squaredHinge( 1.0, true, 0.782 ); // $ExpectError + squaredHinge( 1.0, false, 0.782 ); // $ExpectError + squaredHinge( 1.0, null, 0.782 ); // $ExpectError + squaredHinge( 1.0, undefined, 0.782 ); // $ExpectError + squaredHinge( 1.0, '5', 0.782 ); // $ExpectError + squaredHinge( 1.0, [], 0.782 ); // $ExpectError + squaredHinge( 1.0, {}, 0.782 ); // $ExpectError + squaredHinge( 1.0, ( x: number ): number => x, 0.782 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + squaredHinge( 1.0, 1.0, true ); // $ExpectError + squaredHinge( 1.0, 1.0, false ); // $ExpectError + squaredHinge( 1.0, 1.0, null ); // $ExpectError + squaredHinge( 1.0, 1.0, undefined ); // $ExpectError + squaredHinge( 1.0, 1.0, '5' ); // $ExpectError + squaredHinge( 1.0, 1.0, [] ); // $ExpectError + squaredHinge( 1.0, 1.0, {} ); // $ExpectError + squaredHinge( 1.0, 1.0, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + squaredHinge(); // $ExpectError + squaredHinge( 1.0 ); // $ExpectError + squaredHinge( 1.0, 0.900 ); // $ExpectError + squaredHinge( 1.0, 0.900, 0.787, 0.7873 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/c/Makefile b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/c/example.c b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/c/example.c new file mode 100644 index 000000000000..4301088839c6 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/c/example.c @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/ml/base/loss/float64/squared_hinge.h" +#include + +int main( void ) { + const double t[] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 }; + const double y[] = { -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; + const double p[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 }; + + double v; + int i; + for ( i = 0; i < 10; i++ ) { + v = stdlib_base_float64_squared_hinge( t[ i ], y[ i ], p[ i ] ); + printf( "squaredHinge(%lf, %lf, %lf) = %lf\n", t[ i ], y[ i ], p[ i ], v ); + } +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/index.js b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/index.js new file mode 100644 index 000000000000..d9932f26d419 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/examples/index.js @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var sample = require( '@stdlib/random/sample' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var squaredHinge = require( './../lib' ); + +var y = sample( [ -1.0, 1.0 ], { + 'size': 100 +}); +var opts = { + 'dtype': 'float64' +}; +var t = uniform( 100, 0.0, 5.0, opts ); +var p = uniform( 100, -5.0, 5.0, opts ); + +logEachMap( 'squaredHinge(%0.4f, %0.4f, %0.4f) = %0.4f', t, y, p, squaredHinge ); diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/include.gypi b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + ' 0.0 ) { + return z * z; + } + return 0.0; +} + + +// EXPORTS // + +module.exports = squaredHinge; diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/lib/native.js b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/lib/native.js new file mode 100644 index 000000000000..1d6bcc5b2b71 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/lib/native.js @@ -0,0 +1,64 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var addon = require( './../src/addon.node' ); + + +// MAIN // + +/** +* Computes the squared hinge loss. +* +* @private +* @param {number} t - margin threshold +* @param {number} y - true target value +* @param {number} p - predicted value +* @returns {number} squared hinge loss +* +* @example +* var v = squaredHinge( 1.0, 1.0, 0.782 ); +* // returns ~0.0475 +* +* @example +* var v = squaredHinge( 1.0, 1.0, 0.202 ); +* // returns ~0.6368 +* +* @example +* var v = squaredHinge( 1.0, 1.0, -0.999 ); +* // returns ~3.996 +* +* @example +* var v = squaredHinge( 1.0, -1.0, 0.2 ); +* // returns 1.44 +* +* @example +* var v = squaredHinge( 1.0, -1.0, -1.5 ); +* // returns 0.0 +*/ +function squaredHinge( t, y, p ) { + return addon( t, y, p ); +} + + +// EXPORTS // + +module.exports = squaredHinge; diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/manifest.json b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/manifest.json new file mode 100644 index 000000000000..6164498d65ea --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/manifest.json @@ -0,0 +1,75 @@ +{ + "options": { + "task": "build" + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/napi/ternary", + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float64/nan" + ] + }, + { + "task": "benchmark", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float64/nan" + ] + }, + { + "task": "examples", + "src": [ + "./src/main.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [ + "@stdlib/math/base/assert/is-nan", + "@stdlib/constants/float64/nan" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/package.json b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/package.json new file mode 100644 index 000000000000..2aeda097090b --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/package.json @@ -0,0 +1,67 @@ +{ + "name": "@stdlib/ml/base/loss/float64/squared-hinge", + "version": "0.0.0", + "description": "Compute the squared hinge loss.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "src": "./src", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "machine learning", + "ml", + "loss", + "float64", + "hinge", + "squared hinge loss", + "double-precision", + "double", + "dbl" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/Makefile b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/addon.c b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/addon.c new file mode 100644 index 000000000000..dbfdd9a40c7f --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/addon.c @@ -0,0 +1,22 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/ml/base/loss/float64/squared_hinge.h" +#include "stdlib/math/base/napi/ternary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_DDD_D( stdlib_base_float64_squared_hinge ) diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/main.c b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/main.c new file mode 100644 index 000000000000..1f13172c79a3 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/src/main.c @@ -0,0 +1,48 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "stdlib/ml/base/loss/float64/squared_hinge.h" +#include "stdlib/math/base/assert/is_nan.h" +#include "stdlib/constants/float64/nan.h" + +/** +* Computes the squared hinge loss. +* +* @param t margin threshold +* @param y true target value +* @param p predicted value +* @return squared hinge loss +* +* @example +* double out = stdlib_base_float64_squared_hinge( 1.0, -1.0, 0.2 ); +* // returns 1.44 +*/ +double stdlib_base_float64_squared_hinge( const double t, const double y, const double p ) { + double z; + if ( + stdlib_base_is_nan( t ) || stdlib_base_is_nan( y ) || stdlib_base_is_nan( p ) || + ( y != -1.0 && y != 1.0 ) + ) { + return STDLIB_CONSTANT_FLOAT64_NAN; + } + z = t - ( y*p ); + if ( z > 0.0 ) { + return z * z; + } + return 0.0; +} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/REQUIRE b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/REQUIRE new file mode 100644 index 000000000000..7c8193c06e65 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/REQUIRE @@ -0,0 +1,2 @@ +julia 1.4.2 +JSON 0.21.0 diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/runner.jl b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/runner.jl new file mode 100644 index 000000000000..c5b7b4eb728e --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/runner.jl @@ -0,0 +1,93 @@ +#!/usr/bin/env julia +# +# @license Apache-2.0 +# +# Copyright (c) 2026 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import JSON + +""" + gen( t, y, p, name ) + +Generate fixture data and write to file. + +# Arguments + +* `t`: margin threshold +* `y`: response domain +* `p`: prediction domain +* `name::AbstractString`: output filename + +# Examples + +``` julia +julia> t = range( 0.0, stop=5.0, length=2001 ); +julia> y = rand( [-1.0, 1.0], 2001 ) +julia> p = range( -1000.0, 1000.0, 2001 ); +julia> gen( t, y, p, "data.json" ); +``` +""" +function gen( t, y, p, name ) + t = collect( Float64, t ); + p = collect( Float64, p ); + + z = t .- p .* y; + v = ifelse.( z .> 0, z .* z, 0.0 ); + + # Store data to be written to file as a collection: + data = Dict([ + ("t", t), + ("y", y), + ("p", p), + ("expected", v) + ]); + + # Based on the script directory, create an output filepath: + filepath = joinpath( dir, name ); + + # Write the data to the output filepath as JSON: + outfile = open( filepath, "w" ); + write( outfile, JSON.json(data) ); + write( outfile, "\n" ); + close( outfile ); +end + +# Get the filename: +file = @__FILE__; + +# Extract the directory in which this file resides: +dir = dirname(file); + +t = range( 0.0, stop=5.0, length=503 ); + +# Positive tiny values: +y = rand( [ -1.0, 1.0 ], 503 ) +p = range( 0.0, stop=1e-20, length=503 ); +gen( t, y, p, "tiny_positive.json" ); + +# Small positive values: +y = rand( [ -1.0, 1.0 ], 503 ) +p = range( 0.0, stop=2.0, length=503 ); +gen( t, y, p, "small_positive.json" ); + +# Negative tiny values: +y = rand( [ -1.0, 1.0 ], 503 ) +p = range( -1e-20, stop=0.0, length=503 ); +gen( t, y, p, "tiny_negative.json" ); + +# Small negative values: +y = rand( [ -1.0, 1.0 ], 503 ) +p = range( -2.0, stop=0.0, length=503 ); +gen( t, y, p, "small_negative.json" ); diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/small_negative.json b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/small_negative.json new file mode 100644 index 000000000000..0af87ce897b1 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/small_negative.json @@ -0,0 +1 @@ +{"t":[0,0.0099601593625498,0.0199203187250996,0.029880478087649404,0.0398406374501992,0.049800796812749,0.05976095617529881,0.0697211155378486,0.0796812749003984,0.08964143426294821,0.099601593625498,0.10956175298804781,0.11952191235059761,0.1294820717131474,0.1394422310756972,0.14940239043824702,0.1593625498007968,0.1693227091633466,0.17928286852589642,0.1892430278884462,0.199203187250996,0.20916334661354583,0.21912350597609562,0.2290836653386454,0.23904382470119523,0.24900398406374502,0.2589641434262948,0.2689243027888446,0.2788844621513944,0.28884462151394424,0.29880478087649404,0.30876494023904383,0.3187250996015936,0.3286852589641434,0.3386454183266932,0.34860557768924305,0.35856573705179284,0.36852589641434264,0.3784860557768924,0.3884462151394422,0.398406374501992,0.40836653386454186,0.41832669322709165,0.42828685258964144,0.43824701195219123,0.448207171314741,0.4581673306772908,0.4681274900398406,0.47808764940239046,0.48804780876494025,0.49800796812749004,0.5079681274900398,0.5179282868525896,0.5278884462151394,0.5378486055776892,0.547808764940239,0.5577689243027888,0.5677290836653387,0.5776892430278885,0.5876494023904383,0.5976095617529881,0.6075697211155379,0.6175298804780877,0.6274900398406374,0.6374501992031872,0.647410358565737,0.6573705179282868,0.6673306772908366,0.6772908366533864,0.6872509960159362,0.6972111553784861,0.7071713147410359,0.7171314741035857,0.7270916334661355,0.7370517928286853,0.7470119521912351,0.7569721115537849,0.7669322709163346,0.7768924302788844,0.7868525896414342,0.796812749003984,0.8067729083665338,0.8167330677290837,0.8266932270916335,0.8366533864541833,0.8466135458167331,0.8565737051792829,0.8665338645418327,0.8764940239043825,0.8864541832669323,0.896414342629482,0.9063745019920318,0.9163346613545816,0.9262948207171314,0.9362549800796812,0.9462151394422311,0.9561752988047809,0.9661354581673307,0.9760956175298805,0.9860557768924303,0.9960159362549801,1.0059760956175299,1.0159362549800797,1.0258964143426295,1.0358565737051793,1.045816733067729,1.0557768924302788,1.0657370517928286,1.0756972111553784,1.0856573705179282,1.095617529880478,1.1055776892430278,1.1155378486055776,1.1254980079681276,1.1354581673306774,1.1454183266932272,1.155378486055777,1.1653386454183268,1.1752988047808766,1.1852589641434264,1.1952191235059761,1.205179282868526,1.2151394422310757,1.2250996015936255,1.2350597609561753,1.245019920318725,1.254980079681275,1.2649402390438247,1.2749003984063745,1.2848605577689243,1.294820717131474,1.3047808764940239,1.3147410358565736,1.3247011952191234,1.3346613545816732,1.344621513944223,1.3545816733067728,1.3645418326693226,1.3745019920318724,1.3844621513944224,1.3944223107569722,1.404382470119522,1.4143426294820718,1.4243027888446216,1.4342629482071714,1.4442231075697212,1.454183266932271,1.4641434262948207,1.4741035856573705,1.4840637450199203,1.4940239043824701,1.50398406374502,1.5139442231075697,1.5239043824701195,1.5338645418326693,1.543824701195219,1.5537848605577689,1.5637450199203187,1.5737051792828685,1.5836653386454183,1.593625498007968,1.6035856573705178,1.6135458167330676,1.6235059760956174,1.6334661354581674,1.6434262948207172,1.653386454183267,1.6633466135458168,1.6733067729083666,1.6832669322709164,1.6932270916334662,1.703187250996016,1.7131474103585658,1.7231075697211156,1.7330677290836654,1.7430278884462151,1.752988047808765,1.7629482071713147,1.7729083665338645,1.7828685258964143,1.792828685258964,1.802788844621514,1.8127490039840637,1.8227091633466135,1.8326693227091633,1.842629482071713,1.8525896414342629,1.8625498007968126,1.8725099601593624,1.8824701195219125,1.8924302788844622,1.902390438247012,1.9123505976095618,1.9223107569721116,1.9322709163346614,1.9422310756972112,1.952191235059761,1.9621513944223108,1.9721115537848606,1.9820717131474104,1.9920318725099602,2.00199203187251,2.0119521912350598,2.0219123505976095,2.0318725099601593,2.041832669322709,2.051792828685259,2.0617529880478087,2.0717131474103585,2.0816733067729083,2.091633466135458,2.101593625498008,2.1115537848605577,2.1215139442231075,2.1314741035856573,2.141434262948207,2.151394422310757,2.1613545816733066,2.1713147410358564,2.181274900398406,2.191235059760956,2.201195219123506,2.2111553784860556,2.2211155378486054,2.231075697211155,2.241035856573705,2.250996015936255,2.260956175298805,2.270916334661355,2.2808764940239046,2.2908366533864544,2.300796812749004,2.310756972111554,2.3207171314741037,2.3306772908366535,2.3406374501992033,2.350597609561753,2.360557768924303,2.3705179282868527,2.3804780876494025,2.3904382470119523,2.400398406374502,2.410358565737052,2.4203187250996017,2.4302788844621515,2.4402390438247012,2.450199203187251,2.460159362549801,2.4701195219123506,2.4800796812749004,2.49003984063745,2.5,2.50996015936255,2.5199203187250996,2.5298804780876494,2.539840637450199,2.549800796812749,2.5597609561752988,2.5697211155378485,2.5796812749003983,2.589641434262948,2.599601593625498,2.6095617529880477,2.6195219123505975,2.6294820717131473,2.639442231075697,2.649402390438247,2.6593625498007967,2.6693227091633465,2.6792828685258963,2.689243027888446,2.699203187250996,2.7091633466135456,2.7191235059760954,2.729083665338645,2.739043824701195,2.749003984063745,2.758964143426295,2.768924302788845,2.7788844621513946,2.7888446215139444,2.798804780876494,2.808764940239044,2.818725099601594,2.8286852589641436,2.8386454183266934,2.848605577689243,2.858565737051793,2.8685258964143427,2.8784860557768925,2.8884462151394423,2.898406374501992,2.908366533864542,2.9183266932270917,2.9282868525896415,2.9382470119521913,2.948207171314741,2.958167330677291,2.9681274900398407,2.9780876494023905,2.9880478087649402,2.99800796812749,3.00796812749004,3.0179282868525896,3.0278884462151394,3.037848605577689,3.047808764940239,3.057768924302789,3.0677290836653386,3.0776892430278884,3.087649402390438,3.097609561752988,3.1075697211155378,3.1175298804780875,3.1274900398406373,3.137450199203187,3.147410358565737,3.1573705179282867,3.1673306772908365,3.1772908366533863,3.187250996015936,3.197211155378486,3.2071713147410357,3.2171314741035855,3.2270916334661353,3.237051792828685,3.247011952191235,3.256972111553785,3.266932270916335,3.2768924302788847,3.2868525896414345,3.2968127490039842,3.306772908366534,3.316733067729084,3.3266932270916336,3.3366533864541834,3.346613545816733,3.356573705179283,3.366533864541833,3.3764940239043826,3.3864541832669324,3.396414342629482,3.406374501992032,3.4163346613545817,3.4262948207171315,3.4362549800796813,3.446215139442231,3.456175298804781,3.4661354581673307,3.4760956175298805,3.4860557768924303,3.49601593625498,3.50597609561753,3.5159362549800797,3.5258964143426295,3.5358565737051793,3.545816733067729,3.555776892430279,3.5657370517928286,3.5756972111553784,3.585657370517928,3.595617529880478,3.605577689243028,3.6155378486055776,3.6254980079681274,3.635458167330677,3.645418326693227,3.6553784860557768,3.6653386454183265,3.6752988047808763,3.685258964143426,3.695219123505976,3.7051792828685257,3.7151394422310755,3.7250996015936253,3.735059760956175,3.745019920318725,3.754980079681275,3.764940239043825,3.7749003984063747,3.7848605577689245,3.7948207171314743,3.804780876494024,3.814741035856574,3.8247011952191237,3.8346613545816735,3.8446215139442232,3.854581673306773,3.864541832669323,3.8745019920318726,3.8844621513944224,3.894422310756972,3.904382470119522,3.914342629482072,3.9243027888446216,3.9342629482071714,3.944223107569721,3.954183266932271,3.9641434262948207,3.9741035856573705,3.9840637450199203,3.99402390438247,4.00398406374502,4.01394422310757,4.0239043824701195,4.03386454183267,4.043824701195219,4.053784860557769,4.063745019920319,4.073705179282869,4.083665338645418,4.0936254980079685,4.103585657370518,4.113545816733068,4.123505976095617,4.133466135458168,4.143426294820717,4.153386454183267,4.163346613545817,4.173306772908367,4.183266932270916,4.193227091633466,4.203187250996016,4.213147410358566,4.223107569721115,4.233067729083666,4.243027888446215,4.252988047808765,4.2629482071713145,4.272908366533865,4.282868525896414,4.292828685258964,4.302788844621514,4.312749003984064,4.322709163346613,4.3326693227091635,4.342629482071713,4.352589641434263,4.362549800796812,4.372509960159363,4.382470119521912,4.392430278884462,4.402390438247012,4.412350597609562,4.422310756972111,4.432270916334661,4.442231075697211,4.452191235059761,4.46215139442231,4.472111553784861,4.48207171314741,4.49203187250996,4.50199203187251,4.51195219123506,4.52191235059761,4.531872509960159,4.54183266932271,4.551792828685259,4.561752988047809,4.5717131474103585,4.581673306772909,4.591633466135458,4.601593625498008,4.611553784860558,4.621513944223108,4.631474103585657,4.6414342629482075,4.651394422310757,4.661354581673307,4.671314741035856,4.681274900398407,4.691235059760956,4.701195219123506,4.711155378486056,4.721115537848606,4.731075697211155,4.741035856573705,4.750996015936255,4.760956175298805,4.770916334661354,4.780876494023905,4.790836653386454,4.800796812749004,4.8107569721115535,4.820717131474104,4.830677290836653,4.840637450199203,4.850597609561753,4.860557768924303,4.870517928286852,4.8804780876494025,4.890438247011952,4.900398406374502,4.910358565737051,4.920318725099602,4.930278884462151,4.940239043824701,4.950199203187251,4.960159362549801,4.97011952191235,4.9800796812749,4.99003984063745,5],"y":[1,-1,1,1,1,-1,-1,1,1,1,-1,-1,1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,1,-1],"p":[-2,-1.99601593625498,-1.9920318725099602,-1.9880478087649402,-1.9840637450199203,-1.9800796812749004,-1.9760956175298805,-1.9721115537848606,-1.9681274900398407,-1.9641434262948207,-1.9601593625498008,-1.956175298804781,-1.952191235059761,-1.948207171314741,-1.9442231075697212,-1.9402390438247012,-1.9362549800796813,-1.9322709163346614,-1.9282868525896415,-1.9243027888446216,-1.9203187250996017,-1.9163346613545817,-1.9123505976095618,-1.908366533864542,-1.904382470119522,-1.900398406374502,-1.8964143426294822,-1.8924302788844622,-1.8884462151394423,-1.8844621513944224,-1.8804780876494025,-1.8764940239043826,-1.8725099601593624,-1.8685258964143425,-1.8645418326693226,-1.8605577689243027,-1.8565737051792828,-1.8525896414342629,-1.848605577689243,-1.844621513944223,-1.840637450199203,-1.8366533864541832,-1.8326693227091633,-1.8286852589641434,-1.8247011952191234,-1.8207171314741035,-1.8167330677290836,-1.8127490039840637,-1.8087649402390438,-1.8047808764940239,-1.800796812749004,-1.796812749003984,-1.792828685258964,-1.7888446215139442,-1.7848605577689243,-1.7808764940239044,-1.7768924302788844,-1.7729083665338645,-1.7689243027888446,-1.7649402390438247,-1.7609561752988048,-1.7569721115537849,-1.752988047808765,-1.749003984063745,-1.745019920318725,-1.7410358565737052,-1.7370517928286853,-1.7330677290836654,-1.7290836653386454,-1.7250996015936255,-1.7211155378486056,-1.7171314741035857,-1.7131474103585658,-1.7091633466135459,-1.705179282868526,-1.701195219123506,-1.697211155378486,-1.6932270916334662,-1.6892430278884463,-1.6852589641434264,-1.6812749003984064,-1.6772908366533865,-1.6733067729083666,-1.6693227091633467,-1.6653386454183268,-1.6613545816733069,-1.657370517928287,-1.653386454183267,-1.649402390438247,-1.6454183266932272,-1.6414342629482073,-1.6374501992031874,-1.6334661354581674,-1.6294820717131475,-1.6254980079681276,-1.6215139442231075,-1.6175298804780875,-1.6135458167330676,-1.6095617529880477,-1.6055776892430278,-1.6015936254980079,-1.597609561752988,-1.593625498007968,-1.5896414342629481,-1.5856573705179282,-1.5816733067729083,-1.5776892430278884,-1.5737051792828685,-1.5697211155378485,-1.5657370517928286,-1.5617529880478087,-1.5577689243027888,-1.5537848605577689,-1.549800796812749,-1.545816733067729,-1.5418326693227091,-1.5378486055776892,-1.5338645418326693,-1.5298804780876494,-1.5258964143426295,-1.5219123505976095,-1.5179282868525896,-1.5139442231075697,-1.5099601593625498,-1.5059760956175299,-1.50199203187251,-1.49800796812749,-1.4940239043824701,-1.4900398406374502,-1.4860557768924303,-1.4820717131474104,-1.4780876494023905,-1.4741035856573705,-1.4701195219123506,-1.4661354581673307,-1.4621513944223108,-1.4581673306772909,-1.454183266932271,-1.450199203187251,-1.4462151394422311,-1.4422310756972112,-1.4382470119521913,-1.4342629482071714,-1.4302788844621515,-1.4262948207171315,-1.4223107569721116,-1.4183266932270917,-1.4143426294820718,-1.4103585657370519,-1.406374501992032,-1.402390438247012,-1.3984063745019921,-1.3944223107569722,-1.3904382470119523,-1.3864541832669324,-1.3824701195219125,-1.3784860557768925,-1.3745019920318724,-1.3705179282868525,-1.3665338645418326,-1.3625498007968126,-1.3585657370517927,-1.3545816733067728,-1.350597609561753,-1.346613545816733,-1.342629482071713,-1.3386454183266931,-1.3346613545816732,-1.3306772908366533,-1.3266932270916334,-1.3227091633466135,-1.3187250996015936,-1.3147410358565736,-1.3107569721115537,-1.3067729083665338,-1.302788844621514,-1.298804780876494,-1.294820717131474,-1.2908366533864541,-1.2868525896414342,-1.2828685258964143,-1.2788844621513944,-1.2749003984063745,-1.2709163346613546,-1.2669322709163346,-1.2629482071713147,-1.2589641434262948,-1.254980079681275,-1.250996015936255,-1.247011952191235,-1.2430278884462151,-1.2390438247011952,-1.2350597609561753,-1.2310756972111554,-1.2270916334661355,-1.2231075697211156,-1.2191235059760956,-1.2151394422310757,-1.2111553784860558,-1.207171314741036,-1.203187250996016,-1.199203187250996,-1.1952191235059761,-1.1912350597609562,-1.1872509960159363,-1.1832669322709164,-1.1792828685258965,-1.1752988047808766,-1.1713147410358566,-1.1673306772908367,-1.1633466135458168,-1.159362549800797,-1.155378486055777,-1.151394422310757,-1.1474103585657371,-1.1434262948207172,-1.1394422310756973,-1.1354581673306774,-1.1314741035856575,-1.1274900398406376,-1.1235059760956174,-1.1195219123505975,-1.1155378486055776,-1.1115537848605577,-1.1075697211155378,-1.1035856573705178,-1.099601593625498,-1.095617529880478,-1.091633466135458,-1.0876494023904382,-1.0836653386454183,-1.0796812749003983,-1.0756972111553784,-1.0717131474103585,-1.0677290836653386,-1.0637450199203187,-1.0597609561752988,-1.0557768924302788,-1.051792828685259,-1.047808764940239,-1.043824701195219,-1.0398406374501992,-1.0358565737051793,-1.0318725099601593,-1.0278884462151394,-1.0239043824701195,-1.0199203187250996,-1.0159362549800797,-1.0119521912350598,-1.0079681274900398,-1.00398406374502,-1,-0.9960159362549801,-0.9920318725099602,-0.9880478087649402,-0.9840637450199203,-0.9800796812749004,-0.9760956175298805,-0.9721115537848606,-0.9681274900398407,-0.9641434262948207,-0.9601593625498008,-0.9561752988047809,-0.952191235059761,-0.9482071713147411,-0.9442231075697212,-0.9402390438247012,-0.9362549800796812,-0.9322709163346613,-0.9282868525896414,-0.9243027888446215,-0.9203187250996016,-0.9163346613545816,-0.9123505976095617,-0.9083665338645418,-0.9043824701195219,-0.900398406374502,-0.896414342629482,-0.8924302788844621,-0.8884462151394422,-0.8844621513944223,-0.8804780876494024,-0.8764940239043825,-0.8725099601593626,-0.8685258964143426,-0.8645418326693227,-0.8605577689243028,-0.8565737051792829,-0.852589641434263,-0.848605577689243,-0.8446215139442231,-0.8406374501992032,-0.8366533864541833,-0.8326693227091634,-0.8286852589641435,-0.8247011952191236,-0.8207171314741036,-0.8167330677290837,-0.8127490039840638,-0.8087649402390438,-0.8047808764940239,-0.8007968127490039,-0.796812749003984,-0.7928286852589641,-0.7888446215139442,-0.7848605577689243,-0.7808764940239044,-0.7768924302788844,-0.7729083665338645,-0.7689243027888446,-0.7649402390438247,-0.7609561752988048,-0.7569721115537849,-0.7529880478087649,-0.749003984063745,-0.7450199203187251,-0.7410358565737052,-0.7370517928286853,-0.7330677290836654,-0.7290836653386454,-0.7250996015936255,-0.7211155378486056,-0.7171314741035857,-0.7131474103585658,-0.7091633466135459,-0.7051792828685259,-0.701195219123506,-0.6972111553784861,-0.6932270916334662,-0.6892430278884463,-0.6852589641434262,-0.6812749003984063,-0.6772908366533864,-0.6733067729083665,-0.6693227091633466,-0.6653386454183267,-0.6613545816733067,-0.6573705179282868,-0.6533864541832669,-0.649402390438247,-0.6454183266932271,-0.6414342629482072,-0.6374501992031872,-0.6334661354581673,-0.6294820717131474,-0.6254980079681275,-0.6215139442231076,-0.6175298804780877,-0.6135458167330677,-0.6095617529880478,-0.6055776892430279,-0.601593625498008,-0.5976095617529881,-0.5936254980079682,-0.5896414342629482,-0.5856573705179283,-0.5816733067729084,-0.5776892430278885,-0.5737051792828686,-0.5697211155378487,-0.5657370517928287,-0.5617529880478087,-0.5577689243027888,-0.5537848605577689,-0.549800796812749,-0.545816733067729,-0.5418326693227091,-0.5378486055776892,-0.5338645418326693,-0.5298804780876494,-0.5258964143426295,-0.5219123505976095,-0.5179282868525896,-0.5139442231075697,-0.5099601593625498,-0.5059760956175299,-0.50199203187251,-0.49800796812749004,-0.4940239043824701,-0.4900398406374502,-0.4860557768924303,-0.4820717131474104,-0.47808764940239046,-0.47410358565737054,-0.4701195219123506,-0.46613545816733065,-0.46215139442231074,-0.4581673306772908,-0.4541832669322709,-0.450199203187251,-0.44621513944223107,-0.44223107569721115,-0.43824701195219123,-0.4342629482071713,-0.4302788844621514,-0.4262948207171315,-0.42231075697211157,-0.41832669322709165,-0.41434262948207173,-0.4103585657370518,-0.4063745019920319,-0.40239043824701193,-0.398406374501992,-0.3944223107569721,-0.3904382470119522,-0.38645418326693226,-0.38247011952191234,-0.3784860557768924,-0.3745019920318725,-0.3705179282868526,-0.3665338645418327,-0.36254980079681276,-0.35856573705179284,-0.3545816733067729,-0.350597609561753,-0.3466135458167331,-0.3426294820717131,-0.3386454183266932,-0.3346613545816733,-0.33067729083665337,-0.32669322709163345,-0.32270916334661354,-0.3187250996015936,-0.3147410358565737,-0.3107569721115538,-0.30677290836653387,-0.30278884462151395,-0.29880478087649404,-0.2948207171314741,-0.2908366533864542,-0.2868525896414343,-0.28286852589641437,-0.2788844621513944,-0.2749003984063745,-0.27091633466135456,-0.26693227091633465,-0.26294820717131473,-0.2589641434262948,-0.2549800796812749,-0.250996015936255,-0.24701195219123506,-0.24302788844621515,-0.23904382470119523,-0.2350597609561753,-0.23107569721115537,-0.22709163346613545,-0.22310756972111553,-0.21912350597609562,-0.2151394422310757,-0.21115537848605578,-0.20717131474103587,-0.20318725099601595,-0.199203187250996,-0.1952191235059761,-0.19123505976095617,-0.18725099601593626,-0.18326693227091634,-0.17928286852589642,-0.1752988047808765,-0.17131474103585656,-0.16733067729083664,-0.16334661354581673,-0.1593625498007968,-0.1553784860557769,-0.15139442231075698,-0.14741035856573706,-0.14342629482071714,-0.1394422310756972,-0.13545816733067728,-0.13147410358565736,-0.12749003984063745,-0.12350597609561753,-0.11952191235059761,-0.11553784860557768,-0.11155378486055777,-0.10756972111553785,-0.10358565737051793,-0.099601593625498,-0.09561752988047809,-0.09163346613545817,-0.08764940239043825,-0.08366533864541832,-0.0796812749003984,-0.07569721115537849,-0.07171314741035857,-0.06772908366533864,-0.06374501992031872,-0.05976095617529881,-0.055776892430278883,-0.05179282868525897,-0.04780876494023904,-0.043824701195219126,-0.0398406374501992,-0.035856573705179286,-0.03187250996015936,-0.027888446215139442,-0.02390438247011952,-0.0199203187250996,-0.01593625498007968,-0.01195219123505976,-0.00796812749003984,-0.00398406374501992,0],"expected":[4,0,4.047951619815558,4.072034570879827,4.096188949381756,0,0,4.1690806495135,4.193520737766067,4.218032253456294,0,0,4.291995365152934,4.3167925905938,4.341661243472325,4.366601323788511,0,4.416695766733861,0,4.46707591942985,4.492373136934334,0,4.543181854256281,0,4.594276281328868,0,4.645656418152092,4.671453627720196,4.6973222647259565,4.72326232916938,4.749273821050461,0,4.801511087125601,4.827736861319661,0,4.880402692020761,4.9068427485278,0,0,4.986591482674878,5.013317248932555,5.040114442627893,0,0,0,5.1480174917858434,0,5.202397580990777,5.229694766749733,5.257063379946351,5.2845034205806245,5.312014888652562,5.339597784162155,5.367252107109412,5.394977857494324,5.4227750353169,0,5.478583673275028,0,5.534678020983795,0,5.5910580784432,0,5.647723845653244,5.676163870414756,0,0,5.761912509325249,0,5.81943540578721,0,5.87724401199981,0,5.9353383279630485,0,0,6.023015507690355,6.052384089141443,6.08182409803019,6.111335534356598,0,0,6.200298407961778,6.230095554038825,0,0,6.319915556895922,6.3499984127236075,6.3801526959889525,6.410378406691957,6.440675544832621,6.471044110410945,0,6.531995523880573,6.562578371771877,0,0,6.654755480071745,6.685624037713687,0,6.747575435310551,6.778658275265472,0,6.841038237488293,6.872335359756193,0,6.9351438866049735,0,6.998238123204393,0,7.06161806955445,0,0,0,0,0,0,0,0,7.350363486293867,0,0,0,7.48055189600165,0,7.546074665481499,7.578943191377916,7.611883144711987,0,0,7.7111315693401705,0,7.777654322947256,7.8110228409072855,7.84446278630498,7.877974159140329,0,0,0,8.012733924858336,8.046602434881986,8.080542372343297,0,0,0.0000634910556975285,8.217016396565134,8.251313471214743,0.002480119363184707,8.32012190282694,0.006035618482246303,0.008396692115998144,8.423870256027683,8.45859589530325,0.01781320931413784,0.02172981381247913,0.02603530102696778,0.030729670957603792,0.03581292360438725,0.041285058967317996,8.703675338486688,8.738972397263536,0.0600347613529944,0.06706242758051459,0.07447897652418214,8.880874906747511,8.916529102712655,8.95225472611546,0.10803399946032613,9.023920255234044,9.059860160949826,9.095871494103267,0.14781114585482777,9.168108442723131,0.17003301534896278,9.240631101093634,9.276999571435374,9.313439469214774,9.349950794431834,0.2323931366168791,0.24603180901890445,9.459913334708972,0.27447580197139726,0.2892811225218647,0.3044753257884795,0.32005841177124167,0.3360303804701512,9.681766956080061,0.36914096601641233,9.756289582705035,0.4038070824272632,0.4217234647069095,9.868609228424948,9.9061919652069,0.47780590784273275,0.49727782098696854,0.5171386168473516,0.5373882954238822,0.55802685671656,10.13318836208949,0.6004706274503578,10.209425247218297,0.6444699290487452,10.285947842097743,10.324316280693958,0.7133855018174313,0.7371351248392881,0.7612736305772922,10.478504309455406,10.517229885239916,0.8360224440881888,10.594895319121918,0.8877994000095233,0.9142712020444116,0.9411318867954473,10.751083316137837,10.79030888398597,1.0240472373454386,1.0524634529610637,1.0812685512928362,1.110462532340756,1.1400453961048236,11.027162267265597,1.2003777717814001,1.2311272836939093,1.262265678322566,11.186493071538544,1.3257091157283225,11.26658703830098,11.306741162838685,11.346966714814052,1.4572625831336017,11.427632101077762,1.5253726131331256,1.5600109522071084,11.549165886255775,1.6304542785035163,11.630545546896082,11.671342518372725,11.712210917287027,11.75315074363899,11.794161997428613,1.8511174425802768,1.889255726099586,1.9277828923350426,11.9589212869637,2.006003872954398,12.0417294963572,12.08324074221044,2.1262519642545357,12.166477516229902,12.208203044396122,2.25,2.292027110680783,2.334443104077713,2.3772479801907904,12.417902096792114,12.460056189584293,2.5079959048269074,12.544578657481628,2.5971056014983884,12.629386835129601,12.671898065110078,2.733686766876716,12.75713480738401,12.799860319677466,2.873767876700369,2.921239345407215,2.9690996968302086,12.971476643227884,3.065987047824637,3.1150140473960723,13.100938873986127,13.144235805780859,3.264428342407262,13.231043951683306,3.365982285995459,3.4173425818637786,13.361791876319426,3.5212298217488613,3.5737567657656233,3.626672592498532,3.6799773019475883,3.7336708941127923,13.625216266408472,13.669370327455121,3.8970849669052874,13.757892731861402,4.007972095681021,4.063998984143109,13.891212044253267,13.935794669925876,4.234412945826256,14.025174203584072,4.349966667195758,14.114839446992907,14.159779209853813,4.526213869621117,4.585740702528531,14.295027063062493,4.705961016491803,4.766654497547657,14.430917763210106,4.889208107807812,4.951068237012112,5.013317248932555,14.613105347534164,14.658830812209331,14.704627704322151,5.266202123775812,14.796435770860777,14.842446945286584,14.888529547150043,14.93468357645117,5.5910580784432,15.027205917366391,5.723722639323186,5.790638243837398,5.857942731067761,5.925636101014268,5.993718353676926,6.0621894890557275,6.1310495071506805,6.2002984079617764,15.44709210964905,15.494103268202092,6.410378406691957,15.58833986762115,15.635565308487172,15.682862176790845,15.730230472532186,6.768289392231871,6.841038237488296,15.872763924382152,15.920417929874128,7.061618069554453,16.015940223171064,7.2106157045126285,16.111748226218634,7.361168870335393,7.437028777320997,7.5132775670227465,16.30422136156569,7.66694179457469,7.744357232424883,16.44932620117141,7.900354756273711,16.546419898096854,8.057907810987128,8.137267662418058,8.217016396565134,16.741464421199662,16.79040412056952,16.839415247377026,16.8884978016222,8.62159330804273,8.703675338486692,8.7861462516468,8.869006047523055,8.95225472611546,9.035892287424009,17.234075649592864,9.204334058189552,9.289138267646544,17.383251853145183,17.433120109204616,9.545884192314407,9.632243932635989,17.58315344200885,9.806130061427595,9.89365644989762,9.98157172108379,17.784197869875076,10.158568911604577,10.24765083093919,17.935731178870174,10.42698131775686,18.037110522055205,10.60786733543912,18.138775574990877,10.79030888398597,10.882112982333615,10.974305963397407,18.34296281011413,11.159858573673434,18.445484992301708,18.49685322455199,11.44110410945858,18.599803971365535,11.630545546896082,18.703040427929718,18.754765797368293,11.917624323423437,18.858430818558432,18.910370470309996,12.208203044396122,19.014464056126094,12.403866605291979,19.11884335169283,19.171140140632687,19.223508357010207,19.27594800082538,19.32845907207822,13.000190473167091,19.433695496896874,13.202076157521308,13.30360232377264,19.5920858399073,19.6450254757861,19.69803653910255,13.713595815939431,13.817066395771494,13.92092585831971,14.025174203584069,14.12981143156458,20.017602895192137,20.07111395057221,20.124696433389943,14.552249170648086,20.232075681338387,20.285872446469103,20.339740639037473,14.98090903318995,15.089046205615782,15.197572260757767,15.306487198615892,15.415791019190172,20.66444977063856,15.635565308487168,15.746035777209883,15.856895128648752,20.882351073792474,16.07978047967493,16.191806479262233,16.30422136156569,16.41702512658529,21.15633482008222,21.211345851653142,16.757769717940988,21.32158219710798,21.37680751099189,17.102014253742002,17.217540197774643,21.54291201726956,21.598423040904112,17.566451326169425,17.68353280106665,21.7653846764337,17.91886239900954,21.87704957064173,18.15574752781702,21.9890001746004,18.39418818748909,22.101236488309713,22.15746178632085,18.7547657973683,18.875736099426994,18.997095284201844,22.38307725274202,19.240980301899974,22.49631355057856,19.486420850462697,22.60983555816574,19.733416929890005,19.857498293677878,22.780654275328963,20.106827669402072,20.232075681338394,20.357712575990856,23.00941254900716,23.066780686020856,23.124220250472217,23.18173124236123,20.9917302899954,21.119700480944747,21.248059554610247,21.37680751099189,21.505944350089685,21.63547007190362,23.58630815383883,23.64439056522912,22.026380533642325,22.15746178632085,22.28893192171553,23.877434485166898,22.553038840653326,22.68567562419644,22.81870129045571,22.95211583943112,23.085919271122684,24.22914318820336,23.354692782654244,23.489662862494242,24.405961810129998,23.76076967032269,23.89690639831114,24.583423278995568,24.64271995682608,24.702088062094248,24.44534213742639,24.821038554943566,24.880620942524722,24.940274757543527,25]} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/small_positive.json b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/small_positive.json new file mode 100644 index 000000000000..5e6d629f6998 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/small_positive.json @@ -0,0 +1 @@ +{"t":[0,0.0099601593625498,0.0199203187250996,0.029880478087649404,0.0398406374501992,0.049800796812749,0.05976095617529881,0.0697211155378486,0.0796812749003984,0.08964143426294821,0.099601593625498,0.10956175298804781,0.11952191235059761,0.1294820717131474,0.1394422310756972,0.14940239043824702,0.1593625498007968,0.1693227091633466,0.17928286852589642,0.1892430278884462,0.199203187250996,0.20916334661354583,0.21912350597609562,0.2290836653386454,0.23904382470119523,0.24900398406374502,0.2589641434262948,0.2689243027888446,0.2788844621513944,0.28884462151394424,0.29880478087649404,0.30876494023904383,0.3187250996015936,0.3286852589641434,0.3386454183266932,0.34860557768924305,0.35856573705179284,0.36852589641434264,0.3784860557768924,0.3884462151394422,0.398406374501992,0.40836653386454186,0.41832669322709165,0.42828685258964144,0.43824701195219123,0.448207171314741,0.4581673306772908,0.4681274900398406,0.47808764940239046,0.48804780876494025,0.49800796812749004,0.5079681274900398,0.5179282868525896,0.5278884462151394,0.5378486055776892,0.547808764940239,0.5577689243027888,0.5677290836653387,0.5776892430278885,0.5876494023904383,0.5976095617529881,0.6075697211155379,0.6175298804780877,0.6274900398406374,0.6374501992031872,0.647410358565737,0.6573705179282868,0.6673306772908366,0.6772908366533864,0.6872509960159362,0.6972111553784861,0.7071713147410359,0.7171314741035857,0.7270916334661355,0.7370517928286853,0.7470119521912351,0.7569721115537849,0.7669322709163346,0.7768924302788844,0.7868525896414342,0.796812749003984,0.8067729083665338,0.8167330677290837,0.8266932270916335,0.8366533864541833,0.8466135458167331,0.8565737051792829,0.8665338645418327,0.8764940239043825,0.8864541832669323,0.896414342629482,0.9063745019920318,0.9163346613545816,0.9262948207171314,0.9362549800796812,0.9462151394422311,0.9561752988047809,0.9661354581673307,0.9760956175298805,0.9860557768924303,0.9960159362549801,1.0059760956175299,1.0159362549800797,1.0258964143426295,1.0358565737051793,1.045816733067729,1.0557768924302788,1.0657370517928286,1.0756972111553784,1.0856573705179282,1.095617529880478,1.1055776892430278,1.1155378486055776,1.1254980079681276,1.1354581673306774,1.1454183266932272,1.155378486055777,1.1653386454183268,1.1752988047808766,1.1852589641434264,1.1952191235059761,1.205179282868526,1.2151394422310757,1.2250996015936255,1.2350597609561753,1.245019920318725,1.254980079681275,1.2649402390438247,1.2749003984063745,1.2848605577689243,1.294820717131474,1.3047808764940239,1.3147410358565736,1.3247011952191234,1.3346613545816732,1.344621513944223,1.3545816733067728,1.3645418326693226,1.3745019920318724,1.3844621513944224,1.3944223107569722,1.404382470119522,1.4143426294820718,1.4243027888446216,1.4342629482071714,1.4442231075697212,1.454183266932271,1.4641434262948207,1.4741035856573705,1.4840637450199203,1.4940239043824701,1.50398406374502,1.5139442231075697,1.5239043824701195,1.5338645418326693,1.543824701195219,1.5537848605577689,1.5637450199203187,1.5737051792828685,1.5836653386454183,1.593625498007968,1.6035856573705178,1.6135458167330676,1.6235059760956174,1.6334661354581674,1.6434262948207172,1.653386454183267,1.6633466135458168,1.6733067729083666,1.6832669322709164,1.6932270916334662,1.703187250996016,1.7131474103585658,1.7231075697211156,1.7330677290836654,1.7430278884462151,1.752988047808765,1.7629482071713147,1.7729083665338645,1.7828685258964143,1.792828685258964,1.802788844621514,1.8127490039840637,1.8227091633466135,1.8326693227091633,1.842629482071713,1.8525896414342629,1.8625498007968126,1.8725099601593624,1.8824701195219125,1.8924302788844622,1.902390438247012,1.9123505976095618,1.9223107569721116,1.9322709163346614,1.9422310756972112,1.952191235059761,1.9621513944223108,1.9721115537848606,1.9820717131474104,1.9920318725099602,2.00199203187251,2.0119521912350598,2.0219123505976095,2.0318725099601593,2.041832669322709,2.051792828685259,2.0617529880478087,2.0717131474103585,2.0816733067729083,2.091633466135458,2.101593625498008,2.1115537848605577,2.1215139442231075,2.1314741035856573,2.141434262948207,2.151394422310757,2.1613545816733066,2.1713147410358564,2.181274900398406,2.191235059760956,2.201195219123506,2.2111553784860556,2.2211155378486054,2.231075697211155,2.241035856573705,2.250996015936255,2.260956175298805,2.270916334661355,2.2808764940239046,2.2908366533864544,2.300796812749004,2.310756972111554,2.3207171314741037,2.3306772908366535,2.3406374501992033,2.350597609561753,2.360557768924303,2.3705179282868527,2.3804780876494025,2.3904382470119523,2.400398406374502,2.410358565737052,2.4203187250996017,2.4302788844621515,2.4402390438247012,2.450199203187251,2.460159362549801,2.4701195219123506,2.4800796812749004,2.49003984063745,2.5,2.50996015936255,2.5199203187250996,2.5298804780876494,2.539840637450199,2.549800796812749,2.5597609561752988,2.5697211155378485,2.5796812749003983,2.589641434262948,2.599601593625498,2.6095617529880477,2.6195219123505975,2.6294820717131473,2.639442231075697,2.649402390438247,2.6593625498007967,2.6693227091633465,2.6792828685258963,2.689243027888446,2.699203187250996,2.7091633466135456,2.7191235059760954,2.729083665338645,2.739043824701195,2.749003984063745,2.758964143426295,2.768924302788845,2.7788844621513946,2.7888446215139444,2.798804780876494,2.808764940239044,2.818725099601594,2.8286852589641436,2.8386454183266934,2.848605577689243,2.858565737051793,2.8685258964143427,2.8784860557768925,2.8884462151394423,2.898406374501992,2.908366533864542,2.9183266932270917,2.9282868525896415,2.9382470119521913,2.948207171314741,2.958167330677291,2.9681274900398407,2.9780876494023905,2.9880478087649402,2.99800796812749,3.00796812749004,3.0179282868525896,3.0278884462151394,3.037848605577689,3.047808764940239,3.057768924302789,3.0677290836653386,3.0776892430278884,3.087649402390438,3.097609561752988,3.1075697211155378,3.1175298804780875,3.1274900398406373,3.137450199203187,3.147410358565737,3.1573705179282867,3.1673306772908365,3.1772908366533863,3.187250996015936,3.197211155378486,3.2071713147410357,3.2171314741035855,3.2270916334661353,3.237051792828685,3.247011952191235,3.256972111553785,3.266932270916335,3.2768924302788847,3.2868525896414345,3.2968127490039842,3.306772908366534,3.316733067729084,3.3266932270916336,3.3366533864541834,3.346613545816733,3.356573705179283,3.366533864541833,3.3764940239043826,3.3864541832669324,3.396414342629482,3.406374501992032,3.4163346613545817,3.4262948207171315,3.4362549800796813,3.446215139442231,3.456175298804781,3.4661354581673307,3.4760956175298805,3.4860557768924303,3.49601593625498,3.50597609561753,3.5159362549800797,3.5258964143426295,3.5358565737051793,3.545816733067729,3.555776892430279,3.5657370517928286,3.5756972111553784,3.585657370517928,3.595617529880478,3.605577689243028,3.6155378486055776,3.6254980079681274,3.635458167330677,3.645418326693227,3.6553784860557768,3.6653386454183265,3.6752988047808763,3.685258964143426,3.695219123505976,3.7051792828685257,3.7151394422310755,3.7250996015936253,3.735059760956175,3.745019920318725,3.754980079681275,3.764940239043825,3.7749003984063747,3.7848605577689245,3.7948207171314743,3.804780876494024,3.814741035856574,3.8247011952191237,3.8346613545816735,3.8446215139442232,3.854581673306773,3.864541832669323,3.8745019920318726,3.8844621513944224,3.894422310756972,3.904382470119522,3.914342629482072,3.9243027888446216,3.9342629482071714,3.944223107569721,3.954183266932271,3.9641434262948207,3.9741035856573705,3.9840637450199203,3.99402390438247,4.00398406374502,4.01394422310757,4.0239043824701195,4.03386454183267,4.043824701195219,4.053784860557769,4.063745019920319,4.073705179282869,4.083665338645418,4.0936254980079685,4.103585657370518,4.113545816733068,4.123505976095617,4.133466135458168,4.143426294820717,4.153386454183267,4.163346613545817,4.173306772908367,4.183266932270916,4.193227091633466,4.203187250996016,4.213147410358566,4.223107569721115,4.233067729083666,4.243027888446215,4.252988047808765,4.2629482071713145,4.272908366533865,4.282868525896414,4.292828685258964,4.302788844621514,4.312749003984064,4.322709163346613,4.3326693227091635,4.342629482071713,4.352589641434263,4.362549800796812,4.372509960159363,4.382470119521912,4.392430278884462,4.402390438247012,4.412350597609562,4.422310756972111,4.432270916334661,4.442231075697211,4.452191235059761,4.46215139442231,4.472111553784861,4.48207171314741,4.49203187250996,4.50199203187251,4.51195219123506,4.52191235059761,4.531872509960159,4.54183266932271,4.551792828685259,4.561752988047809,4.5717131474103585,4.581673306772909,4.591633466135458,4.601593625498008,4.611553784860558,4.621513944223108,4.631474103585657,4.6414342629482075,4.651394422310757,4.661354581673307,4.671314741035856,4.681274900398407,4.691235059760956,4.701195219123506,4.711155378486056,4.721115537848606,4.731075697211155,4.741035856573705,4.750996015936255,4.760956175298805,4.770916334661354,4.780876494023905,4.790836653386454,4.800796812749004,4.8107569721115535,4.820717131474104,4.830677290836653,4.840637450199203,4.850597609561753,4.860557768924303,4.870517928286852,4.8804780876494025,4.890438247011952,4.900398406374502,4.910358565737051,4.920318725099602,4.930278884462151,4.940239043824701,4.950199203187251,4.960159362549801,4.97011952191235,4.9800796812749,4.99003984063745,5],"y":[-1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,-1,1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,-1,-1,-1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,-1,1,1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1],"p":[0,0.00398406374501992,0.00796812749003984,0.01195219123505976,0.01593625498007968,0.0199203187250996,0.02390438247011952,0.027888446215139442,0.03187250996015936,0.035856573705179286,0.0398406374501992,0.043824701195219126,0.04780876494023904,0.05179282868525897,0.055776892430278883,0.05976095617529881,0.06374501992031872,0.06772908366533864,0.07171314741035857,0.07569721115537849,0.0796812749003984,0.08366533864541832,0.08764940239043825,0.09163346613545817,0.09561752988047809,0.099601593625498,0.10358565737051793,0.10756972111553785,0.11155378486055777,0.11553784860557768,0.11952191235059761,0.12350597609561753,0.12749003984063745,0.13147410358565736,0.13545816733067728,0.1394422310756972,0.14342629482071714,0.14741035856573706,0.15139442231075698,0.1553784860557769,0.1593625498007968,0.16334661354581673,0.16733067729083664,0.17131474103585656,0.1752988047808765,0.17928286852589642,0.18326693227091634,0.18725099601593626,0.19123505976095617,0.1952191235059761,0.199203187250996,0.20318725099601595,0.20717131474103587,0.21115537848605578,0.2151394422310757,0.21912350597609562,0.22310756972111553,0.22709163346613545,0.23107569721115537,0.2350597609561753,0.23904382470119523,0.24302788844621515,0.24701195219123506,0.250996015936255,0.2549800796812749,0.2589641434262948,0.26294820717131473,0.26693227091633465,0.27091633466135456,0.2749003984063745,0.2788844621513944,0.28286852589641437,0.2868525896414343,0.2908366533864542,0.2948207171314741,0.29880478087649404,0.30278884462151395,0.30677290836653387,0.3107569721115538,0.3147410358565737,0.3187250996015936,0.32270916334661354,0.32669322709163345,0.33067729083665337,0.3346613545816733,0.3386454183266932,0.3426294820717131,0.3466135458167331,0.350597609561753,0.3545816733067729,0.35856573705179284,0.36254980079681276,0.3665338645418327,0.3705179282868526,0.3745019920318725,0.3784860557768924,0.38247011952191234,0.38645418326693226,0.3904382470119522,0.3944223107569721,0.398406374501992,0.40239043824701193,0.4063745019920319,0.4103585657370518,0.41434262948207173,0.41832669322709165,0.42231075697211157,0.4262948207171315,0.4302788844621514,0.4342629482071713,0.43824701195219123,0.44223107569721115,0.44621513944223107,0.450199203187251,0.4541832669322709,0.4581673306772908,0.46215139442231074,0.46613545816733065,0.4701195219123506,0.47410358565737054,0.47808764940239046,0.4820717131474104,0.4860557768924303,0.4900398406374502,0.4940239043824701,0.49800796812749004,0.50199203187251,0.5059760956175299,0.5099601593625498,0.5139442231075697,0.5179282868525896,0.5219123505976095,0.5258964143426295,0.5298804780876494,0.5338645418326693,0.5378486055776892,0.5418326693227091,0.545816733067729,0.549800796812749,0.5537848605577689,0.5577689243027888,0.5617529880478087,0.5657370517928287,0.5697211155378487,0.5737051792828686,0.5776892430278885,0.5816733067729084,0.5856573705179283,0.5896414342629482,0.5936254980079682,0.5976095617529881,0.601593625498008,0.6055776892430279,0.6095617529880478,0.6135458167330677,0.6175298804780877,0.6215139442231076,0.6254980079681275,0.6294820717131474,0.6334661354581673,0.6374501992031872,0.6414342629482072,0.6454183266932271,0.649402390438247,0.6533864541832669,0.6573705179282868,0.6613545816733067,0.6653386454183267,0.6693227091633466,0.6733067729083665,0.6772908366533864,0.6812749003984063,0.6852589641434262,0.6892430278884463,0.6932270916334662,0.6972111553784861,0.701195219123506,0.7051792828685259,0.7091633466135459,0.7131474103585658,0.7171314741035857,0.7211155378486056,0.7250996015936255,0.7290836653386454,0.7330677290836654,0.7370517928286853,0.7410358565737052,0.7450199203187251,0.749003984063745,0.7529880478087649,0.7569721115537849,0.7609561752988048,0.7649402390438247,0.7689243027888446,0.7729083665338645,0.7768924302788844,0.7808764940239044,0.7848605577689243,0.7888446215139442,0.7928286852589641,0.796812749003984,0.8007968127490039,0.8047808764940239,0.8087649402390438,0.8127490039840638,0.8167330677290837,0.8207171314741036,0.8247011952191236,0.8286852589641435,0.8326693227091634,0.8366533864541833,0.8406374501992032,0.8446215139442231,0.848605577689243,0.852589641434263,0.8565737051792829,0.8605577689243028,0.8645418326693227,0.8685258964143426,0.8725099601593626,0.8764940239043825,0.8804780876494024,0.8844621513944223,0.8884462151394422,0.8924302788844621,0.896414342629482,0.900398406374502,0.9043824701195219,0.9083665338645418,0.9123505976095617,0.9163346613545816,0.9203187250996016,0.9243027888446215,0.9282868525896414,0.9322709163346613,0.9362549800796812,0.9402390438247012,0.9442231075697212,0.9482071713147411,0.952191235059761,0.9561752988047809,0.9601593625498008,0.9641434262948207,0.9681274900398407,0.9721115537848606,0.9760956175298805,0.9800796812749004,0.9840637450199203,0.9880478087649402,0.9920318725099602,0.9960159362549801,1,1.00398406374502,1.0079681274900398,1.0119521912350598,1.0159362549800797,1.0199203187250996,1.0239043824701195,1.0278884462151394,1.0318725099601593,1.0358565737051793,1.0398406374501992,1.043824701195219,1.047808764940239,1.051792828685259,1.0557768924302788,1.0597609561752988,1.0637450199203187,1.0677290836653386,1.0717131474103585,1.0756972111553784,1.0796812749003983,1.0836653386454183,1.0876494023904382,1.091633466135458,1.095617529880478,1.099601593625498,1.1035856573705178,1.1075697211155378,1.1115537848605577,1.1155378486055776,1.1195219123505975,1.1235059760956174,1.1274900398406376,1.1314741035856575,1.1354581673306774,1.1394422310756973,1.1434262948207172,1.1474103585657371,1.151394422310757,1.155378486055777,1.159362549800797,1.1633466135458168,1.1673306772908367,1.1713147410358566,1.1752988047808766,1.1792828685258965,1.1832669322709164,1.1872509960159363,1.1912350597609562,1.1952191235059761,1.199203187250996,1.203187250996016,1.207171314741036,1.2111553784860558,1.2151394422310757,1.2191235059760956,1.2231075697211156,1.2270916334661355,1.2310756972111554,1.2350597609561753,1.2390438247011952,1.2430278884462151,1.247011952191235,1.250996015936255,1.254980079681275,1.2589641434262948,1.2629482071713147,1.2669322709163346,1.2709163346613546,1.2749003984063745,1.2788844621513944,1.2828685258964143,1.2868525896414342,1.2908366533864541,1.294820717131474,1.298804780876494,1.302788844621514,1.3067729083665338,1.3107569721115537,1.3147410358565736,1.3187250996015936,1.3227091633466135,1.3266932270916334,1.3306772908366533,1.3346613545816732,1.3386454183266931,1.342629482071713,1.346613545816733,1.350597609561753,1.3545816733067728,1.3585657370517927,1.3625498007968126,1.3665338645418326,1.3705179282868525,1.3745019920318724,1.3784860557768925,1.3824701195219125,1.3864541832669324,1.3904382470119523,1.3944223107569722,1.3984063745019921,1.402390438247012,1.406374501992032,1.4103585657370519,1.4143426294820718,1.4183266932270917,1.4223107569721116,1.4262948207171315,1.4302788844621515,1.4342629482071714,1.4382470119521913,1.4422310756972112,1.4462151394422311,1.450199203187251,1.454183266932271,1.4581673306772909,1.4621513944223108,1.4661354581673307,1.4701195219123506,1.4741035856573705,1.4780876494023905,1.4820717131474104,1.4860557768924303,1.4900398406374502,1.4940239043824701,1.49800796812749,1.50199203187251,1.5059760956175299,1.5099601593625498,1.5139442231075697,1.5179282868525896,1.5219123505976095,1.5258964143426295,1.5298804780876494,1.5338645418326693,1.5378486055776892,1.5418326693227091,1.545816733067729,1.549800796812749,1.5537848605577689,1.5577689243027888,1.5617529880478087,1.5657370517928286,1.5697211155378485,1.5737051792828685,1.5776892430278884,1.5816733067729083,1.5856573705179282,1.5896414342629481,1.593625498007968,1.597609561752988,1.6015936254980079,1.6055776892430278,1.6095617529880477,1.6135458167330676,1.6175298804780875,1.6215139442231075,1.6254980079681276,1.6294820717131475,1.6334661354581674,1.6374501992031874,1.6414342629482073,1.6454183266932272,1.649402390438247,1.653386454183267,1.657370517928287,1.6613545816733069,1.6653386454183268,1.6693227091633467,1.6733067729083666,1.6772908366533865,1.6812749003984064,1.6852589641434264,1.6892430278884463,1.6932270916334662,1.697211155378486,1.701195219123506,1.705179282868526,1.7091633466135459,1.7131474103585658,1.7171314741035857,1.7211155378486056,1.7250996015936255,1.7290836653386454,1.7330677290836654,1.7370517928286853,1.7410358565737052,1.745019920318725,1.749003984063745,1.752988047808765,1.7569721115537849,1.7609561752988048,1.7649402390438247,1.7689243027888446,1.7729083665338645,1.7768924302788844,1.7808764940239044,1.7848605577689243,1.7888446215139442,1.792828685258964,1.796812749003984,1.800796812749004,1.8047808764940239,1.8087649402390438,1.8127490039840637,1.8167330677290836,1.8207171314741035,1.8247011952191234,1.8286852589641434,1.8326693227091633,1.8366533864541832,1.840637450199203,1.844621513944223,1.848605577689243,1.8525896414342629,1.8565737051792828,1.8605577689243027,1.8645418326693226,1.8685258964143425,1.8725099601593624,1.8764940239043826,1.8804780876494025,1.8844621513944224,1.8884462151394423,1.8924302788844622,1.8964143426294822,1.900398406374502,1.904382470119522,1.908366533864542,1.9123505976095618,1.9163346613545817,1.9203187250996017,1.9243027888446216,1.9282868525896415,1.9322709163346614,1.9362549800796813,1.9402390438247012,1.9442231075697212,1.948207171314741,1.952191235059761,1.956175298804781,1.9601593625498008,1.9641434262948207,1.9681274900398407,1.9721115537848606,1.9760956175298805,1.9800796812749004,1.9840637450199203,1.9880478087649402,1.9920318725099602,1.99601593625498,2],"expected":[0,0.00003571371882985984,0.00014285487531943937,0.00032142346946873867,0.0005714195012777575,0.004861033951842033,0.006999888890652531,0.0017499722226631315,0.00228567800511103,0.01574975000396819,0.019444135807368132,0.004321359978413041,0.027999555562610124,0.03286058951445215,0.03811050618244154,0.008035586736718465,0.00914271202044412,0.056193552483293906,0.01157124490087459,0.012892652497579402,0.07777654322947253,0.01574975000396819,0.09410961730766179,0.018892557260995854,0.020571102045999275,0.12152584879605087,0.024142473928985247,0.026035301026967817,0.027999555562610103,0.16352518213996606,0.03214234694687386,0.1868581451088078,0.1991079506674497,0.03889223980571736,0.041285058967317975,0.23819066364025968,0.04628497960349836,0.048892081078078124,0.28077332105839586,0.29574530563006934,0.05714195012777574,0.32685592292185844,0.06299900001587276,0.06603466611641085,0.37643846923064717,0.07232028063046618,0.07557022904398342,0.07889160489516038,0.0822844081839971,0.46685370073490906,0.08928429707464962,0.5057419723496452,0.5257694322312344,0.10031983619307626,0.5669910001428549,0.10803399946032598,0.11199822225044041,0.11603387247821466,0.6541007285598642,0.6768503674544849,0.12856938778749544,0.13289074776590848,0.13728353518198125,0.7717377501944414,0.1462833923271059,0.15089046205615783,0.15556895922286945,0.16031888382724083,0.1651402358692719,0.9257353057887968,0.17499722226631328,0.9801788860494278,1.0079840002539642,1.036177997174648,0.1955683243123125,0.2008896684179616,1.1230932842335835,0.211746638942239,1.1829812225202774,1.2135085157378451,1.2444246916715604,1.275729750321423,0.24013904541197764,1.3395065157695911,1.3719782225678958,1.404838812082348,1.4380882843129474,1.4717266392596944,0.2765670386184346,1.54016999730163,0.2892811225218647,0.29574530563006934,0.30228091617593367,0.30888795415945774,0.3155664195806415,1.7548332566149747,0.3291376327359884,0.3360303804701513,0.34299455564197395,1.9057197504801513,0.3571371882985985,0.3643156457834003,0.3715655307058617,2.062828367803686,0.38627958286376396,0.39374375009920465,2.184743099315884,2.226159108585578,0.4165648164314851,0.4243146934175646,0.4321359978413039,0.44002872970270296,0.44799288900176165,2.482821701242838,0.46413548991285863,0.4723139315248965,0.48056380057459414,2.6617077506706246,2.7074014698179396,0.5057419723496452,2.799955556261012,0.522884557387978,0.5315629910636339,2.9417033062967257,0.549134140727925,3.0381462199012716,3.0869510007777654,0.5760265710068094,0.5851335693084236,0.5943119950476976,0.6035618482246313,0.6128831288392247,3.387946223075824,0.6317399723813907,0.6412755353089633,0.6508825256741956,3.59638735893081,0.6703107887176393,0.6801320613958507,3.756801479341598,3.811050618244155,0.7100244440564438,0.7201314264852939,3.9761313312487103,4.031936001015857,0.7508809383978032,4.144711988698592,0.7717377501944414,4.2590435072459165,0.7928802717417184,4.374930556657831,0.8143085030396342,0.8251297598450817,4.551677751146807,0.846986555768956,4.671453627720195,4.7319248900811095,4.792785035158172,4.8540340629513805,0.9028785257376866,0.9142712020444118,5.040114442627893,0.9372708369708416,5.16611244265964,5.229694766749735,0.9723059951429345,0.984127236075618,0.9960199044459614,5.487912890271583,5.5534396279424145,5.619355248329392,1.0443048523039316,1.0565546578625735,1.0688758908588751,5.8869065570387775,1.0937326391644577,1.1062681544737385,1.118875097220679,6.16067998920652,6.230095554038825,1.1571244900874589,1.170017142585038,1.1829812225202774,1.196016729893176,6.583006618942556,6.654755480071745,6.72689322391708,1.2488730337613687,1.262265678322566,1.2757297503214238,1.2892652497579407,1.3028721766321172,1.3165505309439536,7.242746146886557,1.3441215218806053,7.393632640751733,1.3719782225678958,7.546074665481499,7.622879001920605,7.700072221075855,7.777654322947256,7.855625307534799,1.4572625831336012,8.012733924858335,8.091871557594324,1.5008690338248594,8.251313471214743,1.5302971381406638,1.5451183314550558,8.493392962016477,8.574863891049349,8.656723702798368,8.738972397263536,8.82160997444485,8.904636434342311,8.98805177695592,9.071856002285678,1.6817233059792696,9.240631101093634,1.7128656687989072,1.7285439913652156,9.496710369676672,9.582847891303311,1.7760075236900994,9.756289582705035,1.8080070157616537,9.931286804971352,10.019368740178729,10.107839558102254,1.8728631291566804,1.889255726099586,10.375585308169713,1.9222552022983765,10.556026888462089,1.9555403882478057,10.738023999619054,1.9891112839478742,10.92157664164061,11.013936286725608,2.040003333280424,11.199822225044048,2.07428850335709,2.091538229551912,2.108859383184394,2.1262519642545357,2.143715972762337,2.1612514087077983,11.862672814717227,11.9589212869637,2.21428628117014,2.23210742686624,12.25,12.347804003111062,2.2859994285804985,12.544578657481628,12.64354930874113,2.3405342772336946,12.84265725940858,2.3772479801907904,13.043320740940619,13.144235805780859,13.245539753337248,2.4515325153568988,2.470282217742575,2.4891033475659112,13.654644370724274,13.757892731861398,13.861529975714669,2.5651021412358532,2.584280408247488,2.6035301026967823,2.6228512245837363,2.6422437739083504,14.491519975873397,2.681243154870557,14.704627704322151,14.811764892620749,14.919290963635499,2.7600990460468893,2.779991587435121,15.24420247297662,15.353284074855955,2.8400977762257753,2.860276027364645,15.682862176790845,2.900846811955366,15.904525324994841,2.9417033062967257,16.127744004063427,16.239936667671945,3.003523753591213,3.0242734242313616,16.57884795479437,3.065987047824638,3.0869510007777654,16.921259186362125,17.036174028983666,3.150271424263107,3.1715210869668735,17.38325185314519,17.499722226631324,3.2356986397041316,3.257234012158537,17.851466643386615,17.969492547737335,3.3222686941477115,3.344089776352756,3.36598228599546,18.445484992301708,18.565455310233173,18.68581451088078,18.806562594244536,18.927699560324438,3.4988373200425387,3.521229821748861,19.293443754861034,3.566229107474484,19.53921763146617,19.66268789384295,3.634263741845367,3.6570848081776473,20.035431977270203,3.7029412231551873,20.285872446469103,20.41167600514277,20.537868446532595,20.66444977063856,3.818832240758084,3.8422247265916423,21.046527039253345,21.174663894223904,21.303189631910605,3.936508944302472,21.56140775543245,3.984079617783846,4.007972095681023,4.031936001015857,22.082510595069916,22.213758511769658,4.104256281646324,4.128505896731798,22.60983555816574,4.177219409215726,4.201683306614182,4.226218631450294,4.250825383724069,23.27774162314884,23.412489484293907,23.54762622815511,4.349966667195758,4.374930556657831,23.955369756035623,24.09206203076142,4.4502507896700045,24.366613228361455,24.5044721512357,4.526213869621117,24.78135664513261,4.577213060110156,25.059796669894133,25.199600006349105,4.654247551626164,25.480373327407502,4.705961016491801,25.762702179330486,4.757960191108077,26.046586562118062,26.189112077586074,4.836494658814939,26.475329756670522,4.889208107807812,4.9156719734607375,4.942207266551324,27.052431707433207,4.995492135045475,27.343315979111445,5.049062713290264,5.075955143569151,27.782559006999886,27.929751115061666,5.157060999031763,5.184239139061286,5.211488706528469,28.52240837447025,28.671544896112767,28.821070300471423,5.3212012507737985,5.34880795542928,5.376486087522421,5.4042356470532225,29.57453056300693,5.459949048427803,29.87863684703418,30.031273313122014,5.5440548562721235,30.337712893446135,5.600482532023301,30.645708004634848,5.657195917525119,5.685659751432517,5.714195012777576,31.266364819606036,5.771479817780671,31.579026523388517,5.829050332534405,5.857942731067763,5.8869065570387775,5.915941810447456,5.945048491293787,5.974226599577785,6.0034761352994375,6.0327970984587544,6.0621894890557275,6.091653307090364,6.121188552562655,6.150795225472612,33.649243662799,33.81121331407439,33.97357184806591,6.269936191489024,6.299900001587274,6.329935239123189,34.62689481119347,34.79119775876574,6.420469516356881,6.450790463643434,35.2864398977794,6.5116466405295155,6.542181870129043,6.572788527166235,35.95220710782368,6.634216123553594,6.665037062903761,36.45561578387645,6.726893223917078,6.757928445580228,6.789035094681034,6.820213171219504,6.851462675195629,37.47293296931795,37.643846923064714,6.9456397517499715,37.98684147870669,7.008781606641164,7.040459675243247,38.50424993254076,7.104030094760398,7.135922445675464,7.167886224028186,39.19957222901224,39.37437500992048,7.264206123712321,7.296455611815687,7.328776527356708,7.361168870335393,7.393632640751733,7.426167838605738,40.60888319233028,7.491452516626722,40.965099760321266,41.143791368390985,41.32287185917684,41.50234123267885,41.682199488897005,7.689020809193506,42.043082649481754,7.755448326217045,7.788769225885302,42.58732401072999,42.76951556324503,42.95209599847622,43.13506531642355,43.318423517087034,7.990194600085712,8.024015491817591,43.870831415374354,44.05574514690243,44.241047761146646,44.42673925810702,8.19419136204187,8.228440818399708,8.262761702195201,45.173394073109954,45.36102998365105,8.366152918207648,8.40075951175378,45.926271011571245,8.470186981159028,8.505007857018143,46.495011983936756,8.574863891049349,46.87611704576118,8.645005634831193,47.25877763845018,47.45069125886891,47.642993762003776,47.8356851478548,48.028765416421955,8.85714512468056,48.416092601704726,8.92842970746496,8.964179140013648,9]} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/tiny_negative.json b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/tiny_negative.json new file mode 100644 index 000000000000..e0ff8b8ad237 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/tiny_negative.json @@ -0,0 +1 @@ +{"t":[0,0.0099601593625498,0.0199203187250996,0.029880478087649404,0.0398406374501992,0.049800796812749,0.05976095617529881,0.0697211155378486,0.0796812749003984,0.08964143426294821,0.099601593625498,0.10956175298804781,0.11952191235059761,0.1294820717131474,0.1394422310756972,0.14940239043824702,0.1593625498007968,0.1693227091633466,0.17928286852589642,0.1892430278884462,0.199203187250996,0.20916334661354583,0.21912350597609562,0.2290836653386454,0.23904382470119523,0.24900398406374502,0.2589641434262948,0.2689243027888446,0.2788844621513944,0.28884462151394424,0.29880478087649404,0.30876494023904383,0.3187250996015936,0.3286852589641434,0.3386454183266932,0.34860557768924305,0.35856573705179284,0.36852589641434264,0.3784860557768924,0.3884462151394422,0.398406374501992,0.40836653386454186,0.41832669322709165,0.42828685258964144,0.43824701195219123,0.448207171314741,0.4581673306772908,0.4681274900398406,0.47808764940239046,0.48804780876494025,0.49800796812749004,0.5079681274900398,0.5179282868525896,0.5278884462151394,0.5378486055776892,0.547808764940239,0.5577689243027888,0.5677290836653387,0.5776892430278885,0.5876494023904383,0.5976095617529881,0.6075697211155379,0.6175298804780877,0.6274900398406374,0.6374501992031872,0.647410358565737,0.6573705179282868,0.6673306772908366,0.6772908366533864,0.6872509960159362,0.6972111553784861,0.7071713147410359,0.7171314741035857,0.7270916334661355,0.7370517928286853,0.7470119521912351,0.7569721115537849,0.7669322709163346,0.7768924302788844,0.7868525896414342,0.796812749003984,0.8067729083665338,0.8167330677290837,0.8266932270916335,0.8366533864541833,0.8466135458167331,0.8565737051792829,0.8665338645418327,0.8764940239043825,0.8864541832669323,0.896414342629482,0.9063745019920318,0.9163346613545816,0.9262948207171314,0.9362549800796812,0.9462151394422311,0.9561752988047809,0.9661354581673307,0.9760956175298805,0.9860557768924303,0.9960159362549801,1.0059760956175299,1.0159362549800797,1.0258964143426295,1.0358565737051793,1.045816733067729,1.0557768924302788,1.0657370517928286,1.0756972111553784,1.0856573705179282,1.095617529880478,1.1055776892430278,1.1155378486055776,1.1254980079681276,1.1354581673306774,1.1454183266932272,1.155378486055777,1.1653386454183268,1.1752988047808766,1.1852589641434264,1.1952191235059761,1.205179282868526,1.2151394422310757,1.2250996015936255,1.2350597609561753,1.245019920318725,1.254980079681275,1.2649402390438247,1.2749003984063745,1.2848605577689243,1.294820717131474,1.3047808764940239,1.3147410358565736,1.3247011952191234,1.3346613545816732,1.344621513944223,1.3545816733067728,1.3645418326693226,1.3745019920318724,1.3844621513944224,1.3944223107569722,1.404382470119522,1.4143426294820718,1.4243027888446216,1.4342629482071714,1.4442231075697212,1.454183266932271,1.4641434262948207,1.4741035856573705,1.4840637450199203,1.4940239043824701,1.50398406374502,1.5139442231075697,1.5239043824701195,1.5338645418326693,1.543824701195219,1.5537848605577689,1.5637450199203187,1.5737051792828685,1.5836653386454183,1.593625498007968,1.6035856573705178,1.6135458167330676,1.6235059760956174,1.6334661354581674,1.6434262948207172,1.653386454183267,1.6633466135458168,1.6733067729083666,1.6832669322709164,1.6932270916334662,1.703187250996016,1.7131474103585658,1.7231075697211156,1.7330677290836654,1.7430278884462151,1.752988047808765,1.7629482071713147,1.7729083665338645,1.7828685258964143,1.792828685258964,1.802788844621514,1.8127490039840637,1.8227091633466135,1.8326693227091633,1.842629482071713,1.8525896414342629,1.8625498007968126,1.8725099601593624,1.8824701195219125,1.8924302788844622,1.902390438247012,1.9123505976095618,1.9223107569721116,1.9322709163346614,1.9422310756972112,1.952191235059761,1.9621513944223108,1.9721115537848606,1.9820717131474104,1.9920318725099602,2.00199203187251,2.0119521912350598,2.0219123505976095,2.0318725099601593,2.041832669322709,2.051792828685259,2.0617529880478087,2.0717131474103585,2.0816733067729083,2.091633466135458,2.101593625498008,2.1115537848605577,2.1215139442231075,2.1314741035856573,2.141434262948207,2.151394422310757,2.1613545816733066,2.1713147410358564,2.181274900398406,2.191235059760956,2.201195219123506,2.2111553784860556,2.2211155378486054,2.231075697211155,2.241035856573705,2.250996015936255,2.260956175298805,2.270916334661355,2.2808764940239046,2.2908366533864544,2.300796812749004,2.310756972111554,2.3207171314741037,2.3306772908366535,2.3406374501992033,2.350597609561753,2.360557768924303,2.3705179282868527,2.3804780876494025,2.3904382470119523,2.400398406374502,2.410358565737052,2.4203187250996017,2.4302788844621515,2.4402390438247012,2.450199203187251,2.460159362549801,2.4701195219123506,2.4800796812749004,2.49003984063745,2.5,2.50996015936255,2.5199203187250996,2.5298804780876494,2.539840637450199,2.549800796812749,2.5597609561752988,2.5697211155378485,2.5796812749003983,2.589641434262948,2.599601593625498,2.6095617529880477,2.6195219123505975,2.6294820717131473,2.639442231075697,2.649402390438247,2.6593625498007967,2.6693227091633465,2.6792828685258963,2.689243027888446,2.699203187250996,2.7091633466135456,2.7191235059760954,2.729083665338645,2.739043824701195,2.749003984063745,2.758964143426295,2.768924302788845,2.7788844621513946,2.7888446215139444,2.798804780876494,2.808764940239044,2.818725099601594,2.8286852589641436,2.8386454183266934,2.848605577689243,2.858565737051793,2.8685258964143427,2.8784860557768925,2.8884462151394423,2.898406374501992,2.908366533864542,2.9183266932270917,2.9282868525896415,2.9382470119521913,2.948207171314741,2.958167330677291,2.9681274900398407,2.9780876494023905,2.9880478087649402,2.99800796812749,3.00796812749004,3.0179282868525896,3.0278884462151394,3.037848605577689,3.047808764940239,3.057768924302789,3.0677290836653386,3.0776892430278884,3.087649402390438,3.097609561752988,3.1075697211155378,3.1175298804780875,3.1274900398406373,3.137450199203187,3.147410358565737,3.1573705179282867,3.1673306772908365,3.1772908366533863,3.187250996015936,3.197211155378486,3.2071713147410357,3.2171314741035855,3.2270916334661353,3.237051792828685,3.247011952191235,3.256972111553785,3.266932270916335,3.2768924302788847,3.2868525896414345,3.2968127490039842,3.306772908366534,3.316733067729084,3.3266932270916336,3.3366533864541834,3.346613545816733,3.356573705179283,3.366533864541833,3.3764940239043826,3.3864541832669324,3.396414342629482,3.406374501992032,3.4163346613545817,3.4262948207171315,3.4362549800796813,3.446215139442231,3.456175298804781,3.4661354581673307,3.4760956175298805,3.4860557768924303,3.49601593625498,3.50597609561753,3.5159362549800797,3.5258964143426295,3.5358565737051793,3.545816733067729,3.555776892430279,3.5657370517928286,3.5756972111553784,3.585657370517928,3.595617529880478,3.605577689243028,3.6155378486055776,3.6254980079681274,3.635458167330677,3.645418326693227,3.6553784860557768,3.6653386454183265,3.6752988047808763,3.685258964143426,3.695219123505976,3.7051792828685257,3.7151394422310755,3.7250996015936253,3.735059760956175,3.745019920318725,3.754980079681275,3.764940239043825,3.7749003984063747,3.7848605577689245,3.7948207171314743,3.804780876494024,3.814741035856574,3.8247011952191237,3.8346613545816735,3.8446215139442232,3.854581673306773,3.864541832669323,3.8745019920318726,3.8844621513944224,3.894422310756972,3.904382470119522,3.914342629482072,3.9243027888446216,3.9342629482071714,3.944223107569721,3.954183266932271,3.9641434262948207,3.9741035856573705,3.9840637450199203,3.99402390438247,4.00398406374502,4.01394422310757,4.0239043824701195,4.03386454183267,4.043824701195219,4.053784860557769,4.063745019920319,4.073705179282869,4.083665338645418,4.0936254980079685,4.103585657370518,4.113545816733068,4.123505976095617,4.133466135458168,4.143426294820717,4.153386454183267,4.163346613545817,4.173306772908367,4.183266932270916,4.193227091633466,4.203187250996016,4.213147410358566,4.223107569721115,4.233067729083666,4.243027888446215,4.252988047808765,4.2629482071713145,4.272908366533865,4.282868525896414,4.292828685258964,4.302788844621514,4.312749003984064,4.322709163346613,4.3326693227091635,4.342629482071713,4.352589641434263,4.362549800796812,4.372509960159363,4.382470119521912,4.392430278884462,4.402390438247012,4.412350597609562,4.422310756972111,4.432270916334661,4.442231075697211,4.452191235059761,4.46215139442231,4.472111553784861,4.48207171314741,4.49203187250996,4.50199203187251,4.51195219123506,4.52191235059761,4.531872509960159,4.54183266932271,4.551792828685259,4.561752988047809,4.5717131474103585,4.581673306772909,4.591633466135458,4.601593625498008,4.611553784860558,4.621513944223108,4.631474103585657,4.6414342629482075,4.651394422310757,4.661354581673307,4.671314741035856,4.681274900398407,4.691235059760956,4.701195219123506,4.711155378486056,4.721115537848606,4.731075697211155,4.741035856573705,4.750996015936255,4.760956175298805,4.770916334661354,4.780876494023905,4.790836653386454,4.800796812749004,4.8107569721115535,4.820717131474104,4.830677290836653,4.840637450199203,4.850597609561753,4.860557768924303,4.870517928286852,4.8804780876494025,4.890438247011952,4.900398406374502,4.910358565737051,4.920318725099602,4.930278884462151,4.940239043824701,4.950199203187251,4.960159362549801,4.97011952191235,4.9800796812749,4.99003984063745,5],"y":[-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,-1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,1,1,-1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1,1,1,-1,-1,1,1,-1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1],"p":[-1e-20,-9.9800796812749e-21,-9.9601593625498e-21,-9.940239043824701e-21,-9.9203187250996e-21,-9.900398406374502e-21,-9.880478087649401e-21,-9.860557768924302e-21,-9.840637450199203e-21,-9.820717131474103e-21,-9.800796812749004e-21,-9.780876494023904e-21,-9.760956175298805e-21,-9.741035856573704e-21,-9.721115537848605e-21,-9.701195219123505e-21,-9.681274900398406e-21,-9.661354581673307e-21,-9.641434262948206e-21,-9.621513944223107e-21,-9.601593625498007e-21,-9.581673306772908e-21,-9.561752988047808e-21,-9.541832669322709e-21,-9.52191235059761e-21,-9.50199203187251e-21,-9.48207171314741e-21,-9.46215139442231e-21,-9.442231075697211e-21,-9.42231075697211e-21,-9.402390438247012e-21,-9.382470119521911e-21,-9.362549800796812e-21,-9.342629482071713e-21,-9.322709163346613e-21,-9.302788844621514e-21,-9.282868525896413e-21,-9.262948207171314e-21,-9.243027888446214e-21,-9.223107569721115e-21,-9.203187250996016e-21,-9.183266932270916e-21,-9.163346613545817e-21,-9.143426294820716e-21,-9.123505976095617e-21,-9.103585657370517e-21,-9.083665338645418e-21,-9.063745019920317e-21,-9.043824701195219e-21,-9.02390438247012e-21,-9.003984063745019e-21,-8.98406374501992e-21,-8.96414342629482e-21,-8.944223107569721e-21,-8.92430278884462e-21,-8.904382470119521e-21,-8.884462151394422e-21,-8.864541832669322e-21,-8.844621513944223e-21,-8.824701195219123e-21,-8.804780876494024e-21,-8.784860557768923e-21,-8.764940239043824e-21,-8.745019920318725e-21,-8.725099601593625e-21,-8.705179282868526e-21,-8.685258964143426e-21,-8.665338645418327e-21,-8.645418326693226e-21,-8.625498007968127e-21,-8.605577689243027e-21,-8.585657370517928e-21,-8.565737051792829e-21,-8.545816733067728e-21,-8.52589641434263e-21,-8.505976095617529e-21,-8.48605577689243e-21,-8.46613545816733e-21,-8.44621513944223e-21,-8.426294820717132e-21,-8.406374501992031e-21,-8.386454183266932e-21,-8.366533864541832e-21,-8.346613545816733e-21,-8.326693227091632e-21,-8.306772908366534e-21,-8.286852589641433e-21,-8.266932270916334e-21,-8.247011952191235e-21,-8.227091633466135e-21,-8.207171314741036e-21,-8.187250996015935e-21,-8.167330677290836e-21,-8.147410358565736e-21,-8.127490039840637e-21,-8.107569721115538e-21,-8.087649402390438e-21,-8.067729083665339e-21,-8.047808764940238e-21,-8.02788844621514e-21,-8.007968127490039e-21,-7.98804780876494e-21,-7.968127490039841e-21,-7.94820717131474e-21,-7.928286852589642e-21,-7.908366533864541e-21,-7.888446215139442e-21,-7.868525896414342e-21,-7.848605577689243e-21,-7.828685258964142e-21,-7.808764940239043e-21,-7.788844621513944e-21,-7.768924302788844e-21,-7.749003984063745e-21,-7.729083665338645e-21,-7.709163346613546e-21,-7.689243027888445e-21,-7.669322709163346e-21,-7.649402390438247e-21,-7.629482071713147e-21,-7.609561752988048e-21,-7.589641434262947e-21,-7.569721115537849e-21,-7.549800796812748e-21,-7.529880478087649e-21,-7.509960159362549e-21,-7.49003984063745e-21,-7.470119521912351e-21,-7.45019920318725e-21,-7.430278884462151e-21,-7.410358565737051e-21,-7.390438247011952e-21,-7.370517928286852e-21,-7.350597609561753e-21,-7.330677290836654e-21,-7.310756972111553e-21,-7.290836653386454e-21,-7.270916334661354e-21,-7.250996015936255e-21,-7.231075697211154e-21,-7.211155378486055e-21,-7.191235059760955e-21,-7.171314741035856e-21,-7.151394422310757e-21,-7.131474103585657e-21,-7.111553784860558e-21,-7.091633466135457e-21,-7.071713147410358e-21,-7.051792828685258e-21,-7.031872509960159e-21,-7.01195219123506e-21,-6.99203187250996e-21,-6.97211155378486e-21,-6.95219123505976e-21,-6.932270916334661e-21,-6.912350597609561e-21,-6.892430278884462e-21,-6.872509960159363e-21,-6.852589641434262e-21,-6.832669322709164e-21,-6.812749003984063e-21,-6.792828685258964e-21,-6.7729083665338644e-21,-6.752988047808765e-21,-6.733067729083665e-21,-6.713147410358565e-21,-6.693227091633466e-21,-6.673306772908366e-21,-6.653386454183266e-21,-6.633466135458167e-21,-6.6135458167330676e-21,-6.593625498007968e-21,-6.573705179282868e-21,-6.5537848605577685e-21,-6.533864541832669e-21,-6.513944223107569e-21,-6.4940239043824694e-21,-6.4741035856573705e-21,-6.454183266932271e-21,-6.434262948207171e-21,-6.4143426294820714e-21,-6.394422310756972e-21,-6.374501992031872e-21,-6.354581673306772e-21,-6.3346613545816726e-21,-6.314741035856574e-21,-6.294820717131474e-21,-6.274900398406374e-21,-6.2549800796812746e-21,-6.235059760956175e-21,-6.215139442231075e-21,-6.1952191235059755e-21,-6.175298804780876e-21,-6.155378486055777e-21,-6.135458167330677e-21,-6.1155378486055775e-21,-6.095617529880478e-21,-6.075697211155378e-21,-6.055776892430278e-21,-6.035856573705179e-21,-6.015936254980079e-21,-5.99601593625498e-21,-5.97609561752988e-21,-5.956175298804781e-21,-5.936254980079681e-21,-5.916334661354581e-21,-5.8964143426294816e-21,-5.876494023904382e-21,-5.856573705179283e-21,-5.836653386454183e-21,-5.8167330677290835e-21,-5.796812749003984e-21,-5.776892430278884e-21,-5.7569721115537844e-21,-5.737051792828685e-21,-5.717131474103585e-21,-5.697211155378486e-21,-5.6772908366533864e-21,-5.657370517928287e-21,-5.637450199203187e-21,-5.617529880478087e-21,-5.5976095617529876e-21,-5.577689243027888e-21,-5.557768924302788e-21,-5.537848605577689e-21,-5.5179282868525896e-21,-5.49800796812749e-21,-5.47808764940239e-21,-5.4581673306772905e-21,-5.438247011952191e-21,-5.418326693227091e-21,-5.3984063745019914e-21,-5.3784860557768925e-21,-5.358565737051793e-21,-5.338645418326693e-21,-5.318725099601593e-21,-5.298804780876494e-21,-5.278884462151394e-21,-5.258964143426294e-21,-5.2390438247011946e-21,-5.219123505976096e-21,-5.199203187250996e-21,-5.179282868525896e-21,-5.1593625498007965e-21,-5.139442231075697e-21,-5.119521912350597e-21,-5.0996015936254975e-21,-5.079681274900398e-21,-5.059760956175299e-21,-5.039840637450199e-21,-5.0199203187250994e-21,-5e-21,-4.9800796812749e-21,-4.9601593625498e-21,-4.940239043824701e-21,-4.920318725099602e-21,-4.900398406374502e-21,-4.880478087649402e-21,-4.8605577689243026e-21,-4.840637450199203e-21,-4.820717131474103e-21,-4.8007968127490035e-21,-4.780876494023904e-21,-4.760956175298805e-21,-4.741035856573705e-21,-4.7211155378486055e-21,-4.701195219123506e-21,-4.681274900398406e-21,-4.6613545816733064e-21,-4.641434262948207e-21,-4.621513944223107e-21,-4.601593625498008e-21,-4.581673306772908e-21,-4.561752988047809e-21,-4.541832669322709e-21,-4.521912350597609e-21,-4.5019920318725096e-21,-4.48207171314741e-21,-4.46215139442231e-21,-4.442231075697211e-21,-4.4223107569721115e-21,-4.402390438247012e-21,-4.382470119521912e-21,-4.3625498007968124e-21,-4.342629482071713e-21,-4.322709163346613e-21,-4.302788844621513e-21,-4.2828685258964144e-21,-4.262948207171315e-21,-4.243027888446215e-21,-4.223107569721115e-21,-4.203187250996016e-21,-4.183266932270916e-21,-4.163346613545816e-21,-4.1434262948207165e-21,-4.1235059760956176e-21,-4.103585657370518e-21,-4.083665338645418e-21,-4.0637450199203185e-21,-4.043824701195219e-21,-4.023904382470119e-21,-4.0039840637450194e-21,-3.9840637450199205e-21,-3.964143426294821e-21,-3.944223107569721e-21,-3.9243027888446214e-21,-3.904382470119522e-21,-3.884462151394422e-21,-3.864541832669322e-21,-3.8446215139442226e-21,-3.824701195219124e-21,-3.804780876494024e-21,-3.784860557768924e-21,-3.7649402390438246e-21,-3.745019920318725e-21,-3.725099601593625e-21,-3.7051792828685255e-21,-3.685258964143426e-21,-3.665338645418327e-21,-3.645418326693227e-21,-3.6254980079681274e-21,-3.605577689243028e-21,-3.585657370517928e-21,-3.565737051792828e-21,-3.545816733067729e-21,-3.525896414342629e-21,-3.50597609561753e-21,-3.48605577689243e-21,-3.466135458167331e-21,-3.446215139442231e-21,-3.426294820717131e-21,-3.4063745019920315e-21,-3.3864541832669322e-21,-3.3665338645418325e-21,-3.346613545816733e-21,-3.326693227091633e-21,-3.3067729083665338e-21,-3.286852589641434e-21,-3.2669322709163344e-21,-3.2470119521912347e-21,-3.2270916334661354e-21,-3.2071713147410357e-21,-3.187250996015936e-21,-3.1673306772908363e-21,-3.147410358565737e-21,-3.1274900398406373e-21,-3.1075697211155376e-21,-3.087649402390438e-21,-3.0677290836653386e-21,-3.047808764940239e-21,-3.027888446215139e-21,-3.0079681274900395e-21,-2.98804780876494e-21,-2.9681274900398405e-21,-2.9482071713147408e-21,-2.9282868525896415e-21,-2.9083665338645418e-21,-2.888446215139442e-21,-2.8685258964143424e-21,-2.848605577689243e-21,-2.8286852589641433e-21,-2.8087649402390437e-21,-2.788844621513944e-21,-2.7689243027888446e-21,-2.749003984063745e-21,-2.7290836653386452e-21,-2.7091633466135455e-21,-2.6892430278884462e-21,-2.6693227091633465e-21,-2.649402390438247e-21,-2.629482071713147e-21,-2.609561752988048e-21,-2.589641434262948e-21,-2.5697211155378484e-21,-2.5498007968127487e-21,-2.5298804780876494e-21,-2.5099601593625497e-21,-2.49003984063745e-21,-2.4701195219123503e-21,-2.450199203187251e-21,-2.4302788844621513e-21,-2.4103585657370516e-21,-2.390438247011952e-21,-2.3705179282868526e-21,-2.350597609561753e-21,-2.3306772908366532e-21,-2.3107569721115535e-21,-2.290836653386454e-21,-2.2709163346613545e-21,-2.2509960159362548e-21,-2.231075697211155e-21,-2.2111553784860558e-21,-2.191235059760956e-21,-2.1713147410358564e-21,-2.1513944223107567e-21,-2.1314741035856574e-21,-2.1115537848605577e-21,-2.091633466135458e-21,-2.0717131474103583e-21,-2.051792828685259e-21,-2.0318725099601593e-21,-2.0119521912350596e-21,-1.9920318725099602e-21,-1.9721115537848605e-21,-1.952191235059761e-21,-1.932270916334661e-21,-1.912350597609562e-21,-1.892430278884462e-21,-1.8725099601593624e-21,-1.8525896414342627e-21,-1.8326693227091634e-21,-1.8127490039840637e-21,-1.792828685258964e-21,-1.7729083665338643e-21,-1.752988047808765e-21,-1.7330677290836653e-21,-1.7131474103585656e-21,-1.6932270916334661e-21,-1.6733067729083664e-21,-1.6533864541832669e-21,-1.6334661354581672e-21,-1.6135458167330677e-21,-1.593625498007968e-21,-1.5737051792828685e-21,-1.5537848605577688e-21,-1.5338645418326693e-21,-1.5139442231075696e-21,-1.49402390438247e-21,-1.4741035856573704e-21,-1.4541832669322709e-21,-1.4342629482071712e-21,-1.4143426294820717e-21,-1.394422310756972e-21,-1.3745019920318725e-21,-1.3545816733067728e-21,-1.3346613545816733e-21,-1.3147410358565736e-21,-1.294820717131474e-21,-1.2749003984063744e-21,-1.2549800796812749e-21,-1.2350597609561752e-21,-1.2151394422310757e-21,-1.195219123505976e-21,-1.1752988047808764e-21,-1.1553784860557767e-21,-1.1354581673306772e-21,-1.1155378486055775e-21,-1.095617529880478e-21,-1.0756972111553783e-21,-1.0557768924302788e-21,-1.0358565737051791e-21,-1.0159362549800796e-21,-9.960159362549801e-22,-9.760956175298804e-22,-9.56175298804781e-22,-9.362549800796812e-22,-9.163346613545817e-22,-8.96414342629482e-22,-8.764940239043825e-22,-8.565737051792828e-22,-8.366533864541832e-22,-8.167330677290836e-22,-7.96812749003984e-22,-7.768924302788844e-22,-7.569721115537848e-22,-7.370517928286852e-22,-7.171314741035856e-22,-6.97211155378486e-22,-6.772908366533864e-22,-6.573705179282868e-22,-6.374501992031872e-22,-6.175298804780876e-22,-5.97609561752988e-22,-5.776892430278884e-22,-5.577689243027888e-22,-5.378486055776892e-22,-5.179282868525896e-22,-4.980079681274901e-22,-4.780876494023905e-22,-4.581673306772909e-22,-4.3824701195219125e-22,-4.183266932270916e-22,-3.98406374501992e-22,-3.784860557768924e-22,-3.585657370517928e-22,-3.386454183266932e-22,-3.187250996015936e-22,-2.98804780876494e-22,-2.788844621513944e-22,-2.589641434262948e-22,-2.3904382470119523e-22,-2.1912350597609563e-22,-1.99203187250996e-22,-1.792828685258964e-22,-1.593625498007968e-22,-1.394422310756972e-22,-1.1952191235059761e-22,-9.9601593625498e-23,-7.96812749003984e-23,-5.976095617529881e-23,-3.98406374501992e-23,-1.99203187250996e-23,0],"expected":[0,0.00009920477452738845,0.0003968190981095538,0.0008928429707464961,0.0015872763924382153,0.0024801193631847113,0.0035713718829859845,0.004861033951842033,0.006349105569752861,0.008035586736718465,0.009920477452738845,0.012003777717814003,0.014285487531943938,0.016765606895128647,0.019444135807368132,0.022321074268662405,0.025396422279011444,0.028670179838415258,0.03214234694687386,0.03581292360438723,0.03968190981095538,0.043749305566578314,0.04801511087125601,0.052479325724988486,0.05714195012777575,0.06200298407961778,0.06706242758051459,0.07232028063046618,0.07777654322947253,0.0834312153775337,0.08928429707464962,0.0953357883208203,0.10158568911604578,0.10803399946032602,0.11468071935366103,0.12152584879605087,0.12856938778749544,0.1358113363279948,0.14325169441754892,0.15089046205615783,0.15872763924382152,0.16676322598054003,0.17499722226631326,0.18342962810114125,0.19206044348502405,0.2008896684179616,0.20991730289995394,0.21914334693100107,0.228567800511103,0.23819066364025968,0.24801193631847113,0.25803161854573736,0.26824971032205835,0.27866621164743416,0.2892811225218647,0.30009444294535004,0.3111061729178901,0.32231631243948516,0.3337248615101348,0.34533182012983926,0.3571371882985985,0.36914096601641244,0.3813431532832812,0.39374375009920476,0.4063427564641831,0.4191401723782162,0.4321359978413041,0.4453302328534467,0.4587228774146441,0.47231393152489637,0.4861033951842035,0.5000912683925652,0.5142775511499817,0.5286622434564531,0.5432453453119792,0.55802685671656,0.5730067776701957,0.5881851081728862,0.6035618482246313,0.6191369978254313,0.6349105569752861,0.6508825256741956,0.6670529039221601,0.6834216917191791,0.699988889065253,0.7167544959603817,0.733718512404565,0.7508809383978032,0.7682417739400962,0.785801019031444,0.8035586736718464,0.8215147378613037,0.8396692115998158,0.8580220948873827,0.8765733877240043,0.8953230901096809,0.914271202044412,0.9334177235281981,0.9527626545610387,0.9723059951429343,0.9920477452738845,1.0119879049538896,1.0321264741829494,1.0524634529610641,1.0729988412882334,1.0937326391644577,1.1146648465897366,1.1357954635640704,1.1571244900874589,1.178651926159902,1.2003777717814001,1.222302026951953,1.2444246916715604,1.2667457659402235,1.2892652497579407,1.3119831431247124,1.3348994460405392,1.3580141585054206,1.381327280519357,1.404838812082348,1.428548753194394,1.4524571038554945,1.4765638640656498,1.50086903382486,1.5253726131331249,1.5500746019904446,1.574975000396819,1.6000738083522483,1.6253710258567324,1.6508666529102711,1.6765606895128649,1.7024531356645132,1.7285439913652163,1.7548332566149742,1.7813209314137868,1.8080070157616543,1.8348915096585765,1.8619744131045537,1.8892557260995855,1.9167354486436725,1.944413580736814,1.9722901223790101,2.000365073570261,2.0286384343105666,2.057110204599927,2.0857803844383422,2.1146489738258123,2.143715972762337,2.172981381247917,2.202445199282551,2.23210742686624,2.2619680639989843,2.292027110680783,2.322284566911636,2.3527404326915446,2.3833947080205076,2.4142473928985253,2.445298487325598,2.476547991301725,2.5079959048269074,2.5396422279011444,2.5714869605244357,2.6035301026967823,2.6357716544181833,2.6682116156886404,2.700849986508151,2.7336867668767164,2.7667219567943366,2.799955556261012,2.833387565276742,2.8670179838415266,2.900846811955366,2.93487404961826,2.969099696830209,3.003523753591213,3.0381462199012716,3.0729670957603847,3.1079863811685526,3.143204076125776,3.1786201806320533,3.2142346946873857,3.250047618291773,3.2860589514452148,3.3222686941477115,3.358676846399263,3.3952834081998695,3.4320883795495307,3.4690917604482463,3.506293550896017,3.543693750892843,3.5812923604387237,3.6190893795336585,3.657084808177648,3.6952786463706926,3.7336708941127923,3.7722615514039464,3.811050618244155,3.8500380946334185,3.889223980571737,3.9286082760591103,3.968190981095538,4.007972095681021,4.047951619815558,4.088129553499151,4.128505896731798,4.1690806495135,4.2098538118442566,4.2508253837240675,4.291995365152934,4.333363756130855,4.374930556657831,4.416695766733861,4.4586593863589465,4.500821415533086,4.543181854256281,4.585740702528531,4.6284979603498355,4.671453627720195,4.714607704639608,4.757960191108077,4.801511087125601,4.845260392692179,4.889208107807812,4.9333542324724995,4.977698766686242,5.022241710449039,5.066983063760894,5.1119228266218,5.157060999031763,5.2023975809907785,5.24793257249885,5.293665973555976,5.339597784162157,5.385728004317393,5.4320566340216825,5.478583673275028,5.525309122077428,5.572232980428883,5.619355248329392,5.666675925778956,5.714195012777576,5.761912509325249,5.809828415421978,5.857942731067761,5.906255456262599,5.954766591006492,6.00347613529944,6.052384089141443,6.1014904525324996,6.150795225472612,6.200298407961778,6.25,6.299900001587276,6.3499984127236075,6.400295233408993,6.450790463643434,6.50148410342693,6.5523761527594795,6.6034666116410845,6.654755480071745,6.706242758051459,6.757928445580228,6.809812542658053,6.861895049284931,6.914175965460865,6.9666552911858535,7.019333026459897,7.072209171282995,7.125283725655147,7.1785566895763555,7.232028063046617,7.2856978460659345,7.339566038634306,7.393632640751733,7.447897652418215,7.50236107363375,7.557022904398342,7.61188314471199,7.66694179457469,7.722198853986446,7.777654322947256,7.833308201457121,7.8891604895160405,7.9452111871240145,8.001460294281044,8.057907810987128,8.114553737242266,8.17139807304646,8.228440818399708,8.285681973302012,8.343121537753369,8.400759511753781,8.45859589530325,8.516630688401772,8.574863891049349,8.63329550324598,8.691925524991667,8.750753956286408,8.809780797130204,8.869006047523055,8.92842970746496,8.98805177695592,9.047872255995937,9.107891144585006,9.168108442723131,9.22852415041031,9.289138267646544,9.349950794431834,9.410961730766179,9.472171076649577,9.53357883208203,9.595184997063539,9.656989571594101,9.718992555673719,9.781193949302391,9.84359375248012,9.9061919652069,9.968988587482738,10.03198361930763,10.095177060681575,10.158568911604577,10.222159172076633,10.285947842097743,10.34993492166791,10.41412041078713,10.478504309455404,10.543086617672733,10.60786733543912,10.672846462754562,10.738023999619054,10.803399946032604,10.868974301995207,10.934747067506866,11.00071824256758,11.066887827177347,11.13325582133617,11.199822225044048,11.26658703830098,11.333550261106968,11.40071189346201,11.468071935366106,11.535630386819257,11.603387247821464,11.671342518372725,11.73949619847304,11.807848288122411,11.876398787320836,11.945147696068316,12.014095014364852,12.08324074221044,12.152584879605087,12.222127426548784,12.291868383041539,12.361807749083347,12.43194552467421,12.50228170981413,12.572816304503103,12.64354930874113,12.714480722528213,12.785610545864351,12.856938778749543,12.92846542118379,13.000190473167091,13.072113934699448,13.144235805780859,13.216556086411327,13.289074776590846,13.361791876319423,13.434707385597052,13.507821304423738,13.581133632799478,13.654644370724274,13.728353518198123,13.802261075221027,13.876367041792985,13.950671417914,14.025174203584069,14.099875398803196,14.174775003571373,14.249873017888607,14.325169441754895,14.400664275170238,14.476357518134634,14.552249170648086,14.628339232710593,14.704627704322155,14.78111458548277,14.857799876192443,14.93468357645117,15.011765686258949,15.089046205615785,15.166525134521676,15.24420247297662,15.32207822098062,15.400152378533674,15.478424945635783,15.556895922286948,15.635565308487168,15.714433104236441,15.79349930953477,15.872763924382152,15.952226948778591,16.031888382724084,16.111748226218634,16.191806479262233,16.272063141854893,16.352518213996603,16.433171695687374,16.51402358692719,16.595073887716072,16.676322598054,16.757769717940988,16.839415247377026,16.921259186362125,17.00330153489627,17.08554229297948,17.167981460611735,17.250619037793054,17.33345502452342,17.416489420802847,17.499722226631324,17.58315344200886,17.666783066935444,17.750611101411092,17.834637545435786,17.91886239900954,18.003285662132345,18.08790733480421,18.172727417025126,18.2577459087951,18.342962810114123,18.42837812098221,18.513991841399342,18.599803971365535,18.68581451088078,18.772023459945082,18.858430818558432,18.945036586720846,19.031840764432307,19.11884335169283,19.206044348502402,19.293443754861034,19.381041570768716,19.468837796225458,19.556832431231246,19.6450254757861,19.733416929889998,19.82200679354296,19.910795066744967,19.99978174949604,20.088966841796157,20.178350343645338,20.267932255043576,20.357712575990856,20.4476913064872,20.537868446532595,20.62824399612705,20.718817955270552,20.809590323963114,20.900561102204726,20.9917302899954,21.08309788733512,21.174663894223904,21.266428310661734,21.358391136648628,21.450552372184568,21.542912017269572,21.63547007190362,21.72822653608673,21.82118140981889,21.914334693100113,22.00768638593038,22.101236488309713,22.19498500023809,22.28893192171553,22.38307725274202,22.47742099331757,22.571963143442165,22.666703703115825,22.76164267233853,22.856780051110302,22.95211583943112,23.047650037300997,23.14338264471992,23.239313661687913,23.335443088204947,23.431770924271046,23.52829716988619,23.625021825050396,23.721944889763652,23.819066364025968,23.916386247837334,24.01390454119776,24.111621244107234,24.20953635656577,24.30764987857335,24.405961810129998,24.504472151235692,24.603180901890447,24.702088062094248,24.801193631847113,24.900497611149024,25]} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/tiny_positive.json b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/tiny_positive.json new file mode 100644 index 000000000000..6204739903ce --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/fixtures/julia/tiny_positive.json @@ -0,0 +1 @@ +{"t":[0,0.0099601593625498,0.0199203187250996,0.029880478087649404,0.0398406374501992,0.049800796812749,0.05976095617529881,0.0697211155378486,0.0796812749003984,0.08964143426294821,0.099601593625498,0.10956175298804781,0.11952191235059761,0.1294820717131474,0.1394422310756972,0.14940239043824702,0.1593625498007968,0.1693227091633466,0.17928286852589642,0.1892430278884462,0.199203187250996,0.20916334661354583,0.21912350597609562,0.2290836653386454,0.23904382470119523,0.24900398406374502,0.2589641434262948,0.2689243027888446,0.2788844621513944,0.28884462151394424,0.29880478087649404,0.30876494023904383,0.3187250996015936,0.3286852589641434,0.3386454183266932,0.34860557768924305,0.35856573705179284,0.36852589641434264,0.3784860557768924,0.3884462151394422,0.398406374501992,0.40836653386454186,0.41832669322709165,0.42828685258964144,0.43824701195219123,0.448207171314741,0.4581673306772908,0.4681274900398406,0.47808764940239046,0.48804780876494025,0.49800796812749004,0.5079681274900398,0.5179282868525896,0.5278884462151394,0.5378486055776892,0.547808764940239,0.5577689243027888,0.5677290836653387,0.5776892430278885,0.5876494023904383,0.5976095617529881,0.6075697211155379,0.6175298804780877,0.6274900398406374,0.6374501992031872,0.647410358565737,0.6573705179282868,0.6673306772908366,0.6772908366533864,0.6872509960159362,0.6972111553784861,0.7071713147410359,0.7171314741035857,0.7270916334661355,0.7370517928286853,0.7470119521912351,0.7569721115537849,0.7669322709163346,0.7768924302788844,0.7868525896414342,0.796812749003984,0.8067729083665338,0.8167330677290837,0.8266932270916335,0.8366533864541833,0.8466135458167331,0.8565737051792829,0.8665338645418327,0.8764940239043825,0.8864541832669323,0.896414342629482,0.9063745019920318,0.9163346613545816,0.9262948207171314,0.9362549800796812,0.9462151394422311,0.9561752988047809,0.9661354581673307,0.9760956175298805,0.9860557768924303,0.9960159362549801,1.0059760956175299,1.0159362549800797,1.0258964143426295,1.0358565737051793,1.045816733067729,1.0557768924302788,1.0657370517928286,1.0756972111553784,1.0856573705179282,1.095617529880478,1.1055776892430278,1.1155378486055776,1.1254980079681276,1.1354581673306774,1.1454183266932272,1.155378486055777,1.1653386454183268,1.1752988047808766,1.1852589641434264,1.1952191235059761,1.205179282868526,1.2151394422310757,1.2250996015936255,1.2350597609561753,1.245019920318725,1.254980079681275,1.2649402390438247,1.2749003984063745,1.2848605577689243,1.294820717131474,1.3047808764940239,1.3147410358565736,1.3247011952191234,1.3346613545816732,1.344621513944223,1.3545816733067728,1.3645418326693226,1.3745019920318724,1.3844621513944224,1.3944223107569722,1.404382470119522,1.4143426294820718,1.4243027888446216,1.4342629482071714,1.4442231075697212,1.454183266932271,1.4641434262948207,1.4741035856573705,1.4840637450199203,1.4940239043824701,1.50398406374502,1.5139442231075697,1.5239043824701195,1.5338645418326693,1.543824701195219,1.5537848605577689,1.5637450199203187,1.5737051792828685,1.5836653386454183,1.593625498007968,1.6035856573705178,1.6135458167330676,1.6235059760956174,1.6334661354581674,1.6434262948207172,1.653386454183267,1.6633466135458168,1.6733067729083666,1.6832669322709164,1.6932270916334662,1.703187250996016,1.7131474103585658,1.7231075697211156,1.7330677290836654,1.7430278884462151,1.752988047808765,1.7629482071713147,1.7729083665338645,1.7828685258964143,1.792828685258964,1.802788844621514,1.8127490039840637,1.8227091633466135,1.8326693227091633,1.842629482071713,1.8525896414342629,1.8625498007968126,1.8725099601593624,1.8824701195219125,1.8924302788844622,1.902390438247012,1.9123505976095618,1.9223107569721116,1.9322709163346614,1.9422310756972112,1.952191235059761,1.9621513944223108,1.9721115537848606,1.9820717131474104,1.9920318725099602,2.00199203187251,2.0119521912350598,2.0219123505976095,2.0318725099601593,2.041832669322709,2.051792828685259,2.0617529880478087,2.0717131474103585,2.0816733067729083,2.091633466135458,2.101593625498008,2.1115537848605577,2.1215139442231075,2.1314741035856573,2.141434262948207,2.151394422310757,2.1613545816733066,2.1713147410358564,2.181274900398406,2.191235059760956,2.201195219123506,2.2111553784860556,2.2211155378486054,2.231075697211155,2.241035856573705,2.250996015936255,2.260956175298805,2.270916334661355,2.2808764940239046,2.2908366533864544,2.300796812749004,2.310756972111554,2.3207171314741037,2.3306772908366535,2.3406374501992033,2.350597609561753,2.360557768924303,2.3705179282868527,2.3804780876494025,2.3904382470119523,2.400398406374502,2.410358565737052,2.4203187250996017,2.4302788844621515,2.4402390438247012,2.450199203187251,2.460159362549801,2.4701195219123506,2.4800796812749004,2.49003984063745,2.5,2.50996015936255,2.5199203187250996,2.5298804780876494,2.539840637450199,2.549800796812749,2.5597609561752988,2.5697211155378485,2.5796812749003983,2.589641434262948,2.599601593625498,2.6095617529880477,2.6195219123505975,2.6294820717131473,2.639442231075697,2.649402390438247,2.6593625498007967,2.6693227091633465,2.6792828685258963,2.689243027888446,2.699203187250996,2.7091633466135456,2.7191235059760954,2.729083665338645,2.739043824701195,2.749003984063745,2.758964143426295,2.768924302788845,2.7788844621513946,2.7888446215139444,2.798804780876494,2.808764940239044,2.818725099601594,2.8286852589641436,2.8386454183266934,2.848605577689243,2.858565737051793,2.8685258964143427,2.8784860557768925,2.8884462151394423,2.898406374501992,2.908366533864542,2.9183266932270917,2.9282868525896415,2.9382470119521913,2.948207171314741,2.958167330677291,2.9681274900398407,2.9780876494023905,2.9880478087649402,2.99800796812749,3.00796812749004,3.0179282868525896,3.0278884462151394,3.037848605577689,3.047808764940239,3.057768924302789,3.0677290836653386,3.0776892430278884,3.087649402390438,3.097609561752988,3.1075697211155378,3.1175298804780875,3.1274900398406373,3.137450199203187,3.147410358565737,3.1573705179282867,3.1673306772908365,3.1772908366533863,3.187250996015936,3.197211155378486,3.2071713147410357,3.2171314741035855,3.2270916334661353,3.237051792828685,3.247011952191235,3.256972111553785,3.266932270916335,3.2768924302788847,3.2868525896414345,3.2968127490039842,3.306772908366534,3.316733067729084,3.3266932270916336,3.3366533864541834,3.346613545816733,3.356573705179283,3.366533864541833,3.3764940239043826,3.3864541832669324,3.396414342629482,3.406374501992032,3.4163346613545817,3.4262948207171315,3.4362549800796813,3.446215139442231,3.456175298804781,3.4661354581673307,3.4760956175298805,3.4860557768924303,3.49601593625498,3.50597609561753,3.5159362549800797,3.5258964143426295,3.5358565737051793,3.545816733067729,3.555776892430279,3.5657370517928286,3.5756972111553784,3.585657370517928,3.595617529880478,3.605577689243028,3.6155378486055776,3.6254980079681274,3.635458167330677,3.645418326693227,3.6553784860557768,3.6653386454183265,3.6752988047808763,3.685258964143426,3.695219123505976,3.7051792828685257,3.7151394422310755,3.7250996015936253,3.735059760956175,3.745019920318725,3.754980079681275,3.764940239043825,3.7749003984063747,3.7848605577689245,3.7948207171314743,3.804780876494024,3.814741035856574,3.8247011952191237,3.8346613545816735,3.8446215139442232,3.854581673306773,3.864541832669323,3.8745019920318726,3.8844621513944224,3.894422310756972,3.904382470119522,3.914342629482072,3.9243027888446216,3.9342629482071714,3.944223107569721,3.954183266932271,3.9641434262948207,3.9741035856573705,3.9840637450199203,3.99402390438247,4.00398406374502,4.01394422310757,4.0239043824701195,4.03386454183267,4.043824701195219,4.053784860557769,4.063745019920319,4.073705179282869,4.083665338645418,4.0936254980079685,4.103585657370518,4.113545816733068,4.123505976095617,4.133466135458168,4.143426294820717,4.153386454183267,4.163346613545817,4.173306772908367,4.183266932270916,4.193227091633466,4.203187250996016,4.213147410358566,4.223107569721115,4.233067729083666,4.243027888446215,4.252988047808765,4.2629482071713145,4.272908366533865,4.282868525896414,4.292828685258964,4.302788844621514,4.312749003984064,4.322709163346613,4.3326693227091635,4.342629482071713,4.352589641434263,4.362549800796812,4.372509960159363,4.382470119521912,4.392430278884462,4.402390438247012,4.412350597609562,4.422310756972111,4.432270916334661,4.442231075697211,4.452191235059761,4.46215139442231,4.472111553784861,4.48207171314741,4.49203187250996,4.50199203187251,4.51195219123506,4.52191235059761,4.531872509960159,4.54183266932271,4.551792828685259,4.561752988047809,4.5717131474103585,4.581673306772909,4.591633466135458,4.601593625498008,4.611553784860558,4.621513944223108,4.631474103585657,4.6414342629482075,4.651394422310757,4.661354581673307,4.671314741035856,4.681274900398407,4.691235059760956,4.701195219123506,4.711155378486056,4.721115537848606,4.731075697211155,4.741035856573705,4.750996015936255,4.760956175298805,4.770916334661354,4.780876494023905,4.790836653386454,4.800796812749004,4.8107569721115535,4.820717131474104,4.830677290836653,4.840637450199203,4.850597609561753,4.860557768924303,4.870517928286852,4.8804780876494025,4.890438247011952,4.900398406374502,4.910358565737051,4.920318725099602,4.930278884462151,4.940239043824701,4.950199203187251,4.960159362549801,4.97011952191235,4.9800796812749,4.99003984063745,5],"y":[-1,-1,1,1,1,-1,-1,1,-1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,-1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,-1,-1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1,-1,1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,1,1,1,1,1,1,-1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,-1],"p":[0,1.99203187250996e-23,3.98406374501992e-23,5.976095617529881e-23,7.96812749003984e-23,9.9601593625498e-23,1.1952191235059761e-22,1.394422310756972e-22,1.593625498007968e-22,1.792828685258964e-22,1.99203187250996e-22,2.1912350597609563e-22,2.3904382470119523e-22,2.589641434262948e-22,2.788844621513944e-22,2.98804780876494e-22,3.187250996015936e-22,3.386454183266932e-22,3.585657370517928e-22,3.784860557768924e-22,3.98406374501992e-22,4.183266932270916e-22,4.3824701195219125e-22,4.581673306772909e-22,4.780876494023905e-22,4.980079681274901e-22,5.179282868525896e-22,5.378486055776892e-22,5.577689243027888e-22,5.776892430278884e-22,5.97609561752988e-22,6.175298804780876e-22,6.374501992031872e-22,6.573705179282868e-22,6.772908366533864e-22,6.97211155378486e-22,7.171314741035856e-22,7.370517928286852e-22,7.569721115537848e-22,7.768924302788844e-22,7.96812749003984e-22,8.167330677290836e-22,8.366533864541832e-22,8.565737051792828e-22,8.764940239043825e-22,8.96414342629482e-22,9.163346613545817e-22,9.362549800796812e-22,9.56175298804781e-22,9.760956175298804e-22,9.960159362549801e-22,1.0159362549800796e-21,1.0358565737051791e-21,1.0557768924302788e-21,1.0756972111553783e-21,1.095617529880478e-21,1.1155378486055775e-21,1.1354581673306772e-21,1.1553784860557767e-21,1.1752988047808764e-21,1.195219123505976e-21,1.2151394422310757e-21,1.2350597609561752e-21,1.2549800796812749e-21,1.2749003984063744e-21,1.294820717131474e-21,1.3147410358565736e-21,1.3346613545816733e-21,1.3545816733067728e-21,1.3745019920318725e-21,1.394422310756972e-21,1.4143426294820717e-21,1.4342629482071712e-21,1.4541832669322709e-21,1.4741035856573704e-21,1.49402390438247e-21,1.5139442231075696e-21,1.5338645418326693e-21,1.5537848605577688e-21,1.5737051792828685e-21,1.593625498007968e-21,1.6135458167330677e-21,1.6334661354581672e-21,1.6533864541832669e-21,1.6733067729083664e-21,1.6932270916334661e-21,1.7131474103585656e-21,1.7330677290836653e-21,1.752988047808765e-21,1.7729083665338643e-21,1.792828685258964e-21,1.8127490039840637e-21,1.8326693227091634e-21,1.8525896414342627e-21,1.8725099601593624e-21,1.892430278884462e-21,1.912350597609562e-21,1.932270916334661e-21,1.952191235059761e-21,1.9721115537848605e-21,1.9920318725099602e-21,2.0119521912350596e-21,2.0318725099601593e-21,2.051792828685259e-21,2.0717131474103583e-21,2.091633466135458e-21,2.1115537848605577e-21,2.1314741035856574e-21,2.1513944223107567e-21,2.1713147410358564e-21,2.191235059760956e-21,2.2111553784860558e-21,2.231075697211155e-21,2.2509960159362548e-21,2.2709163346613545e-21,2.290836653386454e-21,2.3107569721115535e-21,2.3306772908366532e-21,2.350597609561753e-21,2.3705179282868526e-21,2.390438247011952e-21,2.4103585657370516e-21,2.4302788844621513e-21,2.450199203187251e-21,2.4701195219123503e-21,2.49003984063745e-21,2.5099601593625497e-21,2.5298804780876494e-21,2.5498007968127487e-21,2.5697211155378484e-21,2.589641434262948e-21,2.609561752988048e-21,2.629482071713147e-21,2.649402390438247e-21,2.6693227091633465e-21,2.6892430278884462e-21,2.7091633466135455e-21,2.7290836653386452e-21,2.749003984063745e-21,2.7689243027888446e-21,2.788844621513944e-21,2.8087649402390437e-21,2.8286852589641433e-21,2.848605577689243e-21,2.8685258964143424e-21,2.888446215139442e-21,2.9083665338645418e-21,2.9282868525896415e-21,2.9482071713147408e-21,2.9681274900398405e-21,2.98804780876494e-21,3.0079681274900395e-21,3.027888446215139e-21,3.047808764940239e-21,3.0677290836653386e-21,3.087649402390438e-21,3.1075697211155376e-21,3.1274900398406373e-21,3.147410358565737e-21,3.1673306772908363e-21,3.187250996015936e-21,3.2071713147410357e-21,3.2270916334661354e-21,3.2470119521912347e-21,3.2669322709163344e-21,3.286852589641434e-21,3.3067729083665338e-21,3.326693227091633e-21,3.346613545816733e-21,3.3665338645418325e-21,3.3864541832669322e-21,3.4063745019920315e-21,3.426294820717131e-21,3.446215139442231e-21,3.466135458167331e-21,3.48605577689243e-21,3.50597609561753e-21,3.525896414342629e-21,3.545816733067729e-21,3.565737051792828e-21,3.585657370517928e-21,3.605577689243028e-21,3.6254980079681274e-21,3.645418326693227e-21,3.665338645418327e-21,3.685258964143426e-21,3.7051792828685255e-21,3.725099601593625e-21,3.745019920318725e-21,3.7649402390438246e-21,3.784860557768924e-21,3.804780876494024e-21,3.824701195219124e-21,3.8446215139442226e-21,3.864541832669322e-21,3.884462151394422e-21,3.904382470119522e-21,3.9243027888446214e-21,3.944223107569721e-21,3.964143426294821e-21,3.9840637450199205e-21,4.0039840637450194e-21,4.023904382470119e-21,4.043824701195219e-21,4.0637450199203185e-21,4.083665338645418e-21,4.103585657370518e-21,4.1235059760956176e-21,4.1434262948207165e-21,4.163346613545816e-21,4.183266932270916e-21,4.203187250996016e-21,4.223107569721115e-21,4.243027888446215e-21,4.262948207171315e-21,4.2828685258964144e-21,4.302788844621513e-21,4.322709163346613e-21,4.342629482071713e-21,4.3625498007968124e-21,4.382470119521912e-21,4.402390438247012e-21,4.4223107569721115e-21,4.442231075697211e-21,4.46215139442231e-21,4.48207171314741e-21,4.5019920318725096e-21,4.521912350597609e-21,4.541832669322709e-21,4.561752988047809e-21,4.581673306772908e-21,4.601593625498008e-21,4.621513944223107e-21,4.641434262948207e-21,4.6613545816733064e-21,4.681274900398406e-21,4.701195219123506e-21,4.7211155378486055e-21,4.741035856573705e-21,4.760956175298805e-21,4.780876494023904e-21,4.8007968127490035e-21,4.820717131474103e-21,4.840637450199203e-21,4.8605577689243026e-21,4.880478087649402e-21,4.900398406374502e-21,4.920318725099602e-21,4.940239043824701e-21,4.9601593625498e-21,4.9800796812749e-21,5e-21,5.0199203187250994e-21,5.039840637450199e-21,5.059760956175299e-21,5.079681274900398e-21,5.0996015936254975e-21,5.119521912350597e-21,5.139442231075697e-21,5.1593625498007965e-21,5.179282868525896e-21,5.199203187250996e-21,5.219123505976096e-21,5.2390438247011946e-21,5.258964143426294e-21,5.278884462151394e-21,5.298804780876494e-21,5.318725099601593e-21,5.338645418326693e-21,5.358565737051793e-21,5.3784860557768925e-21,5.3984063745019914e-21,5.418326693227091e-21,5.438247011952191e-21,5.4581673306772905e-21,5.47808764940239e-21,5.49800796812749e-21,5.5179282868525896e-21,5.537848605577689e-21,5.557768924302788e-21,5.577689243027888e-21,5.5976095617529876e-21,5.617529880478087e-21,5.637450199203187e-21,5.657370517928287e-21,5.6772908366533864e-21,5.697211155378486e-21,5.717131474103585e-21,5.737051792828685e-21,5.7569721115537844e-21,5.776892430278884e-21,5.796812749003984e-21,5.8167330677290835e-21,5.836653386454183e-21,5.856573705179283e-21,5.876494023904382e-21,5.8964143426294816e-21,5.916334661354581e-21,5.936254980079681e-21,5.956175298804781e-21,5.97609561752988e-21,5.99601593625498e-21,6.015936254980079e-21,6.035856573705179e-21,6.055776892430278e-21,6.075697211155378e-21,6.095617529880478e-21,6.1155378486055775e-21,6.135458167330677e-21,6.155378486055777e-21,6.175298804780876e-21,6.1952191235059755e-21,6.215139442231075e-21,6.235059760956175e-21,6.2549800796812746e-21,6.274900398406374e-21,6.294820717131474e-21,6.314741035856574e-21,6.3346613545816726e-21,6.354581673306772e-21,6.374501992031872e-21,6.394422310756972e-21,6.4143426294820714e-21,6.434262948207171e-21,6.454183266932271e-21,6.4741035856573705e-21,6.4940239043824694e-21,6.513944223107569e-21,6.533864541832669e-21,6.5537848605577685e-21,6.573705179282868e-21,6.593625498007968e-21,6.6135458167330676e-21,6.633466135458167e-21,6.653386454183266e-21,6.673306772908366e-21,6.693227091633466e-21,6.713147410358565e-21,6.733067729083665e-21,6.752988047808765e-21,6.7729083665338644e-21,6.792828685258964e-21,6.812749003984063e-21,6.832669322709164e-21,6.852589641434262e-21,6.872509960159363e-21,6.892430278884462e-21,6.912350597609561e-21,6.932270916334661e-21,6.95219123505976e-21,6.97211155378486e-21,6.99203187250996e-21,7.01195219123506e-21,7.031872509960159e-21,7.051792828685258e-21,7.071713147410358e-21,7.091633466135457e-21,7.111553784860558e-21,7.131474103585657e-21,7.151394422310757e-21,7.171314741035856e-21,7.191235059760955e-21,7.211155378486055e-21,7.231075697211154e-21,7.250996015936255e-21,7.270916334661354e-21,7.290836653386454e-21,7.310756972111553e-21,7.330677290836654e-21,7.350597609561753e-21,7.370517928286852e-21,7.390438247011952e-21,7.410358565737051e-21,7.430278884462151e-21,7.45019920318725e-21,7.470119521912351e-21,7.49003984063745e-21,7.509960159362549e-21,7.529880478087649e-21,7.549800796812748e-21,7.569721115537849e-21,7.589641434262947e-21,7.609561752988048e-21,7.629482071713147e-21,7.649402390438247e-21,7.669322709163346e-21,7.689243027888445e-21,7.709163346613546e-21,7.729083665338645e-21,7.749003984063745e-21,7.768924302788844e-21,7.788844621513944e-21,7.808764940239043e-21,7.828685258964142e-21,7.848605577689243e-21,7.868525896414342e-21,7.888446215139442e-21,7.908366533864541e-21,7.928286852589642e-21,7.94820717131474e-21,7.968127490039841e-21,7.98804780876494e-21,8.007968127490039e-21,8.02788844621514e-21,8.047808764940238e-21,8.067729083665339e-21,8.087649402390438e-21,8.107569721115538e-21,8.127490039840637e-21,8.147410358565736e-21,8.167330677290836e-21,8.187250996015935e-21,8.207171314741036e-21,8.227091633466135e-21,8.247011952191235e-21,8.266932270916334e-21,8.286852589641433e-21,8.306772908366534e-21,8.326693227091632e-21,8.346613545816733e-21,8.366533864541832e-21,8.386454183266932e-21,8.406374501992031e-21,8.426294820717132e-21,8.44621513944223e-21,8.46613545816733e-21,8.48605577689243e-21,8.505976095617529e-21,8.52589641434263e-21,8.545816733067728e-21,8.565737051792829e-21,8.585657370517928e-21,8.605577689243027e-21,8.625498007968127e-21,8.645418326693226e-21,8.665338645418327e-21,8.685258964143426e-21,8.705179282868526e-21,8.725099601593625e-21,8.745019920318725e-21,8.764940239043824e-21,8.784860557768923e-21,8.804780876494024e-21,8.824701195219123e-21,8.844621513944223e-21,8.864541832669322e-21,8.884462151394422e-21,8.904382470119521e-21,8.92430278884462e-21,8.944223107569721e-21,8.96414342629482e-21,8.98406374501992e-21,9.003984063745019e-21,9.02390438247012e-21,9.043824701195219e-21,9.063745019920317e-21,9.083665338645418e-21,9.103585657370517e-21,9.123505976095617e-21,9.143426294820716e-21,9.163346613545817e-21,9.183266932270916e-21,9.203187250996016e-21,9.223107569721115e-21,9.243027888446214e-21,9.262948207171314e-21,9.282868525896413e-21,9.302788844621514e-21,9.322709163346613e-21,9.342629482071713e-21,9.362549800796812e-21,9.382470119521911e-21,9.402390438247012e-21,9.42231075697211e-21,9.442231075697211e-21,9.46215139442231e-21,9.48207171314741e-21,9.50199203187251e-21,9.52191235059761e-21,9.541832669322709e-21,9.561752988047808e-21,9.581673306772908e-21,9.601593625498007e-21,9.621513944223107e-21,9.641434262948206e-21,9.661354581673307e-21,9.681274900398406e-21,9.701195219123505e-21,9.721115537848605e-21,9.741035856573704e-21,9.760956175298805e-21,9.780876494023904e-21,9.800796812749004e-21,9.820717131474103e-21,9.840637450199203e-21,9.860557768924302e-21,9.880478087649401e-21,9.900398406374502e-21,9.9203187250996e-21,9.940239043824701e-21,9.9601593625498e-21,9.9800796812749e-21,1e-20],"expected":[0,0.00009920477452738845,0.0003968190981095538,0.0008928429707464961,0.0015872763924382153,0.0024801193631847113,0.0035713718829859845,0.004861033951842033,0.006349105569752861,0.008035586736718465,0.009920477452738845,0.012003777717814003,0.014285487531943938,0.016765606895128647,0.019444135807368132,0.022321074268662405,0.025396422279011444,0.028670179838415258,0.03214234694687386,0.03581292360438723,0.03968190981095538,0.043749305566578314,0.04801511087125601,0.052479325724988486,0.05714195012777575,0.06200298407961778,0.06706242758051459,0.07232028063046618,0.07777654322947253,0.0834312153775337,0.08928429707464962,0.0953357883208203,0.10158568911604578,0.10803399946032602,0.11468071935366103,0.12152584879605087,0.12856938778749544,0.1358113363279948,0.14325169441754892,0.15089046205615783,0.15872763924382152,0.16676322598054003,0.17499722226631326,0.18342962810114125,0.19206044348502405,0.2008896684179616,0.20991730289995394,0.21914334693100107,0.228567800511103,0.23819066364025968,0.24801193631847113,0.25803161854573736,0.26824971032205835,0.27866621164743416,0.2892811225218647,0.30009444294535004,0.3111061729178901,0.32231631243948516,0.3337248615101348,0.34533182012983926,0.3571371882985985,0.36914096601641244,0.3813431532832812,0.39374375009920476,0.4063427564641831,0.4191401723782162,0.4321359978413041,0.4453302328534467,0.4587228774146441,0.47231393152489637,0.4861033951842035,0.5000912683925652,0.5142775511499817,0.5286622434564531,0.5432453453119792,0.55802685671656,0.5730067776701957,0.5881851081728862,0.6035618482246313,0.6191369978254313,0.6349105569752861,0.6508825256741956,0.6670529039221601,0.6834216917191791,0.699988889065253,0.7167544959603817,0.733718512404565,0.7508809383978032,0.7682417739400962,0.785801019031444,0.8035586736718464,0.8215147378613037,0.8396692115998158,0.8580220948873827,0.8765733877240043,0.8953230901096809,0.914271202044412,0.9334177235281981,0.9527626545610387,0.9723059951429343,0.9920477452738845,1.0119879049538896,1.0321264741829494,1.0524634529610641,1.0729988412882334,1.0937326391644577,1.1146648465897366,1.1357954635640704,1.1571244900874589,1.178651926159902,1.2003777717814001,1.222302026951953,1.2444246916715604,1.2667457659402235,1.2892652497579407,1.3119831431247124,1.3348994460405392,1.3580141585054206,1.381327280519357,1.404838812082348,1.428548753194394,1.4524571038554945,1.4765638640656498,1.50086903382486,1.5253726131331249,1.5500746019904446,1.574975000396819,1.6000738083522483,1.6253710258567324,1.6508666529102711,1.6765606895128649,1.7024531356645132,1.7285439913652163,1.7548332566149742,1.7813209314137868,1.8080070157616543,1.8348915096585765,1.8619744131045537,1.8892557260995855,1.9167354486436725,1.944413580736814,1.9722901223790101,2.000365073570261,2.0286384343105666,2.057110204599927,2.0857803844383422,2.1146489738258123,2.143715972762337,2.172981381247917,2.202445199282551,2.23210742686624,2.2619680639989843,2.292027110680783,2.322284566911636,2.3527404326915446,2.3833947080205076,2.4142473928985253,2.445298487325598,2.476547991301725,2.5079959048269074,2.5396422279011444,2.5714869605244357,2.6035301026967823,2.6357716544181833,2.6682116156886404,2.700849986508151,2.7336867668767164,2.7667219567943366,2.799955556261012,2.833387565276742,2.8670179838415266,2.900846811955366,2.93487404961826,2.969099696830209,3.003523753591213,3.0381462199012716,3.0729670957603847,3.1079863811685526,3.143204076125776,3.1786201806320533,3.2142346946873857,3.250047618291773,3.2860589514452148,3.3222686941477115,3.358676846399263,3.3952834081998695,3.4320883795495307,3.4690917604482463,3.506293550896017,3.543693750892843,3.5812923604387237,3.6190893795336585,3.657084808177648,3.6952786463706926,3.7336708941127923,3.7722615514039464,3.811050618244155,3.8500380946334185,3.889223980571737,3.9286082760591103,3.968190981095538,4.007972095681021,4.047951619815558,4.088129553499151,4.128505896731798,4.1690806495135,4.2098538118442566,4.2508253837240675,4.291995365152934,4.333363756130855,4.374930556657831,4.416695766733861,4.4586593863589465,4.500821415533086,4.543181854256281,4.585740702528531,4.6284979603498355,4.671453627720195,4.714607704639608,4.757960191108077,4.801511087125601,4.845260392692179,4.889208107807812,4.9333542324724995,4.977698766686242,5.022241710449039,5.066983063760894,5.1119228266218,5.157060999031763,5.2023975809907785,5.24793257249885,5.293665973555976,5.339597784162157,5.385728004317393,5.4320566340216825,5.478583673275028,5.525309122077428,5.572232980428883,5.619355248329392,5.666675925778956,5.714195012777576,5.761912509325249,5.809828415421978,5.857942731067761,5.906255456262599,5.954766591006492,6.00347613529944,6.052384089141443,6.1014904525324996,6.150795225472612,6.200298407961778,6.25,6.299900001587276,6.3499984127236075,6.400295233408993,6.450790463643434,6.50148410342693,6.5523761527594795,6.6034666116410845,6.654755480071745,6.706242758051459,6.757928445580228,6.809812542658053,6.861895049284931,6.914175965460865,6.9666552911858535,7.019333026459897,7.072209171282995,7.125283725655147,7.1785566895763555,7.232028063046617,7.2856978460659345,7.339566038634306,7.393632640751733,7.447897652418215,7.50236107363375,7.557022904398342,7.61188314471199,7.66694179457469,7.722198853986446,7.777654322947256,7.833308201457121,7.8891604895160405,7.9452111871240145,8.001460294281044,8.057907810987128,8.114553737242266,8.17139807304646,8.228440818399708,8.285681973302012,8.343121537753369,8.400759511753781,8.45859589530325,8.516630688401772,8.574863891049349,8.63329550324598,8.691925524991667,8.750753956286408,8.809780797130204,8.869006047523055,8.92842970746496,8.98805177695592,9.047872255995937,9.107891144585006,9.168108442723131,9.22852415041031,9.289138267646544,9.349950794431834,9.410961730766179,9.472171076649577,9.53357883208203,9.595184997063539,9.656989571594101,9.718992555673719,9.781193949302391,9.84359375248012,9.9061919652069,9.968988587482738,10.03198361930763,10.095177060681575,10.158568911604577,10.222159172076633,10.285947842097743,10.34993492166791,10.41412041078713,10.478504309455404,10.543086617672733,10.60786733543912,10.672846462754562,10.738023999619054,10.803399946032604,10.868974301995207,10.934747067506866,11.00071824256758,11.066887827177347,11.13325582133617,11.199822225044048,11.26658703830098,11.333550261106968,11.40071189346201,11.468071935366106,11.535630386819257,11.603387247821464,11.671342518372725,11.73949619847304,11.807848288122411,11.876398787320836,11.945147696068316,12.014095014364852,12.08324074221044,12.152584879605087,12.222127426548784,12.291868383041539,12.361807749083347,12.43194552467421,12.50228170981413,12.572816304503103,12.64354930874113,12.714480722528213,12.785610545864351,12.856938778749543,12.92846542118379,13.000190473167091,13.072113934699448,13.144235805780859,13.216556086411327,13.289074776590846,13.361791876319423,13.434707385597052,13.507821304423738,13.581133632799478,13.654644370724274,13.728353518198123,13.802261075221027,13.876367041792985,13.950671417914,14.025174203584069,14.099875398803196,14.174775003571373,14.249873017888607,14.325169441754895,14.400664275170238,14.476357518134634,14.552249170648086,14.628339232710593,14.704627704322155,14.78111458548277,14.857799876192443,14.93468357645117,15.011765686258949,15.089046205615785,15.166525134521676,15.24420247297662,15.32207822098062,15.400152378533674,15.478424945635783,15.556895922286948,15.635565308487168,15.714433104236441,15.79349930953477,15.872763924382152,15.952226948778591,16.031888382724084,16.111748226218634,16.191806479262233,16.272063141854893,16.352518213996603,16.433171695687374,16.51402358692719,16.595073887716072,16.676322598054,16.757769717940988,16.839415247377026,16.921259186362125,17.00330153489627,17.08554229297948,17.167981460611735,17.250619037793054,17.33345502452342,17.416489420802847,17.499722226631324,17.58315344200886,17.666783066935444,17.750611101411092,17.834637545435786,17.91886239900954,18.003285662132345,18.08790733480421,18.172727417025126,18.2577459087951,18.342962810114123,18.42837812098221,18.513991841399342,18.599803971365535,18.68581451088078,18.772023459945082,18.858430818558432,18.945036586720846,19.031840764432307,19.11884335169283,19.206044348502402,19.293443754861034,19.381041570768716,19.468837796225458,19.556832431231246,19.6450254757861,19.733416929889998,19.82200679354296,19.910795066744967,19.99978174949604,20.088966841796157,20.178350343645338,20.267932255043576,20.357712575990856,20.4476913064872,20.537868446532595,20.62824399612705,20.718817955270552,20.809590323963114,20.900561102204726,20.9917302899954,21.08309788733512,21.174663894223904,21.266428310661734,21.358391136648628,21.450552372184568,21.542912017269572,21.63547007190362,21.72822653608673,21.82118140981889,21.914334693100113,22.00768638593038,22.101236488309713,22.19498500023809,22.28893192171553,22.38307725274202,22.47742099331757,22.571963143442165,22.666703703115825,22.76164267233853,22.856780051110302,22.95211583943112,23.047650037300997,23.14338264471992,23.239313661687913,23.335443088204947,23.431770924271046,23.52829716988619,23.625021825050396,23.721944889763652,23.819066364025968,23.916386247837334,24.01390454119776,24.111621244107234,24.20953635656577,24.30764987857335,24.405961810129998,24.504472151235692,24.603180901890447,24.702088062094248,24.801193631847113,24.900497611149024,25]} diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/test.js b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/test.js new file mode 100644 index 000000000000..2d7b2e770b8c --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/test.js @@ -0,0 +1,150 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isAlmostSameValue = require( '@stdlib/number/float64/base/assert/is-almost-same-value' ); +var squaredHinge = require( './../lib' ); + + +// FIXTURES // + +var tinyPositive = require( './fixtures/julia/tiny_positive.json' ); +var smallPositive = require( './fixtures/julia/small_positive.json' ); +var tinyNegative = require( './fixtures/julia/tiny_negative.json' ); +var smallNegative = require( './fixtures/julia/small_negative.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof squaredHinge, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function computes the squared hinge loss for tiny positive values', function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = tinyPositive.t; + y = tinyPositive.y; + p = tinyPositive.p; + expected = tinyPositive.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the squared hinge loss for small positive values', function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = smallPositive.t; + y = smallPositive.y; + p = smallPositive.p; + expected = smallPositive.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the squared hinge loss for tiny negative values', function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = tinyNegative.t; + y = tinyNegative.y; + p = tinyNegative.p; + expected = tinyNegative.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the squared hinge loss for small negative values', function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = smallNegative.t; + y = smallNegative.y; + p = smallNegative.p; + expected = smallNegative.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN`', function test( t ) { + var v; + + v = squaredHinge( NaN, 1.0, 0.782 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( 1.0, NaN, 0.782 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( 1.0, 1.0, NaN ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( NaN, NaN, 0.782 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( NaN, NaN, NaN ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if y is not +1 or -1', function test( t ) { + var v; + + v = squaredHinge( 1.0, -0.9, 1.0 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( 1.0, 0.453, 0.76 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/test.native.js b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/test.native.js new file mode 100644 index 000000000000..394722f45bc1 --- /dev/null +++ b/lib/node_modules/@stdlib/ml/base/loss/float64/squared-hinge/test/test.native.js @@ -0,0 +1,159 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var isAlmostSameValue = require( '@stdlib/number/float64/base/assert/is-almost-same-value' ); +var tryRequire = require( '@stdlib/utils/try-require' ); + + +// FIXTURES // + +var tinyPositive = require( './fixtures/julia/tiny_positive.json' ); +var smallPositive = require( './fixtures/julia/small_positive.json' ); +var tinyNegative = require( './fixtures/julia/tiny_negative.json' ); +var smallNegative = require( './fixtures/julia/small_negative.json' ); + + +// VARIABLES // + +var squaredHinge = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( squaredHinge instanceof Error ) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof squaredHinge, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function computes the squared hinge loss for tiny positive values', opts, function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = tinyPositive.t; + y = tinyPositive.y; + p = tinyPositive.p; + expected = tinyPositive.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the squared hinge loss for small positive values', opts, function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = smallPositive.t; + y = smallPositive.y; + p = smallPositive.p; + expected = smallPositive.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the squared hinge loss for tiny negative values', opts, function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = tinyNegative.t; + y = tinyNegative.y; + p = tinyNegative.p; + expected = tinyNegative.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function computes the squared hinge loss for small negative values', opts, function test( t ) { + var expected; + var th; + var y; + var p; + var v; + var i; + + th = smallNegative.t; + y = smallNegative.y; + p = smallNegative.p; + expected = smallNegative.expected; + for ( i = 0; i < y.length; i++ ) { + v = squaredHinge( th[ i ], y[ i ], p[ i ] ); + t.strictEqual( isAlmostSameValue( v, expected[ i ], 0 ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) { + var v; + + v = squaredHinge( NaN, 1.0, 0.782 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( 1.0, NaN, 0.782 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( 1.0, 1.0, NaN ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( NaN, NaN, 0.782 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( NaN, NaN, NaN ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns `NaN` if y is not +1 or -1', opts, function test( t ) { + var v; + + v = squaredHinge( 1.0, -0.9, 1.0 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = squaredHinge( 1.0, 0.453, 0.76 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + t.end(); +});