- 1. AUC
- 2. Entropy and Gini index
- 3. Linear regression
- 4. Logistic Regression
- 5. Newton method
- 6. K-means clusters
- 7. Feature selection
- Outline
- 1. First get data from html.
- 2. train model.
- 3. model and probability, table .
- 4. mljs validate and Performance: AUC and ROC
- 5. Performance: AUC, information gain (Entropy), gain ratio Gini index
- 6. Processing NA
- 7. K-mean clustering
- 8. PCA
- 9. Feature selection
- a. Newton method code
- b. Gradient descent method code
- c. Plot
- d. Sort, Min, Min, Mean, median
- e. plot.ly
- f. mulity data was processed
- g. count array
- h. js add div
Using jsregression.min.js
- Linear Regression using js-regrssion
- Logistic Regression
- Multi-Class Classification using One-vs-All Logistic Regression
Include the "node_modules/js-regression/build/jsregression.min.js" (or "node_modules/js-regression/src/jsregression.js") in your HTML <script> tag
The codes in the following html files illustrates how to use them in html pages:
- example-binary-classifier.html
- example-multi-class-classifier.html
- example-regression.html
- example-regression-2.html
- example-regression-3.html
===
Using ML library.
- Principal component analysis (PCA):
ML.PCA - Hierarchical clustering:
ML.HClust - K-means clustering:
ML.KMeans
- Support vector machines:
ML.SVM - Naive Bayes:
ML.NaiveBayes - K-Nearest Neighbor (KNN):
ML.KNN - Partial least squares (PLS):
ML.PLS - Cross-validation:
ML.CrossValidation - Confusion matrix:
ML.ConfusionMatrix - Decision tree classifier:
ML.DecisionTreeClassifier - Random forest classifier:
ML.RandomForestClassifier
- Simple linear regression:
ML.SimpleLinearRegression - Polynomial regression:
ML.PolynomialRegression - Multivariate linear regression:
ML.MultivariateLinearRegression - Power regression:
ML.PowerRegression - Exponential regression:
ML.ExponentialRegression - Theil-Sen regression:
ML.TheilSenRegression - Robust polynomial regression:
ML.RobustPolynomialRegression - Decision tree regression:
ML.DecisionTreeRegression - Random forest regression:
ML.RandomForestRegression
- Levenberg-Marquardt:
ML.levenbergMarquardt
- Matrix:
ML.Matrix(Matrix class) - Singular value decomposition (SVD):
ML.SVD - Eigenvalue decomposition (EVD):
ML.EVD - Cholesky decomposition:
ML.CholeskyDecomposition - Lu decomposition:
ML.LuDecomposition - Qr decomposition:
ML.QrDecomposition - Sparse matrix:
ML.SparseMatrix - Kernels:
ML.Kernel - Distance functions:
ML.Distance - Similarity functions:
ML.Similarity - Distance matrix:
ML.distanceMatrix - XORShift-add RNG:
ML.XSadd
ML.Array.minML.Array.maxML.Array.medianML.Array.meanML.Array.modeML.Array.normedML.Array.rescaleML.Array.sequentialFillML.Array.standardDeviationML.Array.variance
Functions dealing with an object containing 2 properties x and y, both arrays.
Example:
let result = ML.ArrayXY.sortX({x: [2,3,1], y: [4,6,2]});
// result = {x: [1,2,3], y: [2,4,6]}
-
ML.ArrayXY.weightedMerge: Merge abscissa values on similar ordinates and weight the group of abscissa
-
ML.ArrayXY.maxMerge: Merge abscissa values on similar ordinates and keeps the abscissa with bigger ordinate value
-
ML.ArrayXY.closestX: Get the closest point for a specific abscissa value
-
ML.ArrayXY.centroidsMerge: Merge abscissa values if the ordinate value is in a list of centroids
-
ML.ArrayXY.sortX: Sort a set of point based on the abscissas values
-
ML.ArrayXY.maxY: Sort a set of point based on the abscissas values
-
ML.ArrayXY.uniqueX: Ensure that x values are unique
- Performance (ROC curve):
ML.Performance
- Principal component analysis (PCA):
ML.PrincipalComponentAnalysis - Savitzky-Golay filter:
ML.savitzkyGolay - Savitzky-Golay generalized:
ML.savitzkyGolayGeneralized
- Bit array operations:
ML.BitArray - Hash table:
ML.HashTable - Pad array:
ML.padArray - Binary search:
ML.binarySearch - Number comparison functions for sorting:
ML.numSort - Random number generation:
ML.Random