@datagrok-libraries/statistics
Advanced tools
Comparing version 1.2.8 to 1.2.9
# statistics changelog | ||
## 1.2.9 (2023-11-02) | ||
### Features | ||
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Implemented linear function. | ||
### Bug Fixes | ||
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Improved curves properties and rendering: | ||
* Fixed AUC calculation for logarithmic values. | ||
* Fixed exception if no x or y coordinates present. | ||
## 1.2.8 (2023-10-16) | ||
### Bug Fixes | ||
* [#2103](https://github.com/datagrok-ai/public/issues/2103): Removed series name from fitSeriesProperties. | ||
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Fixed proportional confidence interval rendering. | ||
## 1.2.7 (2023-09-11) | ||
@@ -10,3 +29,3 @@ | ||
* Added proper tooltips on properties | ||
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Added errorModel property | ||
* [#2101](https://github.com/datagrok-ai/public/issues/2101): Added errorModel property. | ||
@@ -13,0 +32,0 @@ ### Bug Fixes |
@@ -7,6 +7,6 @@ { | ||
"friendlyName": "statistics", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"description": "", | ||
"dependencies": { | ||
"datagrok-api": "^1.16.0", | ||
"datagrok-api": "^1.17.0", | ||
"@datagrok-libraries/utils": "^4.0.0", | ||
@@ -13,0 +13,0 @@ "cash-dom": "latest", |
@@ -210,2 +210,3 @@ import { Property } from 'datagrok-api/src/entities'; | ||
export declare function sigmoid(params: number[], x: number): number; | ||
export declare function linear(params: number[], x: number): number; | ||
export declare function getAuc(fittedCurve: (x: number) => number, data: { | ||
@@ -212,0 +213,0 @@ x: number[]; |
@@ -29,3 +29,3 @@ import * as DG from 'datagrok-api/dg'; | ||
/** Returns series statistics */ | ||
export declare function getSeriesStatistics(series: IFitSeries, fitFunc: FitFunction): FitStatistics; | ||
export declare function getSeriesStatistics(series: IFitSeries, fitFunc: FitFunction, logOptions?: LogOptions): FitStatistics; | ||
//# sourceMappingURL=fit-data.d.ts.map |
@@ -109,2 +109,4 @@ /* eslint-disable valid-jsdoc */ | ||
const { xs, ys } = getPointsArrays(chartData.series[i].points); | ||
if (xs.some((x) => !x) || ys.some((y) => !y)) | ||
continue; | ||
bounds = bounds.union(DG.Rect.fromXYArrays(xs, ys)); | ||
@@ -144,5 +146,5 @@ } | ||
/** Returns series statistics */ | ||
export function getSeriesStatistics(series, fitFunc) { | ||
const data = { x: series.points.filter((p) => !p.outlier).map((p) => p.x), | ||
y: series.points.filter((p) => !p.outlier).map((p) => p.y) }; | ||
export function getSeriesStatistics(series, fitFunc, logOptions) { | ||
const data = { x: series.points.filter((p) => !p.outlier).map((p) => (logOptions === null || logOptions === void 0 ? void 0 : logOptions.logX) ? Math.log10(p.x) : p.x), | ||
y: series.points.filter((p) => !p.outlier).map((p) => (logOptions === null || logOptions === void 0 ? void 0 : logOptions.logY) ? Math.log10(p.y) : p.y) }; | ||
if (!series.parameters) | ||
@@ -152,2 +154,2 @@ series.parameters = fitSeries(series, fitFunc).parameters; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZml0LWRhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmaXQtZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnQ0FBZ0M7QUFDaEMsT0FBTyxLQUFLLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV0QyxPQUFPLEVBQ0wsYUFBYSxFQUNiLE9BQU8sRUFDUCwyQkFBMkIsRUFDM0IsYUFBYSxFQUViLGNBQWMsRUFJZCxzQkFBc0IsRUFJdEIsbUJBQW1CLEVBQ25CLHNCQUFzQixFQUN0QixPQUFPLEdBSVIsTUFBTSxhQUFhLENBQUM7QUFRckIsaUZBQWlGO0FBQ2pGLFNBQVMsb0JBQW9CLENBQUMsVUFBeUI7SUFDckQsTUFBTSxDQUFDLEdBQVEsRUFBRSxDQUFDO0lBQ2xCLEtBQUssTUFBTSxDQUF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Pz8gRml0RXJyb3JNb2RlbC5DT05TVEFOVCBhcyBGaXRFcnJvck1vZGVsVHlwZSk7XG59XG5cbi8qKiBSZXR1cm5zIHNlcmllcyBzdGF0aXN0aWNzICovXG5leHBvcnQgZnVuY3Rpb24gZ2V0U2VyaWVzU3RhdGlzdGljcyhzZXJpZXM6IElGaXRTZXJpZXMsIGZpdEZ1bmM6IEZpdEZ1bmN0aW9uLCBsb2dPcHRpb25zPzogTG9nT3B0aW9ucyk6IEZpdFN0YXRpc3RpY3Mge1xuICBjb25zdCBkYXRhID0ge3g6IHNlcmllcy5wb2ludHMuZmlsdGVyKChwKSA9PiAhcC5vdXRsaWVyKS5tYXAoKHApID0+IGxvZ09wdGlvbnM/LmxvZ1ggPyBNYXRoLmxvZzEwKHAueCkgOiBwLngpLFxuICAgIHk6IHNlcmllcy5wb2ludHMuZmlsdGVyKChwKSA9PiAhcC5vdXRsaWVyKS5tYXAoKHApID0+IGxvZ09wdGlvbnM/LmxvZ1kgPyBNYXRoLmxvZzEwKHAueSkgOiBwLnkpfTtcbiAgaWYgKCFzZXJpZXMucGFyYW1ldGVycylcbiAgICBzZXJpZXMucGFyYW1ldGVycyA9IGZpdFNlcmllcyhzZXJpZXMsIGZpdEZ1bmMpLnBhcmFtZXRlcnM7XG4gIHJldHVybiBnZXRTdGF0aXN0aWNzKGRhdGEsIHNlcmllcy5wYXJhbWV0ZXJzLCBmaXRGdW5jLnksIHRydWUpO1xufVxuIl19 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
313448
1974
Updateddatagrok-api@^1.17.0