-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-imports.js
More file actions
50 lines (43 loc) · 1.44 KB
/
test-imports.js
File metadata and controls
50 lines (43 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env node
console.log('Testing ML library imports...\n');
// Test ml-random-forest
try {
const mlRfPkg = await import('ml-random-forest');
console.log('✅ ml-random-forest imported successfully');
console.log('RandomForestRegression:', typeof mlRfPkg.RandomForestRegression);
} catch (error) {
console.error('❌ ml-random-forest import failed:', error.message);
}
// Test ml-svm
try {
const mlSvmPkg = await import('ml-svm');
console.log('✅ ml-svm imported successfully');
console.log('SVM:', typeof mlSvmPkg.default);
} catch (error) {
console.error('❌ ml-svm import failed:', error.message);
}
// Test ml-pca
try {
const mlPcaPkg = await import('ml-pca');
console.log('✅ ml-pca imported successfully');
console.log('PCA:', typeof mlPcaPkg.default);
} catch (error) {
console.error('❌ ml-pca import failed:', error.message);
}
// Test ml-kmeans
try {
const mlKmeansPkg = await import('ml-kmeans');
console.log('✅ ml-kmeans imported successfully');
console.log('KMeans:', typeof mlKmeansPkg.default);
} catch (error) {
console.error('❌ ml-kmeans import failed:', error.message);
}
// Test ml-matrix
try {
const { Matrix } = await import('ml-matrix');
console.log('✅ ml-matrix imported successfully');
console.log('Matrix:', typeof Matrix);
} catch (error) {
console.error('❌ ml-matrix import failed:', error.message);
}
console.log('\nImport test completed!');