@datagrok/eda 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/128.js +2 -0
- package/dist/128.js.map +1 -0
- package/dist/23.js +1 -1
- package/dist/23.js.map +1 -1
- package/dist/{12a82b8001995d426ed2.wasm → 3cec7d4ab7dacdcb37e6.wasm} +0 -0
- package/dist/860.js +2 -0
- package/dist/860.js.map +1 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +93 -93
- package/scripts/command.txt +1 -1
- package/scripts/func.json +1 -664
- package/src/eda-tools.ts +52 -17
- package/src/eda-ui.ts +0 -114
- package/src/missing-values-imputation/ui-constants.ts +1 -1
- package/src/package.ts +20 -16
- package/src/pls/pls-constants.ts +7 -7
- package/src/pls/pls-ml.ts +2 -1
- package/src/pls/pls-tools.ts +8 -3
- package/src/tests/anova-tests.ts +1 -1
- package/src/tests/linear-methods-tests.ts +6 -1
- package/src/utils.ts +90 -0
- package/wasm/EDA.js +28 -1
- package/wasm/EDA.wasm +0 -0
- package/wasm/EDAAPI.js +22 -4
- package/wasm/EDAForWebWorker.js +1 -1
- package/wasm/PCA/PCA.cpp +49 -58
- package/wasm/PCA/PCA.h +19 -0
- package/wasm/pcaExport.cpp +25 -1
- package/wasm/workers/{principalComponentAnalysisWorker.js → principalComponentAnalysisNipalsWorker.js} +1 -1
- package/wasm/workers/principalComponentAnalysisWorkerUpd.js +16 -0
- package/dist/91.js +0 -2
- package/dist/91.js.map +0 -1
package/wasm/EDAForWebWorker.js
CHANGED
|
@@ -6,7 +6,7 @@ export var exportEDA = (() => {
|
|
|
6
6
|
function(exportEDA) {
|
|
7
7
|
exportEDA = exportEDA || {};
|
|
8
8
|
|
|
9
|
-
var Module=typeof exportEDA!="undefined"?exportEDA:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||268435456;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}var wasmBinaryFile;wasmBinaryFile="EDA.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(new URL('../wasm/EDA.wasm', import.meta.url)).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["f"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["j"];addOnInit(Module["asm"]["g"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(new URL('../wasm/EDA.wasm', import.meta.url)).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync().catch(readyPromiseReject);return{}}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function _abort(){abort("")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function getCFunc(ident){var func=Module["_"+ident];return func}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}function cwrap(ident,returnType,argTypes,opts){argTypes=argTypes||[];var numericArgs=argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}var asmLibraryArg={"a":___assert_fail,"b":___cxa_throw,"c":_abort,"e":_emscripten_memcpy_big,"d":_emscripten_resize_heap};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["g"]).apply(null,arguments)};var _principalComponentAnalysis=Module["_principalComponentAnalysis"]=function(){return(_principalComponentAnalysis=Module["_principalComponentAnalysis"]=Module["asm"]["h"]).apply(null,arguments)};var _error=Module["_error"]=function(){return(_error=Module["_error"]=Module["asm"]["i"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["k"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["l"]).apply(null,arguments)};var _partialLeastSquareRegression=Module["_partialLeastSquareRegression"]=function(){return(_partialLeastSquareRegression=Module["_partialLeastSquareRegression"]=Module["asm"]["m"]).apply(null,arguments)};var _generateDataset=Module["_generateDataset"]=function(){return(_generateDataset=Module["_generateDataset"]=Module["asm"]["n"]).apply(null,arguments)};var _normalizeDataset=Module["_normalizeDataset"]=function(){return(_normalizeDataset=Module["_normalizeDataset"]=Module["asm"]["o"]).apply(null,arguments)};var _trainLSSVM=Module["_trainLSSVM"]=function(){return(_trainLSSVM=Module["_trainLSSVM"]=Module["asm"]["p"]).apply(null,arguments)};var _predictByLSSVM=Module["_predictByLSSVM"]=function(){return(_predictByLSSVM=Module["_predictByLSSVM"]=Module["asm"]["q"]).apply(null,arguments)};var _trainAndAnalyzeLSSVM=Module["_trainAndAnalyzeLSSVM"]=function(){return(_trainAndAnalyzeLSSVM=Module["_trainAndAnalyzeLSSVM"]=Module["asm"]["r"]).apply(null,arguments)};var _fitLinearRegressionParamsWithDataNormalizing=Module["_fitLinearRegressionParamsWithDataNormalizing"]=function(){return(_fitLinearRegressionParamsWithDataNormalizing=Module["_fitLinearRegressionParamsWithDataNormalizing"]=Module["asm"]["s"]).apply(null,arguments)};var _fitLinearRegressionParams=Module["_fitLinearRegressionParams"]=function(){return(_fitLinearRegressionParams=Module["_fitLinearRegressionParams"]=Module["asm"]["t"]).apply(null,arguments)};var _fitSoftmax=Module["_fitSoftmax"]=function(){return(_fitSoftmax=Module["_fitSoftmax"]=Module["asm"]["u"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["v"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["w"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["x"]).apply(null,arguments)};var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=function(){return(___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=Module["asm"]["y"]).apply(null,arguments)};Module["ccall"]=ccall;Module["cwrap"]=cwrap;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();
|
|
9
|
+
var Module=typeof exportEDA!="undefined"?exportEDA:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||268435456;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}var wasmBinaryFile;wasmBinaryFile="EDA.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(new URL('../wasm/EDA.wasm', import.meta.url)).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["f"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["k"];addOnInit(Module["asm"]["g"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(new URL('../wasm/EDA.wasm', import.meta.url)).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync().catch(readyPromiseReject);return{}}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function _abort(){abort("")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function getCFunc(ident){var func=Module["_"+ident];return func}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret}function cwrap(ident,returnType,argTypes,opts){argTypes=argTypes||[];var numericArgs=argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}var asmLibraryArg={"a":___assert_fail,"b":___cxa_throw,"c":_abort,"e":_emscripten_memcpy_big,"d":_emscripten_resize_heap};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["g"]).apply(null,arguments)};var _principalComponentAnalysis=Module["_principalComponentAnalysis"]=function(){return(_principalComponentAnalysis=Module["_principalComponentAnalysis"]=Module["asm"]["h"]).apply(null,arguments)};var _error=Module["_error"]=function(){return(_error=Module["_error"]=Module["asm"]["i"]).apply(null,arguments)};var _principalComponentAnalysisNipals=Module["_principalComponentAnalysisNipals"]=function(){return(_principalComponentAnalysisNipals=Module["_principalComponentAnalysisNipals"]=Module["asm"]["j"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["l"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["m"]).apply(null,arguments)};var _partialLeastSquareRegression=Module["_partialLeastSquareRegression"]=function(){return(_partialLeastSquareRegression=Module["_partialLeastSquareRegression"]=Module["asm"]["n"]).apply(null,arguments)};var _generateDataset=Module["_generateDataset"]=function(){return(_generateDataset=Module["_generateDataset"]=Module["asm"]["o"]).apply(null,arguments)};var _normalizeDataset=Module["_normalizeDataset"]=function(){return(_normalizeDataset=Module["_normalizeDataset"]=Module["asm"]["p"]).apply(null,arguments)};var _trainLSSVM=Module["_trainLSSVM"]=function(){return(_trainLSSVM=Module["_trainLSSVM"]=Module["asm"]["q"]).apply(null,arguments)};var _predictByLSSVM=Module["_predictByLSSVM"]=function(){return(_predictByLSSVM=Module["_predictByLSSVM"]=Module["asm"]["r"]).apply(null,arguments)};var _trainAndAnalyzeLSSVM=Module["_trainAndAnalyzeLSSVM"]=function(){return(_trainAndAnalyzeLSSVM=Module["_trainAndAnalyzeLSSVM"]=Module["asm"]["s"]).apply(null,arguments)};var _fitLinearRegressionParamsWithDataNormalizing=Module["_fitLinearRegressionParamsWithDataNormalizing"]=function(){return(_fitLinearRegressionParamsWithDataNormalizing=Module["_fitLinearRegressionParamsWithDataNormalizing"]=Module["asm"]["t"]).apply(null,arguments)};var _fitLinearRegressionParams=Module["_fitLinearRegressionParams"]=function(){return(_fitLinearRegressionParams=Module["_fitLinearRegressionParams"]=Module["asm"]["u"]).apply(null,arguments)};var _fitSoftmax=Module["_fitSoftmax"]=function(){return(_fitSoftmax=Module["_fitSoftmax"]=Module["asm"]["v"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["w"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["x"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["y"]).apply(null,arguments)};var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=function(){return(___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=Module["asm"]["z"]).apply(null,arguments)};Module["ccall"]=ccall;Module["cwrap"]=cwrap;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
return exportEDA.ready
|
package/wasm/PCA/PCA.cpp
CHANGED
|
@@ -8,6 +8,8 @@ using namespace Eigen;
|
|
|
8
8
|
using pca::Float;
|
|
9
9
|
using pca::Integer;
|
|
10
10
|
using pca::Double;
|
|
11
|
+
using pca::MAX_ITER;
|
|
12
|
+
using pca::TOL;
|
|
11
13
|
|
|
12
14
|
/* Principal Component Analysis of the data: using correlation matrix.
|
|
13
15
|
data - input matrix;
|
|
@@ -80,67 +82,9 @@ int pca::pcaUsingCorrelationMatrix(Float * data,
|
|
|
80
82
|
return NO_ERROR;
|
|
81
83
|
} // pcaUsingCorrelationMatrix
|
|
82
84
|
|
|
83
|
-
/*{
|
|
84
|
-
// Here, we use a MODIFICATION of the algorithm given in
|
|
85
|
-
// Charu C. Aggarwal. Data Mining: The Textbook. Springer, 2015,
|
|
86
|
-
// (see page 42).
|
|
87
|
-
|
|
88
|
-
// check number of principal components
|
|
89
|
-
if (height < numOfPrincipalComponents || numOfPrincipalComponents < 1)
|
|
90
|
-
return UNCORRECT_ARGUMENTS_ERROR;
|
|
91
|
-
|
|
92
|
-
// assign data and Eigen matrix
|
|
93
|
-
Map< Matrix<Float, Dynamic, Dynamic, RowMajor> > dataMatrix(data, height, width);
|
|
94
|
-
|
|
95
|
-
Vector<Float, Dynamic> means = dataMatrix.rowwise().mean();
|
|
96
|
-
|
|
97
|
-
Matrix<Float, Dynamic, Dynamic> corMatrix
|
|
98
|
-
= dataMatrix * dataMatrix.transpose() / width - means * means.transpose();
|
|
99
|
-
|
|
100
|
-
// The following solver computes eigen vals & vectors: the order of eigen vals is increasing.
|
|
101
|
-
SelfAdjointEigenSolver<Matrix<Float, Dynamic, Dynamic>> eigensolver(corMatrix);
|
|
102
|
-
|
|
103
|
-
// Check result of eigen values & vectors computation.
|
|
104
|
-
if (eigensolver.info() != Success)
|
|
105
|
-
return COMPUTATION_ERROR;
|
|
106
|
-
|
|
107
|
-
// Check order of computed eigen values: increasing order is expected
|
|
108
|
-
Vector<Float, Dynamic> eigenVals = eigensolver.eigenvalues();
|
|
109
|
-
for(int i = 1; i < eigenVals.size(); i++)
|
|
110
|
-
if(eigenVals(i - 1) > eigenVals(i))
|
|
111
|
-
return METHOD_ERROR;
|
|
112
|
-
|
|
113
|
-
// get feature vectors, taking into account increasing order of computed eigen values
|
|
114
|
-
Matrix<Float, Dynamic, Dynamic, ColMajor> featureVectors
|
|
115
|
-
= (eigensolver.eigenvectors().rowwise().reverse())(all, seq(0, numOfPrincipalComponents - 1));
|
|
116
|
-
|
|
117
|
-
// assign principal components and Eigen matrix
|
|
118
|
-
Map< Matrix<Float, Dynamic, Dynamic, RowMajor> >
|
|
119
|
-
princCompMatrix(principalComponents, numOfPrincipalComponents, width);
|
|
120
|
-
|
|
121
|
-
// compute principal componets
|
|
122
|
-
princCompMatrix = featureVectors.transpose() * (dataMatrix.colwise() - means);
|
|
123
|
-
|
|
124
|
-
// computation of approximation
|
|
125
|
-
if (approxData != NULL)
|
|
126
|
-
{
|
|
127
|
-
// assign data and Eigen matrix
|
|
128
|
-
Map< Matrix<Float, Dynamic, Dynamic, RowMajor> > approxMatrix(approxData, height, width);
|
|
129
|
-
|
|
130
|
-
approxMatrix = (featureVectors * princCompMatrix).colwise() + means;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return NO_ERROR;
|
|
134
|
-
} */
|
|
135
|
-
|
|
136
85
|
// Maximum absolute deviation between arrays
|
|
137
86
|
Float pca::mad(Float * arr1, Float * arr2, const int length) noexcept
|
|
138
87
|
{
|
|
139
|
-
// Solution using Eigen: nice, but additional structures are created!
|
|
140
|
-
/*Map<Vector<Float, Dynamic>> vec1(arr1, length);
|
|
141
|
-
Map<Vector<Float, Dynamic>> vec2(arr2, length);
|
|
142
|
-
return ((vec1 - vec2).cwiseAbs()).maxCoeff();*/
|
|
143
|
-
|
|
144
88
|
// Naive solution
|
|
145
89
|
Float result = fabs(arr1[0] - arr2[0]);
|
|
146
90
|
|
|
@@ -148,4 +92,51 @@ Float pca::mad(Float * arr1, Float * arr2, const int length) noexcept
|
|
|
148
92
|
result = fmax(result, fabs(arr1[i] - arr2[i]));
|
|
149
93
|
|
|
150
94
|
return result;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* The NIPALS algorithm for PCA.
|
|
98
|
+
data - input matrix;
|
|
99
|
+
height, width - sizes of the input;
|
|
100
|
+
numOfPrincipalComponents - number of principal components to be computed;
|
|
101
|
+
principalComponents - the principal components computed.
|
|
102
|
+
|
|
103
|
+
Reference
|
|
104
|
+
H. Risvik. Principal component analysis (PCA) & NIPALS algorithm.
|
|
105
|
+
https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=a1a75889929b604cfefcb7cddfd58accce8d01d8
|
|
106
|
+
*/
|
|
107
|
+
int pca::nipals(Float* data,
|
|
108
|
+
const int height,
|
|
109
|
+
const int width,
|
|
110
|
+
const int numOfPrincipalComponents,
|
|
111
|
+
Float* principalComponents) noexcept
|
|
112
|
+
{
|
|
113
|
+
Map< Matrix<Float, Dynamic, Dynamic, ColMajor> > X(data, height, width);
|
|
114
|
+
Vector<Float, Dynamic> means = X.colwise().mean();
|
|
115
|
+
X = X.rowwise() - means.transpose();
|
|
116
|
+
X = X.colwise().normalized() * sqrt(height);
|
|
117
|
+
|
|
118
|
+
Map<Matrix<Float, Dynamic, Dynamic, ColMajor>> T(principalComponents, height, numOfPrincipalComponents);
|
|
119
|
+
Vector<Float, Dynamic> p(width);
|
|
120
|
+
Vector<Float, Dynamic> t(height);
|
|
121
|
+
Vector<Float, Dynamic> tNew(height);
|
|
122
|
+
|
|
123
|
+
for (int i = 0; i < numOfPrincipalComponents; ++i) {
|
|
124
|
+
t = X.col(i);
|
|
125
|
+
|
|
126
|
+
for (int j = 0; j < MAX_ITER; ++j) {
|
|
127
|
+
p = X.transpose() * t / t.squaredNorm();
|
|
128
|
+
p.normalize();
|
|
129
|
+
tNew = X * p;
|
|
130
|
+
|
|
131
|
+
if ((tNew - t).norm() < TOL)
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
t = tNew;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
T.col(i) = t;
|
|
138
|
+
X = X - t * p.transpose();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return 0;
|
|
151
142
|
}
|
package/wasm/PCA/PCA.h
CHANGED
|
@@ -23,6 +23,9 @@ namespace pca {
|
|
|
23
23
|
typedef int Integer;
|
|
24
24
|
typedef double Double;
|
|
25
25
|
|
|
26
|
+
const Float TOL = 0.000001f;
|
|
27
|
+
const Integer MAX_ITER = 100;
|
|
28
|
+
|
|
26
29
|
enum ResultCode {NO_ERROR = 0, UNCORRECT_ARGUMENTS_ERROR, COMPUTATION_ERROR, METHOD_ERROR};
|
|
27
30
|
|
|
28
31
|
/* Principal Component Analysis of the data: using correlation matrix.
|
|
@@ -42,6 +45,22 @@ namespace pca {
|
|
|
42
45
|
|
|
43
46
|
// Maximum absolute deviation between arrays
|
|
44
47
|
Float mad(Float * arr1, Float * arr2, const int length) noexcept;
|
|
48
|
+
|
|
49
|
+
/* The NIPALS algorithm for PCA.
|
|
50
|
+
data - input matrix;
|
|
51
|
+
height, width - sizes of the input;
|
|
52
|
+
numOfPrincipalComponents - number of principal components to be computed;
|
|
53
|
+
principalComponents - the principal components computed.
|
|
54
|
+
|
|
55
|
+
Reference
|
|
56
|
+
H. Risvik. Principal component analysis (PCA) & NIPALS algorithm.
|
|
57
|
+
https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=a1a75889929b604cfefcb7cddfd58accce8d01d8
|
|
58
|
+
*/
|
|
59
|
+
int nipals(Float* data,
|
|
60
|
+
const int height,
|
|
61
|
+
const int width,
|
|
62
|
+
const int numOfPrincipalComponents,
|
|
63
|
+
Float* principalComponents) noexcept;
|
|
45
64
|
};
|
|
46
65
|
|
|
47
66
|
#endif // PCA_H
|
package/wasm/pcaExport.cpp
CHANGED
|
@@ -23,6 +23,14 @@ extern "C" {
|
|
|
23
23
|
int principalComponentsNumOfColumns);
|
|
24
24
|
|
|
25
25
|
float error(float * data1, int data1Length, float * data2, int data2Length);
|
|
26
|
+
|
|
27
|
+
int principalComponentAnalysisNipals(float * data,
|
|
28
|
+
int dataNumOfRows,
|
|
29
|
+
int dataNumOfColumns,
|
|
30
|
+
int numOfPrincipalComponents,
|
|
31
|
+
float * principalComponents,
|
|
32
|
+
int principalComponentsNumOfRows,
|
|
33
|
+
int principalComponentsNumOfColumns);
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
#include "PCA\PCA.h"
|
|
@@ -61,4 +69,20 @@ float error(float * data1, int data1Length, float * data2, int data2Length)
|
|
|
61
69
|
return pca::mad(data1, data2, data1Length);
|
|
62
70
|
}
|
|
63
71
|
|
|
64
|
-
|
|
72
|
+
//name: principalComponentAnalysisNipals
|
|
73
|
+
//input: dataframe table
|
|
74
|
+
//input: column_list columns
|
|
75
|
+
//input: int componentsCount
|
|
76
|
+
//output: column_list components [new(columns.rowCount, componentsCount)]
|
|
77
|
+
//output: dataframe result [components]
|
|
78
|
+
EMSCRIPTEN_KEEPALIVE
|
|
79
|
+
int principalComponentAnalysisNipals(float * data,
|
|
80
|
+
int dataNumOfRows,
|
|
81
|
+
int dataNumOfColumns,
|
|
82
|
+
int numOfPrincipalComponents,
|
|
83
|
+
float * principalComponents,
|
|
84
|
+
int principalComponentsNumOfRows,
|
|
85
|
+
int principalComponentsNumOfColumns)
|
|
86
|
+
{
|
|
87
|
+
return pca::nipals(data, dataNumOfRows, dataNumOfColumns, numOfPrincipalComponents, principalComponents);
|
|
88
|
+
}
|
|
@@ -7,7 +7,7 @@ onmessage = async function (evt) {
|
|
|
7
7
|
exportEDA().then(module =>
|
|
8
8
|
{
|
|
9
9
|
let args = evt.data;
|
|
10
|
-
let result = cppWrapper(module, args, '
|
|
10
|
+
let result = cppWrapper(module, args, 'principalComponentAnalysisNipals', 'number');
|
|
11
11
|
postMessage({'callResult': result, 'args': args});
|
|
12
12
|
} )
|
|
13
13
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The following code is generated automatically.
|
|
2
|
+
|
|
3
|
+
import {exportEDA} from '../EDAForWebWorker';
|
|
4
|
+
import {cppWrapper} from '../callWasmForWebWorker.js';
|
|
5
|
+
|
|
6
|
+
onmessage = async function(evt) {
|
|
7
|
+
exportEDA().then((module) => {
|
|
8
|
+
const args = evt.data;
|
|
9
|
+
try {
|
|
10
|
+
const result = cppWrapper(module, args, 'principalComponentAnalysis', 'number');
|
|
11
|
+
postMessage({'callResult': result, 'args': args});
|
|
12
|
+
} catch (e) {
|
|
13
|
+
postMessage({'callResult': -1});
|
|
14
|
+
}
|
|
15
|
+
} );
|
|
16
|
+
};
|
package/dist/91.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var eda;(()=>{"use strict";var e,r,t={1091:(e,r,t)=>{var o=t(4829),a=t(3995);onmessage=async function(e){(0,o.D)().then((r=>{let t=e.data,o=(0,a.zz)(r,t,"principalComponentAnalysis","number");postMessage({callResult:o,args:t})}))}}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return t[e](n,n.exports,a),n.loaded=!0,n.exports}a.m=t,a.x=()=>{var e=a.O(void 0,[23],(()=>a(1091)));return a.O(e)},a.amdO={},e=[],a.O=(r,t,o,n)=>{if(!t){var i=1/0;for(l=0;l<e.length;l++){for(var[t,o,n]=e[l],s=!0,c=0;c<t.length;c++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](t[c])))?t.splice(c--,1):(s=!1,n<i&&(i=n));if(s){e.splice(l--,1);var p=o();void 0!==p&&(r=p)}}return r}n=n||0;for(var l=e.length;l>0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[t,o,n]},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=self.location+"";var e={91:1};a.f.i=(r,t)=>{e[r]||importScripts(a.p+a.u(r))};var r=self.webpackChunkeda=self.webpackChunkeda||[],t=r.push.bind(r);r.push=r=>{var[o,n,i]=r;for(var s in n)a.o(n,s)&&(a.m[s]=n[s]);for(i&&i(a);o.length;)e[o.pop()]=1;t(r)}})(),r=a.x,a.x=()=>a.e(23).then(r);var n=a.x();eda=n})();
|
|
2
|
-
//# sourceMappingURL=91.js.map
|
package/dist/91.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"91.js","mappings":"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","sources":["webpack://eda/webpack/runtime/chunk loaded","webpack://eda/webpack/runtime/startup chunk dependencies","webpack://eda/./wasm/workers/principalComponentAnalysisWorker.js","webpack://eda/webpack/bootstrap","webpack://eda/webpack/runtime/amd options","webpack://eda/webpack/runtime/define property getters","webpack://eda/webpack/runtime/ensure chunk","webpack://eda/webpack/runtime/get javascript chunk filename","webpack://eda/webpack/runtime/global","webpack://eda/webpack/runtime/harmony module decorator","webpack://eda/webpack/runtime/hasOwnProperty shorthand","webpack://eda/webpack/runtime/publicPath","webpack://eda/webpack/runtime/importScripts chunk loading","webpack://eda/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(23).then(next);\n};","// The following code is generated automatically.\n\nimport {exportEDA} from '../../wasm/EDAForWebWorker';\nimport {cppWrapper} from '../../wasm/callWasmForWebWorker.js';\n\nonmessage = async function (evt) {\n exportEDA().then(module => \n {\n let args = evt.data;\n let result = cppWrapper(module, args, 'principalComponentAnalysis', 'number');\n postMessage({'callResult': result, 'args': args});\n } )\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [23], () => (__webpack_require__(1091)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","__webpack_require__.amdO = {};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t91: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkeda\"] = self[\"webpackChunkeda\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["deferred","next","onmessage","async","evt","then","module","args","data","result","postMessage","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","id","loaded","__webpack_modules__","m","x","__webpack_exports__","O","amdO","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","d","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","this","Function","window","hmd","create","children","set","Error","obj","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","tagName","toUpperCase","src","scripts","getElementsByTagName","test","replace","p","b","self","installedChunks","chunkLoadingGlobal","parentChunkLoadingFunction","push","bind","moreModules","runtime","pop"],"sourceRoot":""}
|