@elaraai/east-py-datascience 0.0.2-beta.1
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/LICENSE.md +18 -0
- package/README.md +104 -0
- package/dist/gp/gp.d.ts +398 -0
- package/dist/gp/gp.d.ts.map +1 -0
- package/dist/gp/gp.js +170 -0
- package/dist/gp/gp.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/lightgbm/lightgbm.d.ts +494 -0
- package/dist/lightgbm/lightgbm.d.ts.map +1 -0
- package/dist/lightgbm/lightgbm.js +155 -0
- package/dist/lightgbm/lightgbm.js.map +1 -0
- package/dist/mads/mads.d.ts +413 -0
- package/dist/mads/mads.d.ts.map +1 -0
- package/dist/mads/mads.js +221 -0
- package/dist/mads/mads.js.map +1 -0
- package/dist/ngboost/ngboost.d.ts +433 -0
- package/dist/ngboost/ngboost.d.ts.map +1 -0
- package/dist/ngboost/ngboost.js +178 -0
- package/dist/ngboost/ngboost.js.map +1 -0
- package/dist/optuna/optuna.d.ts +797 -0
- package/dist/optuna/optuna.d.ts.map +1 -0
- package/dist/optuna/optuna.js +268 -0
- package/dist/optuna/optuna.js.map +1 -0
- package/dist/scipy/scipy.d.ts +954 -0
- package/dist/scipy/scipy.d.ts.map +1 -0
- package/dist/scipy/scipy.js +287 -0
- package/dist/scipy/scipy.js.map +1 -0
- package/dist/shap/shap.d.ts +657 -0
- package/dist/shap/shap.d.ts.map +1 -0
- package/dist/shap/shap.js +241 -0
- package/dist/shap/shap.js.map +1 -0
- package/dist/simanneal/simanneal.d.ts +531 -0
- package/dist/simanneal/simanneal.d.ts.map +1 -0
- package/dist/simanneal/simanneal.js +231 -0
- package/dist/simanneal/simanneal.js.map +1 -0
- package/dist/sklearn/sklearn.d.ts +1272 -0
- package/dist/sklearn/sklearn.d.ts.map +1 -0
- package/dist/sklearn/sklearn.js +307 -0
- package/dist/sklearn/sklearn.js.map +1 -0
- package/dist/torch/torch.d.ts +658 -0
- package/dist/torch/torch.d.ts.map +1 -0
- package/dist/torch/torch.js +233 -0
- package/dist/torch/torch.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +81 -0
- package/dist/types.js.map +1 -0
- package/dist/xgboost/xgboost.d.ts +504 -0
- package/dist/xgboost/xgboost.d.ts.map +1 -0
- package/dist/xgboost/xgboost.js +177 -0
- package/dist/xgboost/xgboost.js.map +1 -0
- package/package.json +82 -0
package/dist/gp/gp.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Gaussian Process platform functions for East.
|
|
7
|
+
*
|
|
8
|
+
* Provides Gaussian Process regression using scikit-learn.
|
|
9
|
+
* Uses cloudpickle for model serialization.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
import { East, StructType, VariantType, OptionType, IntegerType, FloatType, BooleanType, BlobType, StringType, } from "@elaraai/east";
|
|
14
|
+
import { VectorType, MatrixType } from "../types.js";
|
|
15
|
+
// Re-export shared types for convenience
|
|
16
|
+
export { VectorType, MatrixType } from "../types.js";
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// Enum Types
|
|
19
|
+
// ============================================================================
|
|
20
|
+
/**
|
|
21
|
+
* Kernel type for Gaussian Process.
|
|
22
|
+
*/
|
|
23
|
+
export const GPKernelType = VariantType({
|
|
24
|
+
/** Radial Basis Function (squared exponential) */
|
|
25
|
+
rbf: StructType({}),
|
|
26
|
+
/** Matern with nu=1/2 (exponential) */
|
|
27
|
+
matern_1_2: StructType({}),
|
|
28
|
+
/** Matern with nu=3/2 */
|
|
29
|
+
matern_3_2: StructType({}),
|
|
30
|
+
/** Matern with nu=5/2 */
|
|
31
|
+
matern_5_2: StructType({}),
|
|
32
|
+
/** Rational Quadratic */
|
|
33
|
+
rational_quadratic: StructType({}),
|
|
34
|
+
/** Dot Product (linear) */
|
|
35
|
+
dot_product: StructType({}),
|
|
36
|
+
});
|
|
37
|
+
// ============================================================================
|
|
38
|
+
// Config Types
|
|
39
|
+
// ============================================================================
|
|
40
|
+
/**
|
|
41
|
+
* Configuration for Gaussian Process Regressor.
|
|
42
|
+
*/
|
|
43
|
+
export const GPConfigType = StructType({
|
|
44
|
+
/** Kernel type (default rbf) */
|
|
45
|
+
kernel: OptionType(GPKernelType),
|
|
46
|
+
/** Noise level added to diagonal (default 1e-10) */
|
|
47
|
+
alpha: OptionType(FloatType),
|
|
48
|
+
/** Number of restarts for optimizer (default 0) */
|
|
49
|
+
n_restarts_optimizer: OptionType(IntegerType),
|
|
50
|
+
/** Whether to normalize target values (default false) */
|
|
51
|
+
normalize_y: OptionType(BooleanType),
|
|
52
|
+
/** Random seed for reproducibility */
|
|
53
|
+
random_state: OptionType(IntegerType),
|
|
54
|
+
});
|
|
55
|
+
// ============================================================================
|
|
56
|
+
// Result Types
|
|
57
|
+
// ============================================================================
|
|
58
|
+
/**
|
|
59
|
+
* Result type for GP prediction with uncertainty.
|
|
60
|
+
*/
|
|
61
|
+
export const GPPredictResultType = StructType({
|
|
62
|
+
/** Predicted mean values */
|
|
63
|
+
mean: VectorType,
|
|
64
|
+
/** Predicted standard deviation (uncertainty) */
|
|
65
|
+
std: VectorType,
|
|
66
|
+
});
|
|
67
|
+
// ============================================================================
|
|
68
|
+
// Model Blob Types
|
|
69
|
+
// ============================================================================
|
|
70
|
+
/**
|
|
71
|
+
* Model blob type for serialized GP models.
|
|
72
|
+
*/
|
|
73
|
+
export const GPModelBlobType = VariantType({
|
|
74
|
+
/** Gaussian Process Regressor */
|
|
75
|
+
gp_regressor: StructType({
|
|
76
|
+
/** Cloudpickle serialized model */
|
|
77
|
+
data: BlobType,
|
|
78
|
+
/** Number of input features */
|
|
79
|
+
n_features: IntegerType,
|
|
80
|
+
/** Kernel type name for reference */
|
|
81
|
+
kernel_type: StringType,
|
|
82
|
+
}),
|
|
83
|
+
});
|
|
84
|
+
// ============================================================================
|
|
85
|
+
// Platform Functions
|
|
86
|
+
// ============================================================================
|
|
87
|
+
/**
|
|
88
|
+
* Train a Gaussian Process Regressor.
|
|
89
|
+
*
|
|
90
|
+
* @param X - Feature matrix
|
|
91
|
+
* @param y - Target vector
|
|
92
|
+
* @param config - GP configuration
|
|
93
|
+
* @returns Trained GP model blob
|
|
94
|
+
*/
|
|
95
|
+
export const gp_train = East.platform("gp_train", [MatrixType, VectorType, GPConfigType], GPModelBlobType);
|
|
96
|
+
/**
|
|
97
|
+
* Make predictions with a trained Gaussian Process.
|
|
98
|
+
*
|
|
99
|
+
* Returns point predictions (mean only).
|
|
100
|
+
*
|
|
101
|
+
* @param model - Trained GP model blob
|
|
102
|
+
* @param X - Feature matrix
|
|
103
|
+
* @returns Predicted values
|
|
104
|
+
*/
|
|
105
|
+
export const gp_predict = East.platform("gp_predict", [GPModelBlobType, MatrixType], VectorType);
|
|
106
|
+
/**
|
|
107
|
+
* Make predictions with uncertainty estimates.
|
|
108
|
+
*
|
|
109
|
+
* Returns both mean and standard deviation.
|
|
110
|
+
*
|
|
111
|
+
* @param model - Trained GP model blob
|
|
112
|
+
* @param X - Feature matrix
|
|
113
|
+
* @returns Prediction result with mean and std
|
|
114
|
+
*/
|
|
115
|
+
export const gp_predict_std = East.platform("gp_predict_std", [GPModelBlobType, MatrixType], GPPredictResultType);
|
|
116
|
+
// ============================================================================
|
|
117
|
+
// Grouped Export
|
|
118
|
+
// ============================================================================
|
|
119
|
+
/**
|
|
120
|
+
* Type definitions for GP functions.
|
|
121
|
+
*/
|
|
122
|
+
export const GPTypes = {
|
|
123
|
+
/** Vector type (array of floats) */
|
|
124
|
+
VectorType,
|
|
125
|
+
/** Matrix type (2D array of floats) */
|
|
126
|
+
MatrixType,
|
|
127
|
+
/** Kernel type */
|
|
128
|
+
GPKernelType,
|
|
129
|
+
/** Configuration type */
|
|
130
|
+
GPConfigType,
|
|
131
|
+
/** Prediction result type with uncertainty */
|
|
132
|
+
GPPredictResultType,
|
|
133
|
+
/** Model blob type for GP models */
|
|
134
|
+
ModelBlobType: GPModelBlobType,
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Gaussian Process regression.
|
|
138
|
+
*
|
|
139
|
+
* Provides probabilistic regression with uncertainty quantification.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { East, variant } from "@elaraai/east";
|
|
144
|
+
* import { GP } from "@elaraai/east-py-datascience";
|
|
145
|
+
*
|
|
146
|
+
* const train = East.function([], GP.Types.ModelBlobType, $ => {
|
|
147
|
+
* const X = $.let([[1.0], [2.0], [3.0], [4.0]]);
|
|
148
|
+
* const y = $.let([1.0, 4.0, 9.0, 16.0]);
|
|
149
|
+
* const config = $.let({
|
|
150
|
+
* kernel: variant('some', variant('rbf', {})),
|
|
151
|
+
* alpha: variant('some', 1e-10),
|
|
152
|
+
* n_restarts_optimizer: variant('some', 5n),
|
|
153
|
+
* normalize_y: variant('some', true),
|
|
154
|
+
* random_state: variant('some', 42n),
|
|
155
|
+
* });
|
|
156
|
+
* return $.return(GP.train(X, y, config));
|
|
157
|
+
* });
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export const GP = {
|
|
161
|
+
/** Train GP regressor */
|
|
162
|
+
train: gp_train,
|
|
163
|
+
/** Make predictions (mean only) */
|
|
164
|
+
predict: gp_predict,
|
|
165
|
+
/** Make predictions with uncertainty */
|
|
166
|
+
predictStd: gp_predict_std,
|
|
167
|
+
/** Type definitions */
|
|
168
|
+
Types: GPTypes,
|
|
169
|
+
};
|
|
170
|
+
//# sourceMappingURL=gp.js.map
|
|
@@ -0,0 +1 @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,8CAA8C;IAC9C,mBAAmB;IACnB,oCAAoC;IACpC,aAAa,EAAE,eAAe;CACxB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG;IACd,yBAAyB;IACzB,KAAK,EAAE,QAAQ;IACf,mCAAmC;IACnC,OAAO,EAAE,UAAU;IACnB,wCAAwC;IACxC,UAAU,EAAE,cAAc;IAC1B,uBAAuB;IACvB,KAAK,EAAE,OAAO;CACR,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* East Data Science - ML and optimization platform functions for East.
|
|
7
|
+
*
|
|
8
|
+
* This package provides data science capabilities for East programs:
|
|
9
|
+
* - MADS: Derivative-free blackbox optimization (PyNomadBBO)
|
|
10
|
+
* - Optuna: Bayesian optimization with TPE sampler
|
|
11
|
+
* - SimAnneal: Discrete optimization with Simulated Annealing
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export { MADS, mads_optimize, MADSTypes, VectorType, ScalarObjectiveType, MADSBoundsType, MADSConstraintType, MADSDirectionType, MADSConfigType, MADSResultType, } from "./mads/mads.js";
|
|
16
|
+
export { Optuna, optuna_optimize, OptunaTypes, ParamValueType, ParamSpaceKindType, ParamSpaceType, NamedParamType, OptimizationDirectionType, PrunerType, OptunaStudyConfigType, TrialResultType, StudyResultType, ObjectiveFunctionType, } from "./optuna/optuna.js";
|
|
17
|
+
export { SimAnneal, simanneal_optimize, simanneal_optimize_permutation, simanneal_optimize_subset, SimAnnealTypes, DiscreteStateType, EnergyFunctionType, MoveFunctionType, PermutationEnergyType, SubsetEnergyType, AnnealConfigType, AnnealResultType, } from "./simanneal/simanneal.js";
|
|
18
|
+
export { Sklearn, sklearn_train_test_split, sklearn_standard_scaler_fit, sklearn_standard_scaler_transform, sklearn_min_max_scaler_fit, sklearn_min_max_scaler_transform, sklearn_metrics_regression, sklearn_metrics_classification, sklearn_regressor_chain_train, sklearn_regressor_chain_predict, SklearnTypes, SplitConfigType, SplitResultType, RegressionMetricsType, ClassificationMetricsType, SklearnModelBlobType, MultiTargetType, RegressorChainBaseConfigType, RegressorChainConfigType, } from "./sklearn/sklearn.js";
|
|
19
|
+
export { Scipy, scipy_curve_fit, scipy_stats_describe, scipy_stats_pearsonr, scipy_stats_spearmanr, scipy_interpolate_1d_fit, scipy_interpolate_1d_predict, scipy_optimize_minimize, scipy_optimize_minimize_quadratic, ScipyTypes, OptimizeMethodType, InterpolationKindType, OptimizeConfigType, InterpolateConfigType, ParamBoundsType, CustomCurveFunctionType, CurveFunctionType, CurveFitConfigType, QuadraticConfigType, StatsDescribeResultType, CorrelationResultType, CurveFitResultType, OptimizeResultType, ScipyModelBlobType, } from "./scipy/scipy.js";
|
|
20
|
+
export { XGBoost, xgboost_train_regressor, xgboost_train_classifier, xgboost_predict, xgboost_predict_class, xgboost_predict_proba, XGBoostTypes, XGBoostConfigType, XGBoostModelBlobType, } from "./xgboost/xgboost.js";
|
|
21
|
+
export { LightGBM, lightgbm_train_regressor, lightgbm_train_classifier, lightgbm_predict, lightgbm_predict_class, lightgbm_predict_proba, LightGBMTypes, LightGBMConfigType, LightGBMModelBlobType, } from "./lightgbm/lightgbm.js";
|
|
22
|
+
export { NGBoost, ngboost_train_regressor, ngboost_predict, ngboost_predict_dist, NGBoostTypes, NGBoostDistributionType, NGBoostConfigType, NGBoostPredictConfigType, NGBoostPredictResultType, NGBoostModelBlobType, } from "./ngboost/ngboost.js";
|
|
23
|
+
export { Shap, shap_tree_explainer_create, shap_kernel_explainer_create, shap_compute_values, shap_feature_importance, ShapTypes, ShapResultType, FeatureImportanceType, ShapModelBlobType, AnyModelBlobType, StringVectorType, } from "./shap/shap.js";
|
|
24
|
+
export { Torch, torch_mlp_train, torch_mlp_predict, TorchTypes, TorchActivationType, TorchLossType, TorchOptimizerType, TorchMLPConfigType, TorchTrainConfigType, TorchTrainResultType, TorchTrainOutputType, TorchModelBlobType, } from "./torch/torch.js";
|
|
25
|
+
export { GP, gp_train, gp_predict, gp_predict_std, GPTypes, GPKernelType, GPConfigType, GPPredictResultType, GPModelBlobType, } from "./gp/gp.js";
|
|
26
|
+
export { VectorType as SharedVectorType, MatrixType as SharedMatrixType, ScalarObjectiveType as SharedScalarObjectiveType, VectorObjectiveType, LabelVectorType, } from "./types.js";
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAGH,OAAO,EACH,IAAI,EACJ,aAAa,EACb,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,cAAc,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACH,MAAM,EACN,eAAe,EACf,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,qBAAqB,GACxB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACH,SAAS,EACT,kBAAkB,EAClB,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACH,OAAO,EACP,wBAAwB,EACxB,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B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AC;AAGxB,OAAO,EACH,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACH,EAAE,EACF,QAAQ,EACR,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,eAAe,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACH,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,EAC9B,mBAAmB,IAAI,yBAAyB,EAChD,mBAAmB,EACnB,eAAe,GAClB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* East Data Science - ML and optimization platform functions for East.
|
|
7
|
+
*
|
|
8
|
+
* This package provides data science capabilities for East programs:
|
|
9
|
+
* - MADS: Derivative-free blackbox optimization (PyNomadBBO)
|
|
10
|
+
* - Optuna: Bayesian optimization with TPE sampler
|
|
11
|
+
* - SimAnneal: Discrete optimization with Simulated Annealing
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
// MADS - Derivative-free optimization
|
|
16
|
+
export { MADS, mads_optimize, MADSTypes, VectorType, ScalarObjectiveType, MADSBoundsType, MADSConstraintType, MADSDirectionType, MADSConfigType, MADSResultType, } from "./mads/mads.js";
|
|
17
|
+
// Optuna - Bayesian optimization
|
|
18
|
+
export { Optuna, optuna_optimize, OptunaTypes, ParamValueType, ParamSpaceKindType, ParamSpaceType, NamedParamType, OptimizationDirectionType, PrunerType, OptunaStudyConfigType, TrialResultType, StudyResultType, ObjectiveFunctionType, } from "./optuna/optuna.js";
|
|
19
|
+
// SimAnneal - Discrete optimization
|
|
20
|
+
export { SimAnneal, simanneal_optimize, simanneal_optimize_permutation, simanneal_optimize_subset, SimAnnealTypes, DiscreteStateType, EnergyFunctionType, MoveFunctionType, PermutationEnergyType, SubsetEnergyType, AnnealConfigType, AnnealResultType, } from "./simanneal/simanneal.js";
|
|
21
|
+
// Sklearn - ML utilities
|
|
22
|
+
export { Sklearn, sklearn_train_test_split, sklearn_standard_scaler_fit, sklearn_standard_scaler_transform, sklearn_min_max_scaler_fit, sklearn_min_max_scaler_transform, sklearn_metrics_regression, sklearn_metrics_classification, sklearn_regressor_chain_train, sklearn_regressor_chain_predict, SklearnTypes, SplitConfigType, SplitResultType, RegressionMetricsType, ClassificationMetricsType, SklearnModelBlobType, MultiTargetType, RegressorChainBaseConfigType, RegressorChainConfigType, } from "./sklearn/sklearn.js";
|
|
23
|
+
// Scipy - Scientific computing
|
|
24
|
+
export { Scipy, scipy_curve_fit, scipy_stats_describe, scipy_stats_pearsonr, scipy_stats_spearmanr, scipy_interpolate_1d_fit, scipy_interpolate_1d_predict, scipy_optimize_minimize, scipy_optimize_minimize_quadratic, ScipyTypes, OptimizeMethodType, InterpolationKindType, OptimizeConfigType, InterpolateConfigType, ParamBoundsType, CustomCurveFunctionType, CurveFunctionType, CurveFitConfigType, QuadraticConfigType, StatsDescribeResultType, CorrelationResultType, CurveFitResultType, OptimizeResultType, ScipyModelBlobType, } from "./scipy/scipy.js";
|
|
25
|
+
// XGBoost - Gradient boosting
|
|
26
|
+
export { XGBoost, xgboost_train_regressor, xgboost_train_classifier, xgboost_predict, xgboost_predict_class, xgboost_predict_proba, XGBoostTypes, XGBoostConfigType, XGBoostModelBlobType, } from "./xgboost/xgboost.js";
|
|
27
|
+
// LightGBM - Fast gradient boosting
|
|
28
|
+
export { LightGBM, lightgbm_train_regressor, lightgbm_train_classifier, lightgbm_predict, lightgbm_predict_class, lightgbm_predict_proba, LightGBMTypes, LightGBMConfigType, LightGBMModelBlobType, } from "./lightgbm/lightgbm.js";
|
|
29
|
+
// NGBoost - Probabilistic gradient boosting
|
|
30
|
+
export { NGBoost, ngboost_train_regressor, ngboost_predict, ngboost_predict_dist, NGBoostTypes, NGBoostDistributionType, NGBoostConfigType, NGBoostPredictConfigType, NGBoostPredictResultType, NGBoostModelBlobType, } from "./ngboost/ngboost.js";
|
|
31
|
+
// SHAP - Model explainability
|
|
32
|
+
export { Shap, shap_tree_explainer_create, shap_kernel_explainer_create, shap_compute_values, shap_feature_importance, ShapTypes, ShapResultType, FeatureImportanceType, ShapModelBlobType, AnyModelBlobType, StringVectorType, } from "./shap/shap.js";
|
|
33
|
+
// Torch - PyTorch neural networks
|
|
34
|
+
export { Torch, torch_mlp_train, torch_mlp_predict, TorchTypes, TorchActivationType, TorchLossType, TorchOptimizerType, TorchMLPConfigType, TorchTrainConfigType, TorchTrainResultType, TorchTrainOutputType, TorchModelBlobType, } from "./torch/torch.js";
|
|
35
|
+
// GP - Gaussian Process regression
|
|
36
|
+
export { GP, gp_train, gp_predict, gp_predict_std, GPTypes, GPKernelType, GPConfigType, GPPredictResultType, GPModelBlobType, } from "./gp/gp.js";
|
|
37
|
+
// Shared types
|
|
38
|
+
export { VectorType as SharedVectorType, MatrixType as SharedMatrixType, ScalarObjectiveType as SharedScalarObjectiveType, VectorObjectiveType, LabelVectorType, } from "./types.js";
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,sCAAsC;AACtC,OAAO,EACH,IAAI,EACJ,aAAa,EACb,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,cAAc,GACjB,MAAM,gBAAgB,CAA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