calc-iaas
v0.0.5
Published
Calculate inter-annotator agreement using APIAA, AMIAA or ARRGMA methods
Downloads
154
Maintainers
Readme
calc-iaas
Calculate inter-annotator agreement using APIAA, AMIAA or ARRGMA methods.
Installing
- Run
npm install
Running
import { apiaa, amiaa, arrgma } from "calc-iaas";
const data = [
[5, 3, 1, 1, 1, 2, 4, 4, 3, 2, 2, 1],
[4, 2, 1, 3, 1, 1, 1, 4, 3, 2, 1, 1],
[5, 3, 1, 1, 1, 1, 4, 3, 2, 1, 1, 1],
];
console.log(apiaa(data, "pearson"));
console.log(amiaa(data, "pearson"));
console.log(arrgma(data, "pearson"));
console.log(apiaa(data, "spearman"));
console.log(amiaa(data, "spearman"));
console.log(arrgma(data, "spearman"));
API
apiaa
amiaa
arrgma
utils
transponse
All the implemented correlation methods assume that the arrays to be correlated are the rows of the number matrix passed as input. If you want to measure the correlation of the columns instead, you can use the transpose
function:
const data = [
[5, 4, 5],
[3, 2, 3],
[1, 1, 1],
[1, 3, 1],
[1, 1, 1],
[2, 1, 1],
[4, 1, 4],
[4, 4, 3],
[3, 3, 2],
[2, 2, 1],
[2, 1, 1],
[1, 1, 1],
];
console.log(apiaa(transpose(data)));
Bugs and stuff
Open a GitHub issue or, preferably, send me a pull request.
License
The MIT License (MIT)
Copyright (c) 2024 André Santos [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.