@wlearn/liblinear 0.1.0 → 0.2.0
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 +7 -0
- package/LICENSE +2 -1
- package/README.md +3 -2
- package/dist/liblinear.js +2 -0
- package/dist/liblinear.mjs +3 -0
- package/package.json +26 -8
- package/src/index.js +10 -5
- package/src/model.js +7 -5
- package/src/wasm.js +5 -7
- package/wasm/BUILD_INFO +1 -1
- package/wasm/linear.js +2 -0
- package/wasm/linear.cjs +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
- Depend on the CommonJS `@wlearn/core` release
|
|
5
|
+
- Add package homepage and GitHub issue metadata
|
|
6
|
+
|
|
7
|
+
- Wrap LinearModel with `createModelClass` for unified task detection
|
|
8
|
+
- Add `task` parameter: `'classification'` or `'regression'`, auto-detected from labels if omitted
|
|
9
|
+
|
|
3
10
|
## 0.1.0 (unreleased)
|
|
4
11
|
|
|
5
12
|
- Initial release
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
LIBLINEAR v2.50 compiled to WebAssembly. Linear classification and regression in browsers and Node.js.
|
|
4
4
|
|
|
5
|
-
Based on [LIBLINEAR v2.50](https://www.csie.ntu.edu.tw/~cjlin/liblinear/) (BSD-3-Clause). Zero dependencies.
|
|
5
|
+
Part of [wlearn](https://wlearn.org) ([GitHub](https://github.com/wlearn-org), [all packages](https://github.com/wlearn-org/wlearn#repository-structure)). Based on [LIBLINEAR v2.50](https://www.csie.ntu.edu.tw/~cjlin/liblinear/) (BSD-3-Clause). Zero dependencies. CommonJS.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ npm install @wlearn/liblinear
|
|
|
13
13
|
## Quick start
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
|
|
16
|
+
const { LinearModel } = require('@wlearn/liblinear')
|
|
17
17
|
|
|
18
18
|
const model = await LinearModel.create({
|
|
19
19
|
solver: 'L2R_LR',
|
|
@@ -83,6 +83,7 @@ const model = await LinearModel.create({ coerce: 'error' })
|
|
|
83
83
|
Async factory. Loads WASM module, returns a ready-to-use model.
|
|
84
84
|
|
|
85
85
|
Parameters:
|
|
86
|
+
- `task` -- `'classification'` or `'regression'`. Auto-detected from labels if omitted.
|
|
86
87
|
- `solver` -- solver type string or number (default: `'L2R_LR'`)
|
|
87
88
|
- `C` -- regularization parameter (default: `1.0`)
|
|
88
89
|
- `eps` -- stopping tolerance (default: `0.01`)
|