From 9a63da499910f0c693622f3eb56c3846672e2365 Mon Sep 17 00:00:00 2001 From: Dan Crescimanno Date: Thu, 21 Apr 2022 00:35:52 -0700 Subject: [PATCH 1/2] feat: renamed files, added to repo --- package.json | 3 ++ src/cluster/kmeans.test.ts | 4 +- src/cluster/kmeans.ts | 4 +- src/compose/columnTransformer.test.ts | 6 +-- src/compose/columnTransformer.ts | 2 +- src/dummy/dummyClassifier.test.ts | 4 +- src/dummy/dummyClassifier.ts | 2 +- src/dummy/dummyRegressor.test.ts | 4 +- src/dummy/dummyRegressor.ts | 2 +- src/ensemble/serializeEnsemble.ts | 38 +++++++------- src/ensemble/votingClassifier.test.ts | 6 +-- src/ensemble/votingClassifier.ts | 2 +- src/ensemble/votingRegressor.test.ts | 6 +-- src/impute/simpleImputer.test.ts | 4 +- src/impute/simpleImputer.ts | 2 +- src/index.test.ts | 48 ++++++++--------- src/index.ts | 52 +++++++++---------- src/linear_model/elasticNet.ts | 4 +- src/linear_model/lassoRegression.ts | 4 +- src/linear_model/linearRegression.test.ts | 2 +- src/linear_model/linearRegression.ts | 4 +- src/linear_model/logisticRegression.test.ts | 2 +- src/linear_model/logisticRegression.ts | 4 +- src/linear_model/modelSerializer.ts | 2 +- src/linear_model/ridgeRegression.ts | 4 +- src/linear_model/sgdClassifier.ts | 2 +- src/model_selection/crossValScore.ts | 4 +- src/model_selection/kFold.test.ts | 2 +- src/model_selection/kFold.ts | 5 +- ...nNaiveBayes.test.ts => GaussianNB.test.ts} | 2 +- .../{gaussianNaiveBayes.ts => GaussianNB.ts} | 3 +- .../{metrics.test.ts => Metric.test.ts} | 2 +- src/neighbors/{metrics.ts => Metric.ts} | 0 src/neighbors/bruteNeighborhood.ts | 4 +- src/neighbors/kNeighborsBase.ts | 8 +-- src/neighbors/kNeighborsClassifier.test.ts | 6 +-- src/neighbors/kNeighborsClassifier.ts | 3 +- src/neighbors/kNeighborsRegressor.test.ts | 6 +-- src/neighbors/kNeighborsRegressor.ts | 3 +- src/neighbors/kdTree.test.ts | 2 +- src/neighbors/kdTree.ts | 4 +- src/neighbors/neighborhood.ts | 2 +- src/neighbors/neighborhoodGenericTests.ts | 4 +- src/pipeline/pipeline.test.ts | 8 +-- src/pipeline/pipeline.ts | 2 +- src/preprocessing/labelEncoder.test.ts | 2 +- src/preprocessing/labelEncoder.ts | 2 +- src/preprocessing/maxAbsScaler.test.ts | 2 +- src/preprocessing/maxAbsScaler.ts | 2 +- src/preprocessing/minMaxScaler.test.ts | 2 +- src/preprocessing/minMaxScaler.ts | 2 +- src/preprocessing/normalizer.test.ts | 2 +- src/preprocessing/normalizer.ts | 2 +- src/preprocessing/oneHotEncoder.test.ts | 2 +- src/preprocessing/oneHotEncoder.ts | 2 +- src/preprocessing/ordinalEncoder.test.ts | 2 +- src/preprocessing/ordinalEncoder.ts | 2 +- src/preprocessing/robustScaler.test.ts | 2 +- src/preprocessing/robustScaler.ts | 2 +- src/preprocessing/standardScaler.test.ts | 2 +- src/preprocessing/standardScaler.ts | 2 +- src/svm/linearSVC.test.ts | 2 +- src/svm/linearSVC.ts | 2 +- src/svm/linearSVR.test.ts | 2 +- src/svm/linearSVR.ts | 2 +- src/tree/criterion.test.ts | 2 +- src/tree/decisiontree.test.ts | 2 +- src/tree/decisiontree.ts | 12 ++--- src/tree/splitter.test.ts | 4 +- src/tree/splitter.ts | 2 +- 70 files changed, 178 insertions(+), 171 deletions(-) rename src/naive_bayes/{gaussianNaiveBayes.test.ts => GaussianNB.test.ts} (98%) rename src/naive_bayes/{gaussianNaiveBayes.ts => GaussianNB.ts} (95%) rename src/neighbors/{metrics.test.ts => Metric.test.ts} (99%) rename src/neighbors/{metrics.ts => Metric.ts} (100%) diff --git a/package.json b/package.json index b8582407..f77a797e 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,9 @@ "typescript": "^4.5.4" }, "jest": { + "testPathIgnorePatterns" : [ + "/src/index.test.ts" + ], "testEnvironment": "node", "preset": "ts-jest", "globals": { diff --git a/src/cluster/kmeans.test.ts b/src/cluster/kmeans.test.ts index 86388b19..6aa15ea9 100644 --- a/src/cluster/kmeans.test.ts +++ b/src/cluster/kmeans.test.ts @@ -1,4 +1,4 @@ -import { KMeans } from './kmeans' +import { KMeans } from './KMeans' // Next steps: Improve on kmeans cluster testing describe('KMeans', () => { @@ -40,7 +40,7 @@ describe('KMeans', () => { it('should save kmeans model', () => { const expectedResult = { - name: 'kmeans', + name: 'KMeans', nClusters: 2, init: 'random', maxIter: 300, diff --git a/src/cluster/kmeans.ts b/src/cluster/kmeans.ts index 09fb4c52..d5810cd1 100644 --- a/src/cluster/kmeans.ts +++ b/src/cluster/kmeans.ts @@ -71,7 +71,7 @@ export class KMeans extends Serialize { clusterCenters: tf.Tensor2D /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'kmeans' + name = 'KMeans' constructor({ nClusters = 8, @@ -145,7 +145,7 @@ export class KMeans extends Serialize { } /** - * Converts 2D input into a 1D Tensor which holds the Kmeans cluster Class label + * Converts 2D input into a 1D Tensor which holds the KMeans cluster Class label * @param X The 2D Matrix that you wish to cluster */ public predict(X: Scikit2D): tf.Tensor1D { diff --git a/src/compose/columnTransformer.test.ts b/src/compose/columnTransformer.test.ts index a2506a0a..063da473 100644 --- a/src/compose/columnTransformer.test.ts +++ b/src/compose/columnTransformer.test.ts @@ -1,6 +1,6 @@ -import { ColumnTransformer } from './columnTransformer' -import { MinMaxScaler } from '../preprocessing/minMaxScaler' -import { SimpleImputer } from '../impute/simpleImputer' +import { ColumnTransformer } from './ColumnTransformer' +import { MinMaxScaler } from '../preprocessing/MinMaxScaler' +import { SimpleImputer } from '../impute/SimpleImputer' import * as dfd from 'danfojs-node' describe('ColumnTransformer', function () { diff --git a/src/compose/columnTransformer.ts b/src/compose/columnTransformer.ts index d5f7200a..0f89059a 100644 --- a/src/compose/columnTransformer.ts +++ b/src/compose/columnTransformer.ts @@ -69,7 +69,7 @@ export class ColumnTransformer { remainder: Transformer | 'drop' | 'passthrough' /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'columntransformer' + name = 'ColumnTransformer' constructor({ transformers = [], diff --git a/src/dummy/dummyClassifier.test.ts b/src/dummy/dummyClassifier.test.ts index fde16412..858c5adc 100644 --- a/src/dummy/dummyClassifier.test.ts +++ b/src/dummy/dummyClassifier.test.ts @@ -1,4 +1,4 @@ -import { DummyClassifier } from './dummyClassifier' +import { DummyClassifier } from './DummyClassifier' describe('DummyClassifier', function () { it('Use DummyClassifier on simple example (mostFrequent)', function () { @@ -62,7 +62,7 @@ describe('DummyClassifier', function () { ] const y = [10, 20, 20, 30] const expectedResult = { - name: 'dummyclassifier', + name: 'DummyClassifier', EstimatorType: 'classifier', constant: 20, strategy: 'mostFrequent', diff --git a/src/dummy/dummyClassifier.ts b/src/dummy/dummyClassifier.ts index bb76748d..c74a9a01 100644 --- a/src/dummy/dummyClassifier.ts +++ b/src/dummy/dummyClassifier.ts @@ -85,7 +85,7 @@ export class DummyClassifier extends ClassifierMixin { classes: number[] | string[] /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'dummyclassifier' + name = 'DummyClassifier' constructor({ strategy = 'mostFrequent', diff --git a/src/dummy/dummyRegressor.test.ts b/src/dummy/dummyRegressor.test.ts index e88c9574..04299b7e 100644 --- a/src/dummy/dummyRegressor.test.ts +++ b/src/dummy/dummyRegressor.test.ts @@ -1,4 +1,4 @@ -import { DummyRegressor } from './dummyRegressor' +import { DummyRegressor } from './DummyRegressor' describe('DummyRegressor', function () { it('Use DummyRegressor on simple example (mean)', function () { @@ -65,7 +65,7 @@ describe('DummyRegressor', function () { ] const y = [10, 12, 30] const saveResult = { - name: 'dummyregressor', + name: 'DummyRegressor', EstimatorType: 'regressor', strategy: 'constant', constant: 10 diff --git a/src/dummy/dummyRegressor.ts b/src/dummy/dummyRegressor.ts index c669b872..124b2249 100644 --- a/src/dummy/dummyRegressor.ts +++ b/src/dummy/dummyRegressor.ts @@ -84,7 +84,7 @@ export class DummyRegressor extends RegressorMixin { quantile?: number /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'dummyregressor' + name = 'DummyRegressor' constructor({ strategy = 'mean', diff --git a/src/ensemble/serializeEnsemble.ts b/src/ensemble/serializeEnsemble.ts index b148ed97..245c89df 100644 --- a/src/ensemble/serializeEnsemble.ts +++ b/src/ensemble/serializeEnsemble.ts @@ -1,34 +1,34 @@ -import { DummyClassifier } from '../dummy/dummyClassifier' -import { DummyRegressor } from '../dummy/dummyRegressor' -import { LogisticRegression } from '../linear_model/logisticRegression' -import { RidgeRegression } from '../linear_model/ridgeRegression' -import { LinearRegression } from '../linear_model/linearRegression' -import { LassoRegression } from '../linear_model/lassoRegression' -import { ElasticNet } from '../linear_model/elasticNet' -import { LabelEncoder } from '../preprocessing/labelEncoder' -import { SimpleImputer } from '../impute/simpleImputer' +import { DummyClassifier } from '../dummy/DummyClassifier' +import { DummyRegressor } from '../dummy/DummyRegressor' +import { LogisticRegression } from '../linear_model/LogisticRegression' +import { RidgeRegression } from '../linear_model/RidgeRegression' +import { LinearRegression } from '../linear_model/LinearRegression' +import { LassoRegression } from '../linear_model/LassoRegression' +import { ElasticNet } from '../linear_model/ElasticNet' +import { LabelEncoder } from '../preprocessing/LabelEncoder' +import { SimpleImputer } from '../impute/SimpleImputer' import { tf } from '../shared/globals' -import { MinMaxScaler } from '../preprocessing/minMaxScaler' +import { MinMaxScaler } from '../preprocessing/MinMaxScaler' function getEstimator(name: string, serialJson: string) { switch (name) { - case 'dummyclassifier': + case 'DummyClassifier': return new DummyClassifier().fromJson(serialJson) - case 'dummyregressor': + case 'DummyRegressor': return new DummyRegressor().fromJson(serialJson) - case 'logisticregression': + case 'LogisticRegression': return new LogisticRegression().fromJson(serialJson) - case 'ridgeregression': + case 'RidgeRegression': return new RidgeRegression().fromJson(serialJson) - case 'linearregression': + case 'LinearRegression': return new LinearRegression().fromJson(serialJson) - case 'lassoregression': + case 'LassoRegression': return new LassoRegression().fromJson(serialJson) - case 'elasticnet': + case 'ElasticNet': return new ElasticNet().fromJson(serialJson) - case 'simpleimputer': + case 'SimpleImputer': return new SimpleImputer().fromJson(serialJson) - case 'minmaxscaler': + case 'MinMaxScaler': return new MinMaxScaler().fromJson(serialJson) default: throw new Error(`${name} estimator not supported`) diff --git a/src/ensemble/votingClassifier.test.ts b/src/ensemble/votingClassifier.test.ts index 69e2eb92..d741c00a 100644 --- a/src/ensemble/votingClassifier.test.ts +++ b/src/ensemble/votingClassifier.test.ts @@ -1,7 +1,7 @@ -import { makeVotingClassifier, VotingClassifier } from './votingClassifier' -import { DummyClassifier } from '../dummy/dummyClassifier' +import { makeVotingClassifier, VotingClassifier } from './VotingClassifier' +import { DummyClassifier } from '../dummy/DummyClassifier' -import { LogisticRegression } from '../linear_model/logisticRegression' +import { LogisticRegression } from '../linear_model/LogisticRegression' describe('VotingClassifier', function () { it('Use VotingClassifier on simple example (voting = hard)', async function () { diff --git a/src/ensemble/votingClassifier.ts b/src/ensemble/votingClassifier.ts index 35d92853..5db1241e 100644 --- a/src/ensemble/votingClassifier.ts +++ b/src/ensemble/votingClassifier.ts @@ -1,7 +1,7 @@ import { Scikit1D, Scikit2D } from '../types' import { tf } from '../shared/globals' import { ClassifierMixin } from '../mixins' -import { LabelEncoder } from '../preprocessing/labelEncoder' +import { LabelEncoder } from '../preprocessing/LabelEncoder' import { fromJson, toJson } from './serializeEnsemble' /* diff --git a/src/ensemble/votingRegressor.test.ts b/src/ensemble/votingRegressor.test.ts index 6421670e..06a69f97 100644 --- a/src/ensemble/votingRegressor.test.ts +++ b/src/ensemble/votingRegressor.test.ts @@ -1,6 +1,6 @@ -import { makeVotingRegressor, VotingRegressor } from './votingRegressor' -import { DummyRegressor } from '../dummy/dummyRegressor' -import { LinearRegression } from '../linear_model/linearRegression' +import { makeVotingRegressor, VotingRegressor } from './VotingRegressor' +import { DummyRegressor } from '../dummy/DummyRegressor' +import { LinearRegression } from '../linear_model/LinearRegression' describe('VotingRegressor', function () { it('Use VotingRegressor on simple example ', async function () { diff --git a/src/impute/simpleImputer.test.ts b/src/impute/simpleImputer.test.ts index 9a861d2f..fb58af50 100644 --- a/src/impute/simpleImputer.test.ts +++ b/src/impute/simpleImputer.test.ts @@ -1,5 +1,5 @@ import { tf } from '../shared/globals' -import { SimpleImputer } from './simpleImputer' +import { SimpleImputer } from './SimpleImputer' describe('SimpleImputer', function () { it('Imputes with "constant" strategy 2D one column. In this strategy, we give the fill value', function () { @@ -131,7 +131,7 @@ describe('SimpleImputer', function () { ] const expected = { - name: 'simpleimputer', + name: 'SimpleImputer', missingValues: null, strategy: 'mostFrequent', statistics: { diff --git a/src/impute/simpleImputer.ts b/src/impute/simpleImputer.ts index cf5de91d..722591c7 100644 --- a/src/impute/simpleImputer.ts +++ b/src/impute/simpleImputer.ts @@ -66,7 +66,7 @@ export class SimpleImputer extends TransformerMixin { statistics: tf.Tensor1D /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'simpleimputer' + name = 'SimpleImputer' constructor({ strategy = 'mean', diff --git a/src/index.test.ts b/src/index.test.ts index bf1e606e..eb1f7291 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,18 +1,18 @@ -import './cluster/kmeans.test' -import './compose/columnTransformer.test' +import './cluster/KMeans.test' +import './compose/ColumnTransformer.test' import './datasets/makeRegression.test' -import './dummy/dummyClassifier.test' -import './dummy/dummyRegressor.test' -import './ensemble/votingClassifier.test' -import './ensemble/votingRegressor.test' -import './impute/simpleImputer.test' -import './linear_model/linearRegression.test' +import './dummy/DummyClassifier.test' +import './dummy/DummyRegressor.test' +import './ensemble/VotingClassifier.test' +import './ensemble/VotingRegressor.test' +import './impute/SimpleImputer.test' +import './linear_model/LinearRegression.test' /* When we figure out why we can't save / load logistic regressions */ // import './linear_model/logisticRegression.test' import './metrics/metrics.test' -// import './model_selection/kFold.test' +// import './model_selection/KFold.test' import './model_selection/trainTestSplit.test' -import './naive_bayes/gaussianNaiveBayes.test' +import './naive_bayes/GaussianNB.test' /* When we figure out how to do expect.extend in karma */ // import './neighbors/bruteNeighborhood.test' // import './neighbors/cappedMaxHeap.test' @@ -20,22 +20,22 @@ import './naive_bayes/gaussianNaiveBayes.test' // import './neighbors/kNeighborsClassifier.test' // import './neighbors/kNeighborsRegressor.test' // import './neighbors/metrics.test' -import './pipeline/pipeline.test' -import './preprocessing/labelEncoder.test' -import './preprocessing/maxAbsScaler.test' -import './preprocessing/minMaxScaler.test' -import './preprocessing/normalizer.test' -import './preprocessing/oneHotEncoder.test' -import './preprocessing/ordinalEncoder.test' -import './preprocessing/robustScaler.test' -import './preprocessing/standardScaler.test' -import './svm/linearSVC.test' -import './svm/linearSVR.test' +import './pipeline/Pipeline.test' +import './preprocessing/LabelEncoder.test' +import './preprocessing/MaxAbsScaler.test' +import './preprocessing/MinMaxScaler.test' +import './preprocessing/Normalizer.test' +import './preprocessing/OneHotEncoder.test' +import './preprocessing/OrdinalEncoder.test' +import './preprocessing/RobustScaler.test' +import './preprocessing/StandardScaler.test' +import './svm/LinearSVC.test' +import './svm/LinearSVR.test' /* When we put back in the SVM code */ // import './svm/SVC.test' // import './svm/SVR.test' -import './tree/criterion.test' -// import './tree/decisiontree.test' -import './tree/splitter.test' +import './tree/Criterion.test' +// import './tree/DecisionTree.test' +import './tree/Splitter.test' /* When we use the expect.extend stuff */ // import './jestTensorMatchers.test' diff --git a/src/index.ts b/src/index.ts index 69172976..6ab8fb07 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,74 +12,74 @@ * limitations under the License. * ========================================================================== */ -export { KNeighborsRegressor } from './neighbors/kNeighborsRegressor' +export { KNeighborsRegressor } from './neighbors/KNeighborsRegressor' export { LinearRegression, LinearRegressionParams -} from './linear_model/linearRegression' -export { LassoRegression, LassoParams } from './linear_model/lassoRegression' +} from './linear_model/LinearRegression' +export { LassoRegression, LassoParams } from './linear_model/LassoRegression' export { RidgeRegression, RidgeRegressionParams -} from './linear_model/ridgeRegression' -export { ElasticNet, ElasticNetParams } from './linear_model/elasticNet' +} from './linear_model/RidgeRegression' +export { ElasticNet, ElasticNetParams } from './linear_model/ElasticNet' export { LogisticRegression, LogisticRegressionParams -} from './linear_model/logisticRegression' +} from './linear_model/LogisticRegression' export * as metrics from './metrics/metrics' -export { DummyRegressor, DummyRegressorParams } from './dummy/dummyRegressor' +export { DummyRegressor, DummyRegressorParams } from './dummy/DummyRegressor' export { DummyClassifier, DummyClassifierParams -} from './dummy/dummyClassifier' -export { MinMaxScaler, MinMaxScalerParams } from './preprocessing/minMaxScaler' +} from './dummy/DummyClassifier' +export { MinMaxScaler, MinMaxScalerParams } from './preprocessing/MinMaxScaler' export { StandardScaler, StandardScalerParams -} from './preprocessing/standardScaler' -export { MaxAbsScaler } from './preprocessing/maxAbsScaler' -export { SimpleImputer, SimpleImputerParams } from './impute/simpleImputer' +} from './preprocessing/StandardScaler' +export { MaxAbsScaler } from './preprocessing/MaxAbsScaler' +export { SimpleImputer, SimpleImputerParams } from './impute/SimpleImputer' export { OneHotEncoder, OneHotEncoderParams -} from './preprocessing/oneHotEncoder' -export { LabelEncoder } from './preprocessing/labelEncoder' +} from './preprocessing/OneHotEncoder' +export { LabelEncoder } from './preprocessing/LabelEncoder' export { OrdinalEncoder, OrdinalEncoderParams -} from './preprocessing/ordinalEncoder' -export { Normalizer, NormalizerParams } from './preprocessing/normalizer' -export { Pipeline, PipelineParams, makePipeline } from './pipeline/pipeline' +} from './preprocessing/OrdinalEncoder' +export { Normalizer, NormalizerParams } from './preprocessing/Normalizer' +export { Pipeline, PipelineParams, makePipeline } from './pipeline/Pipeline' export { ColumnTransformer, ColumnTransformerParams -} from './compose/columnTransformer' -export { RobustScaler, RobustScalerParams } from './preprocessing/robustScaler' -export { KMeans, KMeansParams } from './cluster/kmeans' +} from './compose/ColumnTransformer' +export { RobustScaler, RobustScalerParams } from './preprocessing/RobustScaler' +export { KMeans, KMeansParams } from './cluster/KMeans' export { Scikit1D, Scikit2D, ScikitVecOrMatrix } from './types' export { dataUrls } from './datasets/datasets' export { makeVotingRegressor, VotingRegressor, VotingRegressorParams -} from './ensemble/votingRegressor' +} from './ensemble/VotingRegressor' export { makeVotingClassifier, VotingClassifier, VotingClassifierParams -} from './ensemble/votingClassifier' -export { LinearSVC, LinearSVCParams } from './svm/linearSVC' -export { LinearSVR, LinearSVRParams } from './svm/linearSVR' +} from './ensemble/VotingClassifier' +export { LinearSVC, LinearSVCParams } from './svm/LinearSVC' +export { LinearSVR, LinearSVRParams } from './svm/LinearSVR' // Comment these out until our libsvm version doesn't ship with fs / path subdependencies // They were stopping the browser build from being built // export { SVR, SVRParams } from './svm/SVR' // export { SVC, SVCParams } from './svm/SVC' -export { GaussianNB } from './naive_bayes/gaussianNaiveBayes' +export { GaussianNB } from './naive_bayes/GaussianNB' export { DecisionTreeClassifier, DecisionTreeClassifierParams, DecisionTreeRegressor, DecisionTreeRegressorParams -} from './tree/decisiontree' +} from './tree/DecisionTree' diff --git a/src/linear_model/elasticNet.ts b/src/linear_model/elasticNet.ts index 53cbae7e..a35f35b6 100644 --- a/src/linear_model/elasticNet.ts +++ b/src/linear_model/elasticNet.ts @@ -13,7 +13,7 @@ * ========================================================================== */ -import { SGDRegressor } from './sgdRegressor' +import { SGDRegressor } from './SgdRegressor' import { tf } from '../shared/globals' // First pass at a ElasticNet implementation using gradient descent @@ -34,7 +34,7 @@ export interface ElasticNetParams { */ export class ElasticNet extends SGDRegressor { /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'elasticnet' + name = 'ElasticNet' constructor({ alpha = 1, diff --git a/src/linear_model/lassoRegression.ts b/src/linear_model/lassoRegression.ts index a6ccba5b..32f1438c 100644 --- a/src/linear_model/lassoRegression.ts +++ b/src/linear_model/lassoRegression.ts @@ -13,7 +13,7 @@ * ========================================================================== */ -import { SGDRegressor } from './sgdRegressor' +import { SGDRegressor } from './SgdRegressor' import { tf } from '../shared/globals' // First pass at a LassoRegression implementation using gradient descent @@ -29,7 +29,7 @@ export interface LassoParams { /** Linear Model trained with L1 prior as regularizer (aka the Lasso). */ export class LassoRegression extends SGDRegressor { /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'lassoregression' + name = 'LassoRegression' constructor({ fitIntercept = true, alpha = 1.0 }: LassoParams = {}) { super({ diff --git a/src/linear_model/linearRegression.test.ts b/src/linear_model/linearRegression.test.ts index 14787922..a4d67295 100644 --- a/src/linear_model/linearRegression.test.ts +++ b/src/linear_model/linearRegression.test.ts @@ -1,4 +1,4 @@ -import { LinearRegression } from './linearRegression' +import { LinearRegression } from './LinearRegression' import { tensorEqual } from '../utils' import { tf } from '../shared/globals' diff --git a/src/linear_model/linearRegression.ts b/src/linear_model/linearRegression.ts index 184a4183..3c4e099c 100644 --- a/src/linear_model/linearRegression.ts +++ b/src/linear_model/linearRegression.ts @@ -13,7 +13,7 @@ * ========================================================================== */ -import { SGDRegressor } from './sgdRegressor' +import { SGDRegressor } from './SgdRegressor' import { tf } from '../shared/globals' /** @@ -67,7 +67,7 @@ Next steps: */ export class LinearRegression extends SGDRegressor { /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'linearregression' + name = 'LinearRegression' constructor({ fitIntercept = true }: LinearRegressionParams = {}) { super({ diff --git a/src/linear_model/logisticRegression.test.ts b/src/linear_model/logisticRegression.test.ts index ba8ca88a..c00db0fa 100644 --- a/src/linear_model/logisticRegression.test.ts +++ b/src/linear_model/logisticRegression.test.ts @@ -1,4 +1,4 @@ -import { LogisticRegression } from './logisticRegression' +import { LogisticRegression } from './LogisticRegression' import { tf } from '../shared/globals' describe('LogisticRegression', function () { diff --git a/src/linear_model/logisticRegression.ts b/src/linear_model/logisticRegression.ts index b873fb9e..30651225 100644 --- a/src/linear_model/logisticRegression.ts +++ b/src/linear_model/logisticRegression.ts @@ -13,7 +13,7 @@ // * ========================================================================== // */ -import { SGDClassifier } from './sgdClassifier' +import { SGDClassifier } from './SgdClassifier' import { tf } from '../shared/globals' // First pass at a LogisticRegression implementation using gradient descent @@ -61,7 +61,7 @@ export interface LogisticRegressionParams { */ export class LogisticRegression extends SGDClassifier { /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'logisticregression' + name = 'LogisticRegression' constructor({ penalty = 'l2', diff --git a/src/linear_model/modelSerializer.ts b/src/linear_model/modelSerializer.ts index 703f8328..aac0aeba 100644 --- a/src/linear_model/modelSerializer.ts +++ b/src/linear_model/modelSerializer.ts @@ -1,6 +1,6 @@ import { optimizer, initializer, getLoss } from '../utils' import { tf } from '../shared/globals' -import { OneHotEncoder } from '../preprocessing/oneHotEncoder' +import { OneHotEncoder } from '../preprocessing/OneHotEncoder' function getModelWeight( model: tf.Sequential diff --git a/src/linear_model/ridgeRegression.ts b/src/linear_model/ridgeRegression.ts index 24e9c1b8..1d3cbf72 100644 --- a/src/linear_model/ridgeRegression.ts +++ b/src/linear_model/ridgeRegression.ts @@ -13,7 +13,7 @@ * ========================================================================== */ -import { SGDRegressor } from './sgdRegressor' +import { SGDRegressor } from './SgdRegressor' import { tf } from '../shared/globals' // RidgeRegression implementation using gradient descent @@ -31,7 +31,7 @@ export interface RidgeRegressionParams { /** Linear least squares with l2 regularization. */ export class RidgeRegression extends SGDRegressor { /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'ridgeregression' + name = 'RidgeRegression' constructor({ fitIntercept = true, diff --git a/src/linear_model/sgdClassifier.ts b/src/linear_model/sgdClassifier.ts index ac48fe78..b5900a39 100644 --- a/src/linear_model/sgdClassifier.ts +++ b/src/linear_model/sgdClassifier.ts @@ -17,7 +17,7 @@ import { tf } from '../shared/globals' // import { DenseLayerArgs } from '@tensorflow/tfjs-layers/dist/layers/core' import { convertToNumericTensor1D, convertToNumericTensor2D } from '../utils' import { Scikit2D, Scikit1D, OptimizerTypes, LossTypes } from '../types' -import { OneHotEncoder } from '../preprocessing/oneHotEncoder' +import { OneHotEncoder } from '../preprocessing/OneHotEncoder' import { assert } from '../typesUtils' import { ClassifierMixin } from '../mixins' import { fromJson, toJSON } from './modelSerializer' diff --git a/src/model_selection/crossValScore.ts b/src/model_selection/crossValScore.ts index bc4c1498..7d0b551c 100644 --- a/src/model_selection/crossValScore.ts +++ b/src/model_selection/crossValScore.ts @@ -14,8 +14,8 @@ */ import { assert } from '../typesUtils' -import { CrossValidator } from './crossValidator' -import { KFold } from './kFold' +import { CrossValidator } from './CrossValidator' +import { KFold } from './KFold' import { Scikit1D, Scikit2D } from '../types' import { isScikit1D } from '../typesUtils' import { convertToTensor1D, convertToTensor2D } from '../utils' diff --git a/src/model_selection/kFold.test.ts b/src/model_selection/kFold.test.ts index 6f6a96c8..bb18ef14 100644 --- a/src/model_selection/kFold.test.ts +++ b/src/model_selection/kFold.test.ts @@ -14,7 +14,7 @@ */ import * as fc from 'fast-check' -import { KFold } from './kFold' +import { KFold } from './KFold' import { alea } from 'seedrandom' import '../jestTensorMatchers' import { tf } from '../shared/globals' diff --git a/src/model_selection/kFold.ts b/src/model_selection/kFold.ts index 7423feec..cf67abbb 100644 --- a/src/model_selection/kFold.ts +++ b/src/model_selection/kFold.ts @@ -14,7 +14,7 @@ */ import { assert } from '../typesUtils' -import { CrossValidator } from './crossValidator' +import { CrossValidator } from './CrossValidator' import * as randUtils from '../randUtils' import { Scikit1D, Scikit2D } from '../types' import { getLength } from '../utils' @@ -81,7 +81,7 @@ export class KFold implements CrossValidator { nSplits: number shuffle: boolean randomState?: number - + name: string constructor({ nSplits = 5, shuffle = false, @@ -95,6 +95,7 @@ export class KFold implements CrossValidator { this.nSplits = nSplits this.shuffle = Boolean(shuffle) this.randomState = randomState + this.name = 'KFold' } public getNumSplits(): number { diff --git a/src/naive_bayes/gaussianNaiveBayes.test.ts b/src/naive_bayes/GaussianNB.test.ts similarity index 98% rename from src/naive_bayes/gaussianNaiveBayes.test.ts rename to src/naive_bayes/GaussianNB.test.ts index 1936e59d..627018e8 100644 --- a/src/naive_bayes/gaussianNaiveBayes.test.ts +++ b/src/naive_bayes/GaussianNB.test.ts @@ -12,7 +12,7 @@ * limitations under the License. * ========================================================================== */ -import { GaussianNB } from './gaussianNaiveBayes' +import { GaussianNB } from './GaussianNB' describe('GaussianNB', function () { it('without priors', async () => { diff --git a/src/naive_bayes/gaussianNaiveBayes.ts b/src/naive_bayes/GaussianNB.ts similarity index 95% rename from src/naive_bayes/gaussianNaiveBayes.ts rename to src/naive_bayes/GaussianNB.ts index 421c3af7..6801b841 100644 --- a/src/naive_bayes/gaussianNaiveBayes.ts +++ b/src/naive_bayes/GaussianNB.ts @@ -13,7 +13,7 @@ * ========================================================================== */ import { tf } from '../shared/globals' -import { BaseNaiveBayes } from './baseNaiveBayes' +import { BaseNaiveBayes } from './BaseNaiveBayes' /** * Gaussian Naive Bayes classifier @@ -45,6 +45,7 @@ import { BaseNaiveBayes } from './baseNaiveBayes' * */ export class GaussianNB extends BaseNaiveBayes { + name = 'GaussianNB' protected kernel( features: tf.Tensor2D, mean: tf.Tensor1D, diff --git a/src/neighbors/metrics.test.ts b/src/neighbors/Metric.test.ts similarity index 99% rename from src/neighbors/metrics.test.ts rename to src/neighbors/Metric.test.ts index a754028f..c05c5125 100644 --- a/src/neighbors/metrics.test.ts +++ b/src/neighbors/Metric.test.ts @@ -15,7 +15,7 @@ import * as fc from 'fast-check' -import { Metric, minkowskiMetric } from './metrics' +import { Metric, minkowskiMetric } from './Metric' const NDIMS = Object.freeze([1, 2, 7]) diff --git a/src/neighbors/metrics.ts b/src/neighbors/Metric.ts similarity index 100% rename from src/neighbors/metrics.ts rename to src/neighbors/Metric.ts diff --git a/src/neighbors/bruteNeighborhood.ts b/src/neighbors/bruteNeighborhood.ts index c0a39655..720d7a1d 100644 --- a/src/neighbors/bruteNeighborhood.ts +++ b/src/neighbors/bruteNeighborhood.ts @@ -13,8 +13,8 @@ * ========================================================================== */ -import { Neighborhood, NeighborhoodParams } from './neighborhood' -import { Metric } from './metrics' +import { Neighborhood, NeighborhoodParams } from './Neighborhood' +import { Metric } from './Metric' import { tf } from '../shared/globals' import { assert } from '../typesUtils' diff --git a/src/neighbors/kNeighborsBase.ts b/src/neighbors/kNeighborsBase.ts index af80ed9a..3b4dd715 100644 --- a/src/neighbors/kNeighborsBase.ts +++ b/src/neighbors/kNeighborsBase.ts @@ -13,14 +13,14 @@ * ========================================================================== */ -import { Neighborhood, NeighborhoodParams } from './neighborhood' -import { BruteNeighborhood } from './bruteNeighborhood' -import { minkowskiMetric } from './metrics' +import { Neighborhood, NeighborhoodParams } from './Neighborhood' +import { BruteNeighborhood } from './BruteNeighborhood' +import { minkowskiMetric } from './Metric' import { Scikit1D, Scikit2D } from '../types' import { convertToNumericTensor1D, convertToNumericTensor2D } from '../utils' import { assert } from '../typesUtils' import { tf } from '../shared/globals' -import { KdTree } from './kdTree' +import { KdTree } from './KdTree' import Serialize from '../serialize' const WEIGHTS_FUNCTIONS = { diff --git a/src/neighbors/kNeighborsClassifier.test.ts b/src/neighbors/kNeighborsClassifier.test.ts index 0226bf88..559a72df 100644 --- a/src/neighbors/kNeighborsClassifier.test.ts +++ b/src/neighbors/kNeighborsClassifier.test.ts @@ -13,11 +13,11 @@ * ========================================================================== */ -import { KNeighborsClassifier } from './kNeighborsClassifier' -import { KNeighborsParams } from './kNeighborsBase' +import { KNeighborsClassifier } from './KNeighborsClassifier' +import { KNeighborsParams } from './KNeighborsBase' import { dataUrls } from '../datasets/datasets' import { crossValScore } from '../model_selection/crossValScore' -import { KFold } from '../model_selection/kFold' +import { KFold } from '../model_selection/KFold' import { arrayEqual } from '../utils' import '../jestTensorMatchers' import * as dfd from 'danfojs-node' diff --git a/src/neighbors/kNeighborsClassifier.ts b/src/neighbors/kNeighborsClassifier.ts index 534008ad..cc38d9a3 100644 --- a/src/neighbors/kNeighborsClassifier.ts +++ b/src/neighbors/kNeighborsClassifier.ts @@ -14,7 +14,7 @@ */ import { Scikit1D, Scikit2D } from '../types' -import { KNeighborsBase } from './kNeighborsBase' +import { KNeighborsBase } from './KNeighborsBase' import { convertToNumericTensor2D, convertToTensor1D } from '../utils' import { polyfillUnique } from '../tfUtils' import { accuracy } from '../model_selection/scorers' @@ -44,6 +44,7 @@ export class KNeighborsClassifier extends KNeighborsBase { score = accuracy + name = 'KNeighborsClassifier' /** * Applies this mdodel to predict the class probabilities of each given sample. * diff --git a/src/neighbors/kNeighborsRegressor.test.ts b/src/neighbors/kNeighborsRegressor.test.ts index 58dd53fa..50c5c418 100644 --- a/src/neighbors/kNeighborsRegressor.test.ts +++ b/src/neighbors/kNeighborsRegressor.test.ts @@ -13,12 +13,12 @@ * ========================================================================== */ -import { KNeighborsRegressor } from './kNeighborsRegressor' -import { KNeighborsParams } from './kNeighborsBase' +import { KNeighborsRegressor } from './KNeighborsRegressor' +import { KNeighborsParams } from './KNeighborsBase' import { dataUrls } from '../datasets/datasets' import { arrayEqual } from '../utils' import { crossValScore } from '../model_selection/crossValScore' -import { KFold } from '../model_selection/kFold' +import { KFold } from '../model_selection/KFold' import { negMeanSquaredError } from '../model_selection/scorers' import '../jestTensorMatchers' import * as dfd from 'danfojs-node' diff --git a/src/neighbors/kNeighborsRegressor.ts b/src/neighbors/kNeighborsRegressor.ts index 0f955982..8bda66f7 100644 --- a/src/neighbors/kNeighborsRegressor.ts +++ b/src/neighbors/kNeighborsRegressor.ts @@ -14,7 +14,7 @@ */ import { Scikit2D } from '../types' -import { KNeighborsBase } from '../neighbors/kNeighborsBase' +import { KNeighborsBase } from './KNeighborsBase' import { convertToNumericTensor2D } from '../utils' import { tf } from '../shared/globals' @@ -45,6 +45,7 @@ export class KNeighborsRegressor extends KNeighborsBase { * @param y The predicted targets `y` where `y[i]` is the prediction * for sample `X[i,:]` */ + name = 'KNeighborsRegressor' public predict(X: Scikit2D) { const { neighborhood, y, nNeighbors, weightsFn } = this._getFitParams() diff --git a/src/neighbors/kdTree.test.ts b/src/neighbors/kdTree.test.ts index 3f452ee7..87736ed3 100644 --- a/src/neighbors/kdTree.test.ts +++ b/src/neighbors/kdTree.test.ts @@ -14,6 +14,6 @@ */ import { neighborhoodGenericTests } from './neighborhoodGenericTests' -import { KdTree } from './kdTree' +import { KdTree } from './KdTree' neighborhoodGenericTests('KdTree', KdTree.build) diff --git a/src/neighbors/kdTree.ts b/src/neighbors/kdTree.ts index 3a4e15e6..9a8750d5 100644 --- a/src/neighbors/kdTree.ts +++ b/src/neighbors/kdTree.ts @@ -15,10 +15,10 @@ import { assert } from '../typesUtils' import { tf } from '../shared/globals' -import { Neighborhood, NeighborhoodParams } from './neighborhood' +import { Neighborhood, NeighborhoodParams } from './Neighborhood' import * as randUtils from '../randUtils' import { alea } from 'seedrandom' -import { CappedMaxHeap } from './cappedMaxHeap' +import { CappedMaxHeap } from './CappedMaxHeap' const child = (parent: number) => (parent << 1) + 1 const parent = (child: number) => (child - 1) >> 1 diff --git a/src/neighbors/neighborhood.ts b/src/neighbors/neighborhood.ts index 6c98dca3..266822f2 100644 --- a/src/neighbors/neighborhood.ts +++ b/src/neighbors/neighborhood.ts @@ -14,7 +14,7 @@ */ import { tf } from '../shared/globals' -import { Metric } from './metrics' +import { Metric } from './Metric' /** * Default constructor parameters for {@link Neighborhood} instances. diff --git a/src/neighbors/neighborhoodGenericTests.ts b/src/neighbors/neighborhoodGenericTests.ts index b3e9f6c0..ce335682 100644 --- a/src/neighbors/neighborhoodGenericTests.ts +++ b/src/neighbors/neighborhoodGenericTests.ts @@ -16,9 +16,9 @@ import * as fc from 'fast-check' import { tf } from '../shared/globals' import { alea } from 'seedrandom' -import { Neighborhood, NeighborhoodParams } from './neighborhood' +import { Neighborhood, NeighborhoodParams } from './Neighborhood' import { lhs, shuffle } from '../randUtils' -import { minkowskiMetric } from './metrics' +import { minkowskiMetric } from './Metric' import { polyfillUnique } from '../tfUtils' import '../jestTensorMatchers' diff --git a/src/pipeline/pipeline.test.ts b/src/pipeline/pipeline.test.ts index 5097b750..52ead335 100644 --- a/src/pipeline/pipeline.test.ts +++ b/src/pipeline/pipeline.test.ts @@ -1,9 +1,9 @@ -import { Pipeline, makePipeline } from './pipeline' +import { Pipeline, makePipeline } from './Pipeline' import { tf } from '../shared/globals' import { tensorEqual } from '../utils' -import { LinearRegression } from '../linear_model/linearRegression' -import { SimpleImputer } from '../impute/simpleImputer' -import { MinMaxScaler } from '../preprocessing/minMaxScaler' +import { LinearRegression } from '../linear_model/LinearRegression' +import { SimpleImputer } from '../impute/SimpleImputer' +import { MinMaxScaler } from '../preprocessing/MinMaxScaler' describe('Pipeline', function () { it('Use a Pipeline (min-max scaler, and linear regression)', async function () { diff --git a/src/pipeline/pipeline.ts b/src/pipeline/pipeline.ts index 8344949d..6cf5e6c4 100644 --- a/src/pipeline/pipeline.ts +++ b/src/pipeline/pipeline.ts @@ -48,7 +48,7 @@ export class Pipeline extends Serialize { steps: Array<[string, any]> /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'pipeline' + name = 'Pipeline' constructor({ steps = [] }: PipelineParams = {}) { super() diff --git a/src/preprocessing/labelEncoder.test.ts b/src/preprocessing/labelEncoder.test.ts index 0f3d8945..062929c8 100644 --- a/src/preprocessing/labelEncoder.test.ts +++ b/src/preprocessing/labelEncoder.test.ts @@ -1,4 +1,4 @@ -import { LabelEncoder } from './labelEncoder' +import { LabelEncoder } from './LabelEncoder' import * as dfd from 'danfojs-node' describe('LabelEncoder', function () { diff --git a/src/preprocessing/labelEncoder.ts b/src/preprocessing/labelEncoder.ts index 94278599..9067e707 100644 --- a/src/preprocessing/labelEncoder.ts +++ b/src/preprocessing/labelEncoder.ts @@ -41,7 +41,7 @@ export class LabelEncoder extends Serialize { classes: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'labelencoder' + name = 'LabelEncoder' constructor() { super() diff --git a/src/preprocessing/maxAbsScaler.test.ts b/src/preprocessing/maxAbsScaler.test.ts index c653d115..b69f584a 100644 --- a/src/preprocessing/maxAbsScaler.test.ts +++ b/src/preprocessing/maxAbsScaler.test.ts @@ -1,4 +1,4 @@ -import { MaxAbsScaler } from './maxAbsScaler' +import { MaxAbsScaler } from './MaxAbsScaler' import * as dfd from 'danfojs-node' import { tf } from '../shared/globals' import { arrayEqual } from '../utils' diff --git a/src/preprocessing/maxAbsScaler.ts b/src/preprocessing/maxAbsScaler.ts index f2acccde..a0c7a818 100644 --- a/src/preprocessing/maxAbsScaler.ts +++ b/src/preprocessing/maxAbsScaler.ts @@ -67,7 +67,7 @@ export class MaxAbsScaler extends TransformerMixin { featureNamesIn: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'maxabsscaler' + name = 'MaxAbsScaler' constructor() { super() diff --git a/src/preprocessing/minMaxScaler.test.ts b/src/preprocessing/minMaxScaler.test.ts index cb4def7e..7b15cc47 100644 --- a/src/preprocessing/minMaxScaler.test.ts +++ b/src/preprocessing/minMaxScaler.test.ts @@ -1,4 +1,4 @@ -import { MinMaxScaler } from './minMaxScaler' +import { MinMaxScaler } from './MinMaxScaler' import * as dfd from 'danfojs-node' import { isDataFrameInterface, isSeriesInterface } from '../typesUtils' import { ScikitVecOrMatrix } from '../types' diff --git a/src/preprocessing/minMaxScaler.ts b/src/preprocessing/minMaxScaler.ts index a35a5ebb..fe37e04d 100644 --- a/src/preprocessing/minMaxScaler.ts +++ b/src/preprocessing/minMaxScaler.ts @@ -83,7 +83,7 @@ export class MinMaxScaler extends TransformerMixin implements Transformer { featureNamesIn: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'minmaxscaler' + name = 'MinMaxScaler' constructor({ featureRange = [0, 1] }: MinMaxScalerParams = {}) { super() diff --git a/src/preprocessing/normalizer.test.ts b/src/preprocessing/normalizer.test.ts index e9672987..65d20877 100644 --- a/src/preprocessing/normalizer.test.ts +++ b/src/preprocessing/normalizer.test.ts @@ -1,4 +1,4 @@ -import { Normalizer } from './normalizer' +import { Normalizer } from './Normalizer' import * as dfd from 'danfojs-node' import { arrayEqual } from '../utils' diff --git a/src/preprocessing/normalizer.ts b/src/preprocessing/normalizer.ts index 954fd678..e02cc70a 100644 --- a/src/preprocessing/normalizer.ts +++ b/src/preprocessing/normalizer.ts @@ -65,7 +65,7 @@ export class Normalizer extends TransformerMixin { featureNamesIn: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'normalizer' + name = 'Normalizer' constructor({ norm = 'l2' }: NormalizerParams = {}) { super() diff --git a/src/preprocessing/oneHotEncoder.test.ts b/src/preprocessing/oneHotEncoder.test.ts index fe3511e8..35100413 100644 --- a/src/preprocessing/oneHotEncoder.test.ts +++ b/src/preprocessing/oneHotEncoder.test.ts @@ -1,5 +1,5 @@ import { tf } from '../shared/globals' -import { OneHotEncoder } from './oneHotEncoder' +import { OneHotEncoder } from './OneHotEncoder' import { arrayTo2DColumn } from '../utils' describe('OneHotEncoder', function () { diff --git a/src/preprocessing/oneHotEncoder.ts b/src/preprocessing/oneHotEncoder.ts index 7c5f09d7..ea5f4f93 100644 --- a/src/preprocessing/oneHotEncoder.ts +++ b/src/preprocessing/oneHotEncoder.ts @@ -98,7 +98,7 @@ export class OneHotEncoder extends TransformerMixin { featureNamesIn: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'onehotencoder' + name = 'OneHotEncoder' constructor({ categories = 'auto', diff --git a/src/preprocessing/ordinalEncoder.test.ts b/src/preprocessing/ordinalEncoder.test.ts index e28ee00f..57666262 100644 --- a/src/preprocessing/ordinalEncoder.test.ts +++ b/src/preprocessing/ordinalEncoder.test.ts @@ -1,4 +1,4 @@ -import { OrdinalEncoder } from './ordinalEncoder' +import { OrdinalEncoder } from './OrdinalEncoder' import { arrayTo2DColumn } from '../utils' describe('OrdinalEncoder', function () { diff --git a/src/preprocessing/ordinalEncoder.ts b/src/preprocessing/ordinalEncoder.ts index e03403c9..4eb78752 100644 --- a/src/preprocessing/ordinalEncoder.ts +++ b/src/preprocessing/ordinalEncoder.ts @@ -89,7 +89,7 @@ export class OrdinalEncoder extends TransformerMixin { featureNamesIn: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'ordinalencoder' + name = 'OrdinalEncoder' constructor({ categories = 'auto', diff --git a/src/preprocessing/robustScaler.test.ts b/src/preprocessing/robustScaler.test.ts index 2a25da53..3a31475e 100644 --- a/src/preprocessing/robustScaler.test.ts +++ b/src/preprocessing/robustScaler.test.ts @@ -1,4 +1,4 @@ -import { RobustScaler } from './robustScaler' +import { RobustScaler } from './RobustScaler' import * as dfd from 'danfojs-node' import { arrayEqual } from '../utils' diff --git a/src/preprocessing/robustScaler.ts b/src/preprocessing/robustScaler.ts index 4964a488..9a78f129 100644 --- a/src/preprocessing/robustScaler.ts +++ b/src/preprocessing/robustScaler.ts @@ -107,7 +107,7 @@ export class RobustScaler extends TransformerMixin { withCentering: boolean /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'robustscaler' + name = 'RobustScaler' constructor({ quantileRange = [25.0, 75.0], diff --git a/src/preprocessing/standardScaler.test.ts b/src/preprocessing/standardScaler.test.ts index a66c6ff1..e3830ef7 100644 --- a/src/preprocessing/standardScaler.test.ts +++ b/src/preprocessing/standardScaler.test.ts @@ -1,4 +1,4 @@ -import { StandardScaler } from './standardScaler' +import { StandardScaler } from './StandardScaler' import * as dfd from 'danfojs-node' describe('StandardScaler', function () { diff --git a/src/preprocessing/standardScaler.ts b/src/preprocessing/standardScaler.ts index c763dab7..90cd9dde 100644 --- a/src/preprocessing/standardScaler.ts +++ b/src/preprocessing/standardScaler.ts @@ -86,7 +86,7 @@ export class StandardScaler extends TransformerMixin { featureNamesIn: Array /** Useful for pipelines and column transformers to have a default name for transforms */ - name = 'standardscaler' + name = 'StandardScaler' constructor({ withMean = true, withStd = true }: StandardScalerParams = {}) { super() diff --git a/src/svm/linearSVC.test.ts b/src/svm/linearSVC.test.ts index 7e41f37f..142a7034 100644 --- a/src/svm/linearSVC.test.ts +++ b/src/svm/linearSVC.test.ts @@ -1,4 +1,4 @@ -import { LinearSVC } from './linearSVC' +import { LinearSVC } from './LinearSVC' describe('LinearSVC', function () { it('Works on arrays (small example)', async function () { diff --git a/src/svm/linearSVC.ts b/src/svm/linearSVC.ts index 7f64be5c..bedd3c64 100644 --- a/src/svm/linearSVC.ts +++ b/src/svm/linearSVC.ts @@ -13,7 +13,7 @@ // * ========================================================================== // */ -import { SGDClassifier } from '../linear_model/sgdClassifier' +import { SGDClassifier } from '../linear_model/SgdClassifier' import { tf } from '../shared/globals' // First pass at a LinearSVC implementation using gradient descent diff --git a/src/svm/linearSVR.test.ts b/src/svm/linearSVR.test.ts index b0d25001..2e325983 100644 --- a/src/svm/linearSVR.test.ts +++ b/src/svm/linearSVR.test.ts @@ -1,4 +1,4 @@ -import { LinearSVR } from './linearSVR' +import { LinearSVR } from './LinearSVR' import { tensorEqual } from '../utils' import { tf } from '../shared/globals' diff --git a/src/svm/linearSVR.ts b/src/svm/linearSVR.ts index f3daf8b1..f7efe1e0 100644 --- a/src/svm/linearSVR.ts +++ b/src/svm/linearSVR.ts @@ -13,7 +13,7 @@ // * ========================================================================== // */ -import { SGDRegressor } from '../linear_model/sgdRegressor' +import { SGDRegressor } from '../linear_model/SgdRegressor' import { tf } from '../shared/globals' // First pass at a LinearSVC implementation using gradient descent diff --git a/src/tree/criterion.test.ts b/src/tree/criterion.test.ts index 551e18ed..c58617fc 100644 --- a/src/tree/criterion.test.ts +++ b/src/tree/criterion.test.ts @@ -1,4 +1,4 @@ -import { ClassificationCriterion, giniCoefficient, entropy } from './criterion' +import { ClassificationCriterion, giniCoefficient, entropy } from './Criterion' describe('Criterion', function () { let X = [ diff --git a/src/tree/decisiontree.test.ts b/src/tree/decisiontree.test.ts index cb500392..7e1a5207 100644 --- a/src/tree/decisiontree.test.ts +++ b/src/tree/decisiontree.test.ts @@ -1,4 +1,4 @@ -import { DecisionTreeClassifier, DecisionTreeRegressor } from './decisiontree' +import { DecisionTreeClassifier, DecisionTreeRegressor } from './DecisionTree' import { dataUrls } from '../datasets/datasets' import * as dfd from 'danfojs-node' diff --git a/src/tree/decisiontree.ts b/src/tree/decisiontree.ts index ca5c67f7..292dca08 100644 --- a/src/tree/decisiontree.ts +++ b/src/tree/decisiontree.ts @@ -1,13 +1,13 @@ -import { ImpurityMeasure } from './criterion' -import { Splitter } from './splitter' +import { ImpurityMeasure } from './Criterion' +import { Splitter } from './Splitter' import { int } from '../randUtils' import { r2Score, accuracyScore } from '../metrics/metrics' -import { Split, makeDefaultSplit } from './splitter' +import { Split, makeDefaultSplit } from './Splitter' import { assert, isScikit1D, isScikit2D } from '../typesUtils' import { validateX, validateY } from './utils' import { Scikit1D, Scikit2D } from '../types' import { convertScikit2DToArray, convertScikit1DToArray } from '../utils' -import { LabelEncoder } from '../preprocessing/labelEncoder' +import { LabelEncoder } from '../preprocessing/LabelEncoder' import Serialize from '../serialize' /* @@ -396,7 +396,7 @@ export class DecisionTreeClassifier extends DecisionTreeBase { minImpurityDecrease }) this.labelEncoder = new LabelEncoder() - this.name = 'decisionTreeClassifier' + this.name = 'DecisionTreeClassifier' } public fit(X: Scikit2D, y: Scikit1D): DecisionTreeClassifier { assert(isScikit1D(y), 'y value is not a 1D container') @@ -489,7 +489,7 @@ export class DecisionTreeRegressor extends DecisionTreeBase { maxFeatures, minImpurityDecrease }) - this.name = 'decisionTreeRegressor' + this.name = 'DecisionTreeRegressor' } public fit(X: Scikit2D, y: Scikit1D): DecisionTreeRegressor { assert(isScikit1D(y), 'y value is not a 1D container') diff --git a/src/tree/splitter.test.ts b/src/tree/splitter.test.ts index feac7fe8..ff7d7a6c 100644 --- a/src/tree/splitter.test.ts +++ b/src/tree/splitter.test.ts @@ -1,5 +1,5 @@ -import { ImpurityMeasure } from './criterion' -import { Splitter } from './splitter' +import { ImpurityMeasure } from './Criterion' +import { Splitter } from './Splitter' describe('Splitter', function () { let types = ['gini', 'entropy', 'squared_error'] diff --git a/src/tree/splitter.ts b/src/tree/splitter.ts index 93c331b3..e7fbbb60 100644 --- a/src/tree/splitter.ts +++ b/src/tree/splitter.ts @@ -2,7 +2,7 @@ import { ClassificationCriterion, RegressionCriterion, ImpurityMeasure -} from './criterion' +} from './Criterion' import { shuffle } from 'lodash' import { int } from '../randUtils' import Serialize from '../serialize' From 1a5017af9d12ac12370e8a4b644551e0b6df7f40 Mon Sep 17 00:00:00 2001 From: Dan Crescimanno Date: Thu, 21 Apr 2022 14:39:30 -0700 Subject: [PATCH 2/2] hopefully renamed files this time with git --- src/cluster/{kmeans.test.ts => KMeans.test.ts} | 0 src/cluster/{kmeans.ts => KMeans.ts} | 0 .../{columnTransformer.test.ts => ColumnTransformer.test.ts} | 0 src/compose/{columnTransformer.ts => ColumnTransformer.ts} | 0 src/dummy/{dummyClassifier.test.ts => DummyClassifier.test.ts} | 0 src/dummy/{dummyClassifier.ts => DummyClassifier.ts} | 0 src/dummy/{dummyRegressor.test.ts => DummyRegressor.test.ts} | 0 src/dummy/{dummyRegressor.ts => DummyRegressor.ts} | 0 .../{votingClassifier.test.ts => VotingClassifier.test.ts} | 0 src/ensemble/{votingClassifier.ts => VotingClassifier.ts} | 0 .../{votingRegressor.test.ts => VotingRegressor.test.ts} | 0 src/ensemble/{votingRegressor.ts => VotingRegressor.ts} | 0 src/impute/{simpleImputer.test.ts => SimpleImputer.test.ts} | 0 src/impute/{simpleImputer.ts => SimpleImputer.ts} | 0 src/linear_model/{elasticNet.ts => ElasticNet.ts} | 0 src/linear_model/{lassoRegression.ts => LassoRegression.ts} | 0 .../{linearRegression.test.ts => LinearRegression.test.ts} | 0 src/linear_model/{linearRegression.ts => LinearRegression.ts} | 0 .../{logisticRegression.test.ts => LogisticRegression.test.ts} | 0 .../{logisticRegression.ts => LogisticRegression.ts} | 0 src/linear_model/{ridgeRegression.ts => RidgeRegression.ts} | 0 src/linear_model/{sgdClassifier.ts => SgdClassifier.ts} | 0 src/linear_model/{sgdRegressor.ts => SgdRegressor.ts} | 0 src/model_selection/{crossValidator.ts => CrossValidator.ts} | 0 src/model_selection/{kFold.test.ts => KFold.test.ts} | 0 src/model_selection/{kFold.ts => KFold.ts} | 0 src/naive_bayes/{baseNaiveBayes.ts => BaseNaiveBayes.ts} | 0 .../{bruteNeighborhood.test.ts => BruteNeighborhood.test.ts} | 2 +- src/neighbors/{bruteNeighborhood.ts => BruteNeighborhood.ts} | 0 src/neighbors/{cappedMaxHeap.test.ts => CappedMaxHeap.test.ts} | 2 +- src/neighbors/{cappedMaxHeap.ts => CappedMaxHeap.ts} | 0 src/neighbors/{kNeighborsBase.ts => KNeighborsBase.ts} | 0 ...NeighborsClassifier.test.ts => KNeighborsClassifier.test.ts} | 0 .../{kNeighborsClassifier.ts => KNeighborsClassifier.ts} | 0 ...{kNeighborsRegressor.test.ts => KNeighborsRegressor.test.ts} | 0 .../{kNeighborsRegressor.ts => KNeighborsRegressor.ts} | 0 src/neighbors/{kdTree.test.ts => KdTree.test.ts} | 0 src/neighbors/{kdTree.ts => KdTree.ts} | 0 src/neighbors/{neighborhood.ts => Neighborhood.ts} | 0 src/pipeline/{pipeline.test.ts => Pipeline.test.ts} | 0 src/pipeline/{pipeline.ts => Pipeline.ts} | 0 .../{labelEncoder.test.ts => LabelEncoder.test.ts} | 0 src/preprocessing/{labelEncoder.ts => LabelEncoder.ts} | 0 .../{maxAbsScaler.test.ts => MaxAbsScaler.test.ts} | 0 src/preprocessing/{maxAbsScaler.ts => MaxAbsScaler.ts} | 0 .../{minMaxScaler.test.ts => MinMaxScaler.test.ts} | 0 src/preprocessing/{minMaxScaler.ts => MinMaxScaler.ts} | 0 src/preprocessing/{normalizer.test.ts => Normalizer.test.ts} | 0 src/preprocessing/{normalizer.ts => Normalizer.ts} | 0 .../{oneHotEncoder.test.ts => OneHotEncoder.test.ts} | 0 src/preprocessing/{oneHotEncoder.ts => OneHotEncoder.ts} | 0 .../{ordinalEncoder.test.ts => OrdinalEncoder.test.ts} | 0 src/preprocessing/{ordinalEncoder.ts => OrdinalEncoder.ts} | 0 .../{robustScaler.test.ts => RobustScaler.test.ts} | 0 src/preprocessing/{robustScaler.ts => RobustScaler.ts} | 0 .../{standardScaler.test.ts => StandardScaler.test.ts} | 0 src/preprocessing/{standardScaler.ts => StandardScaler.ts} | 0 src/svm/{linearSVC.test.ts => LinearSVC.test.ts} | 0 src/svm/{linearSVC.ts => LinearSVC.ts} | 0 src/svm/{linearSVR.test.ts => LinearSVR.test.ts} | 0 src/svm/{linearSVR.ts => LinearSVR.ts} | 0 src/tree/{criterion.test.ts => Criterion.test.ts} | 0 src/tree/{criterion.ts => Criterion.ts} | 0 src/tree/{decisiontree.test.ts => DecisionTree.test.ts} | 0 src/tree/{decisiontree.ts => DecisionTree.ts} | 0 src/tree/{splitter.test.ts => Splitter.test.ts} | 0 src/tree/{splitter.ts => Splitter.ts} | 0 67 files changed, 2 insertions(+), 2 deletions(-) rename src/cluster/{kmeans.test.ts => KMeans.test.ts} (100%) rename src/cluster/{kmeans.ts => KMeans.ts} (100%) rename src/compose/{columnTransformer.test.ts => ColumnTransformer.test.ts} (100%) rename src/compose/{columnTransformer.ts => ColumnTransformer.ts} (100%) rename src/dummy/{dummyClassifier.test.ts => DummyClassifier.test.ts} (100%) rename src/dummy/{dummyClassifier.ts => DummyClassifier.ts} (100%) rename src/dummy/{dummyRegressor.test.ts => DummyRegressor.test.ts} (100%) rename src/dummy/{dummyRegressor.ts => DummyRegressor.ts} (100%) rename src/ensemble/{votingClassifier.test.ts => VotingClassifier.test.ts} (100%) rename src/ensemble/{votingClassifier.ts => VotingClassifier.ts} (100%) rename src/ensemble/{votingRegressor.test.ts => VotingRegressor.test.ts} (100%) rename src/ensemble/{votingRegressor.ts => VotingRegressor.ts} (100%) rename src/impute/{simpleImputer.test.ts => SimpleImputer.test.ts} (100%) rename src/impute/{simpleImputer.ts => SimpleImputer.ts} (100%) rename src/linear_model/{elasticNet.ts => ElasticNet.ts} (100%) rename src/linear_model/{lassoRegression.ts => LassoRegression.ts} (100%) rename src/linear_model/{linearRegression.test.ts => LinearRegression.test.ts} (100%) rename src/linear_model/{linearRegression.ts => LinearRegression.ts} (100%) rename src/linear_model/{logisticRegression.test.ts => LogisticRegression.test.ts} (100%) rename src/linear_model/{logisticRegression.ts => LogisticRegression.ts} (100%) rename src/linear_model/{ridgeRegression.ts => RidgeRegression.ts} (100%) rename src/linear_model/{sgdClassifier.ts => SgdClassifier.ts} (100%) rename src/linear_model/{sgdRegressor.ts => SgdRegressor.ts} (100%) rename src/model_selection/{crossValidator.ts => CrossValidator.ts} (100%) rename src/model_selection/{kFold.test.ts => KFold.test.ts} (100%) rename src/model_selection/{kFold.ts => KFold.ts} (100%) rename src/naive_bayes/{baseNaiveBayes.ts => BaseNaiveBayes.ts} (100%) rename src/neighbors/{bruteNeighborhood.test.ts => BruteNeighborhood.test.ts} (93%) rename src/neighbors/{bruteNeighborhood.ts => BruteNeighborhood.ts} (100%) rename src/neighbors/{cappedMaxHeap.test.ts => CappedMaxHeap.test.ts} (97%) rename src/neighbors/{cappedMaxHeap.ts => CappedMaxHeap.ts} (100%) rename src/neighbors/{kNeighborsBase.ts => KNeighborsBase.ts} (100%) rename src/neighbors/{kNeighborsClassifier.test.ts => KNeighborsClassifier.test.ts} (100%) rename src/neighbors/{kNeighborsClassifier.ts => KNeighborsClassifier.ts} (100%) rename src/neighbors/{kNeighborsRegressor.test.ts => KNeighborsRegressor.test.ts} (100%) rename src/neighbors/{kNeighborsRegressor.ts => KNeighborsRegressor.ts} (100%) rename src/neighbors/{kdTree.test.ts => KdTree.test.ts} (100%) rename src/neighbors/{kdTree.ts => KdTree.ts} (100%) rename src/neighbors/{neighborhood.ts => Neighborhood.ts} (100%) rename src/pipeline/{pipeline.test.ts => Pipeline.test.ts} (100%) rename src/pipeline/{pipeline.ts => Pipeline.ts} (100%) rename src/preprocessing/{labelEncoder.test.ts => LabelEncoder.test.ts} (100%) rename src/preprocessing/{labelEncoder.ts => LabelEncoder.ts} (100%) rename src/preprocessing/{maxAbsScaler.test.ts => MaxAbsScaler.test.ts} (100%) rename src/preprocessing/{maxAbsScaler.ts => MaxAbsScaler.ts} (100%) rename src/preprocessing/{minMaxScaler.test.ts => MinMaxScaler.test.ts} (100%) rename src/preprocessing/{minMaxScaler.ts => MinMaxScaler.ts} (100%) rename src/preprocessing/{normalizer.test.ts => Normalizer.test.ts} (100%) rename src/preprocessing/{normalizer.ts => Normalizer.ts} (100%) rename src/preprocessing/{oneHotEncoder.test.ts => OneHotEncoder.test.ts} (100%) rename src/preprocessing/{oneHotEncoder.ts => OneHotEncoder.ts} (100%) rename src/preprocessing/{ordinalEncoder.test.ts => OrdinalEncoder.test.ts} (100%) rename src/preprocessing/{ordinalEncoder.ts => OrdinalEncoder.ts} (100%) rename src/preprocessing/{robustScaler.test.ts => RobustScaler.test.ts} (100%) rename src/preprocessing/{robustScaler.ts => RobustScaler.ts} (100%) rename src/preprocessing/{standardScaler.test.ts => StandardScaler.test.ts} (100%) rename src/preprocessing/{standardScaler.ts => StandardScaler.ts} (100%) rename src/svm/{linearSVC.test.ts => LinearSVC.test.ts} (100%) rename src/svm/{linearSVC.ts => LinearSVC.ts} (100%) rename src/svm/{linearSVR.test.ts => LinearSVR.test.ts} (100%) rename src/svm/{linearSVR.ts => LinearSVR.ts} (100%) rename src/tree/{criterion.test.ts => Criterion.test.ts} (100%) rename src/tree/{criterion.ts => Criterion.ts} (100%) rename src/tree/{decisiontree.test.ts => DecisionTree.test.ts} (100%) rename src/tree/{decisiontree.ts => DecisionTree.ts} (100%) rename src/tree/{splitter.test.ts => Splitter.test.ts} (100%) rename src/tree/{splitter.ts => Splitter.ts} (100%) diff --git a/src/cluster/kmeans.test.ts b/src/cluster/KMeans.test.ts similarity index 100% rename from src/cluster/kmeans.test.ts rename to src/cluster/KMeans.test.ts diff --git a/src/cluster/kmeans.ts b/src/cluster/KMeans.ts similarity index 100% rename from src/cluster/kmeans.ts rename to src/cluster/KMeans.ts diff --git a/src/compose/columnTransformer.test.ts b/src/compose/ColumnTransformer.test.ts similarity index 100% rename from src/compose/columnTransformer.test.ts rename to src/compose/ColumnTransformer.test.ts diff --git a/src/compose/columnTransformer.ts b/src/compose/ColumnTransformer.ts similarity index 100% rename from src/compose/columnTransformer.ts rename to src/compose/ColumnTransformer.ts diff --git a/src/dummy/dummyClassifier.test.ts b/src/dummy/DummyClassifier.test.ts similarity index 100% rename from src/dummy/dummyClassifier.test.ts rename to src/dummy/DummyClassifier.test.ts diff --git a/src/dummy/dummyClassifier.ts b/src/dummy/DummyClassifier.ts similarity index 100% rename from src/dummy/dummyClassifier.ts rename to src/dummy/DummyClassifier.ts diff --git a/src/dummy/dummyRegressor.test.ts b/src/dummy/DummyRegressor.test.ts similarity index 100% rename from src/dummy/dummyRegressor.test.ts rename to src/dummy/DummyRegressor.test.ts diff --git a/src/dummy/dummyRegressor.ts b/src/dummy/DummyRegressor.ts similarity index 100% rename from src/dummy/dummyRegressor.ts rename to src/dummy/DummyRegressor.ts diff --git a/src/ensemble/votingClassifier.test.ts b/src/ensemble/VotingClassifier.test.ts similarity index 100% rename from src/ensemble/votingClassifier.test.ts rename to src/ensemble/VotingClassifier.test.ts diff --git a/src/ensemble/votingClassifier.ts b/src/ensemble/VotingClassifier.ts similarity index 100% rename from src/ensemble/votingClassifier.ts rename to src/ensemble/VotingClassifier.ts diff --git a/src/ensemble/votingRegressor.test.ts b/src/ensemble/VotingRegressor.test.ts similarity index 100% rename from src/ensemble/votingRegressor.test.ts rename to src/ensemble/VotingRegressor.test.ts diff --git a/src/ensemble/votingRegressor.ts b/src/ensemble/VotingRegressor.ts similarity index 100% rename from src/ensemble/votingRegressor.ts rename to src/ensemble/VotingRegressor.ts diff --git a/src/impute/simpleImputer.test.ts b/src/impute/SimpleImputer.test.ts similarity index 100% rename from src/impute/simpleImputer.test.ts rename to src/impute/SimpleImputer.test.ts diff --git a/src/impute/simpleImputer.ts b/src/impute/SimpleImputer.ts similarity index 100% rename from src/impute/simpleImputer.ts rename to src/impute/SimpleImputer.ts diff --git a/src/linear_model/elasticNet.ts b/src/linear_model/ElasticNet.ts similarity index 100% rename from src/linear_model/elasticNet.ts rename to src/linear_model/ElasticNet.ts diff --git a/src/linear_model/lassoRegression.ts b/src/linear_model/LassoRegression.ts similarity index 100% rename from src/linear_model/lassoRegression.ts rename to src/linear_model/LassoRegression.ts diff --git a/src/linear_model/linearRegression.test.ts b/src/linear_model/LinearRegression.test.ts similarity index 100% rename from src/linear_model/linearRegression.test.ts rename to src/linear_model/LinearRegression.test.ts diff --git a/src/linear_model/linearRegression.ts b/src/linear_model/LinearRegression.ts similarity index 100% rename from src/linear_model/linearRegression.ts rename to src/linear_model/LinearRegression.ts diff --git a/src/linear_model/logisticRegression.test.ts b/src/linear_model/LogisticRegression.test.ts similarity index 100% rename from src/linear_model/logisticRegression.test.ts rename to src/linear_model/LogisticRegression.test.ts diff --git a/src/linear_model/logisticRegression.ts b/src/linear_model/LogisticRegression.ts similarity index 100% rename from src/linear_model/logisticRegression.ts rename to src/linear_model/LogisticRegression.ts diff --git a/src/linear_model/ridgeRegression.ts b/src/linear_model/RidgeRegression.ts similarity index 100% rename from src/linear_model/ridgeRegression.ts rename to src/linear_model/RidgeRegression.ts diff --git a/src/linear_model/sgdClassifier.ts b/src/linear_model/SgdClassifier.ts similarity index 100% rename from src/linear_model/sgdClassifier.ts rename to src/linear_model/SgdClassifier.ts diff --git a/src/linear_model/sgdRegressor.ts b/src/linear_model/SgdRegressor.ts similarity index 100% rename from src/linear_model/sgdRegressor.ts rename to src/linear_model/SgdRegressor.ts diff --git a/src/model_selection/crossValidator.ts b/src/model_selection/CrossValidator.ts similarity index 100% rename from src/model_selection/crossValidator.ts rename to src/model_selection/CrossValidator.ts diff --git a/src/model_selection/kFold.test.ts b/src/model_selection/KFold.test.ts similarity index 100% rename from src/model_selection/kFold.test.ts rename to src/model_selection/KFold.test.ts diff --git a/src/model_selection/kFold.ts b/src/model_selection/KFold.ts similarity index 100% rename from src/model_selection/kFold.ts rename to src/model_selection/KFold.ts diff --git a/src/naive_bayes/baseNaiveBayes.ts b/src/naive_bayes/BaseNaiveBayes.ts similarity index 100% rename from src/naive_bayes/baseNaiveBayes.ts rename to src/naive_bayes/BaseNaiveBayes.ts diff --git a/src/neighbors/bruteNeighborhood.test.ts b/src/neighbors/BruteNeighborhood.test.ts similarity index 93% rename from src/neighbors/bruteNeighborhood.test.ts rename to src/neighbors/BruteNeighborhood.test.ts index 0bf4f787..b263ff51 100644 --- a/src/neighbors/bruteNeighborhood.test.ts +++ b/src/neighbors/BruteNeighborhood.test.ts @@ -14,7 +14,7 @@ */ import { neighborhoodGenericTests } from './neighborhoodGenericTests' -import { BruteNeighborhood } from './bruteNeighborhood' +import { BruteNeighborhood } from './BruteNeighborhood' neighborhoodGenericTests( 'BruteNeighborhood', diff --git a/src/neighbors/bruteNeighborhood.ts b/src/neighbors/BruteNeighborhood.ts similarity index 100% rename from src/neighbors/bruteNeighborhood.ts rename to src/neighbors/BruteNeighborhood.ts diff --git a/src/neighbors/cappedMaxHeap.test.ts b/src/neighbors/CappedMaxHeap.test.ts similarity index 97% rename from src/neighbors/cappedMaxHeap.test.ts rename to src/neighbors/CappedMaxHeap.test.ts index 64956345..181d8ea9 100644 --- a/src/neighbors/cappedMaxHeap.test.ts +++ b/src/neighbors/CappedMaxHeap.test.ts @@ -15,7 +15,7 @@ import * as fc from 'fast-check' -import { CappedMaxHeap } from './cappedMaxHeap' +import { CappedMaxHeap } from './CappedMaxHeap' describe('CappedMaxHeap', () => { const anyFloat = () => diff --git a/src/neighbors/cappedMaxHeap.ts b/src/neighbors/CappedMaxHeap.ts similarity index 100% rename from src/neighbors/cappedMaxHeap.ts rename to src/neighbors/CappedMaxHeap.ts diff --git a/src/neighbors/kNeighborsBase.ts b/src/neighbors/KNeighborsBase.ts similarity index 100% rename from src/neighbors/kNeighborsBase.ts rename to src/neighbors/KNeighborsBase.ts diff --git a/src/neighbors/kNeighborsClassifier.test.ts b/src/neighbors/KNeighborsClassifier.test.ts similarity index 100% rename from src/neighbors/kNeighborsClassifier.test.ts rename to src/neighbors/KNeighborsClassifier.test.ts diff --git a/src/neighbors/kNeighborsClassifier.ts b/src/neighbors/KNeighborsClassifier.ts similarity index 100% rename from src/neighbors/kNeighborsClassifier.ts rename to src/neighbors/KNeighborsClassifier.ts diff --git a/src/neighbors/kNeighborsRegressor.test.ts b/src/neighbors/KNeighborsRegressor.test.ts similarity index 100% rename from src/neighbors/kNeighborsRegressor.test.ts rename to src/neighbors/KNeighborsRegressor.test.ts diff --git a/src/neighbors/kNeighborsRegressor.ts b/src/neighbors/KNeighborsRegressor.ts similarity index 100% rename from src/neighbors/kNeighborsRegressor.ts rename to src/neighbors/KNeighborsRegressor.ts diff --git a/src/neighbors/kdTree.test.ts b/src/neighbors/KdTree.test.ts similarity index 100% rename from src/neighbors/kdTree.test.ts rename to src/neighbors/KdTree.test.ts diff --git a/src/neighbors/kdTree.ts b/src/neighbors/KdTree.ts similarity index 100% rename from src/neighbors/kdTree.ts rename to src/neighbors/KdTree.ts diff --git a/src/neighbors/neighborhood.ts b/src/neighbors/Neighborhood.ts similarity index 100% rename from src/neighbors/neighborhood.ts rename to src/neighbors/Neighborhood.ts diff --git a/src/pipeline/pipeline.test.ts b/src/pipeline/Pipeline.test.ts similarity index 100% rename from src/pipeline/pipeline.test.ts rename to src/pipeline/Pipeline.test.ts diff --git a/src/pipeline/pipeline.ts b/src/pipeline/Pipeline.ts similarity index 100% rename from src/pipeline/pipeline.ts rename to src/pipeline/Pipeline.ts diff --git a/src/preprocessing/labelEncoder.test.ts b/src/preprocessing/LabelEncoder.test.ts similarity index 100% rename from src/preprocessing/labelEncoder.test.ts rename to src/preprocessing/LabelEncoder.test.ts diff --git a/src/preprocessing/labelEncoder.ts b/src/preprocessing/LabelEncoder.ts similarity index 100% rename from src/preprocessing/labelEncoder.ts rename to src/preprocessing/LabelEncoder.ts diff --git a/src/preprocessing/maxAbsScaler.test.ts b/src/preprocessing/MaxAbsScaler.test.ts similarity index 100% rename from src/preprocessing/maxAbsScaler.test.ts rename to src/preprocessing/MaxAbsScaler.test.ts diff --git a/src/preprocessing/maxAbsScaler.ts b/src/preprocessing/MaxAbsScaler.ts similarity index 100% rename from src/preprocessing/maxAbsScaler.ts rename to src/preprocessing/MaxAbsScaler.ts diff --git a/src/preprocessing/minMaxScaler.test.ts b/src/preprocessing/MinMaxScaler.test.ts similarity index 100% rename from src/preprocessing/minMaxScaler.test.ts rename to src/preprocessing/MinMaxScaler.test.ts diff --git a/src/preprocessing/minMaxScaler.ts b/src/preprocessing/MinMaxScaler.ts similarity index 100% rename from src/preprocessing/minMaxScaler.ts rename to src/preprocessing/MinMaxScaler.ts diff --git a/src/preprocessing/normalizer.test.ts b/src/preprocessing/Normalizer.test.ts similarity index 100% rename from src/preprocessing/normalizer.test.ts rename to src/preprocessing/Normalizer.test.ts diff --git a/src/preprocessing/normalizer.ts b/src/preprocessing/Normalizer.ts similarity index 100% rename from src/preprocessing/normalizer.ts rename to src/preprocessing/Normalizer.ts diff --git a/src/preprocessing/oneHotEncoder.test.ts b/src/preprocessing/OneHotEncoder.test.ts similarity index 100% rename from src/preprocessing/oneHotEncoder.test.ts rename to src/preprocessing/OneHotEncoder.test.ts diff --git a/src/preprocessing/oneHotEncoder.ts b/src/preprocessing/OneHotEncoder.ts similarity index 100% rename from src/preprocessing/oneHotEncoder.ts rename to src/preprocessing/OneHotEncoder.ts diff --git a/src/preprocessing/ordinalEncoder.test.ts b/src/preprocessing/OrdinalEncoder.test.ts similarity index 100% rename from src/preprocessing/ordinalEncoder.test.ts rename to src/preprocessing/OrdinalEncoder.test.ts diff --git a/src/preprocessing/ordinalEncoder.ts b/src/preprocessing/OrdinalEncoder.ts similarity index 100% rename from src/preprocessing/ordinalEncoder.ts rename to src/preprocessing/OrdinalEncoder.ts diff --git a/src/preprocessing/robustScaler.test.ts b/src/preprocessing/RobustScaler.test.ts similarity index 100% rename from src/preprocessing/robustScaler.test.ts rename to src/preprocessing/RobustScaler.test.ts diff --git a/src/preprocessing/robustScaler.ts b/src/preprocessing/RobustScaler.ts similarity index 100% rename from src/preprocessing/robustScaler.ts rename to src/preprocessing/RobustScaler.ts diff --git a/src/preprocessing/standardScaler.test.ts b/src/preprocessing/StandardScaler.test.ts similarity index 100% rename from src/preprocessing/standardScaler.test.ts rename to src/preprocessing/StandardScaler.test.ts diff --git a/src/preprocessing/standardScaler.ts b/src/preprocessing/StandardScaler.ts similarity index 100% rename from src/preprocessing/standardScaler.ts rename to src/preprocessing/StandardScaler.ts diff --git a/src/svm/linearSVC.test.ts b/src/svm/LinearSVC.test.ts similarity index 100% rename from src/svm/linearSVC.test.ts rename to src/svm/LinearSVC.test.ts diff --git a/src/svm/linearSVC.ts b/src/svm/LinearSVC.ts similarity index 100% rename from src/svm/linearSVC.ts rename to src/svm/LinearSVC.ts diff --git a/src/svm/linearSVR.test.ts b/src/svm/LinearSVR.test.ts similarity index 100% rename from src/svm/linearSVR.test.ts rename to src/svm/LinearSVR.test.ts diff --git a/src/svm/linearSVR.ts b/src/svm/LinearSVR.ts similarity index 100% rename from src/svm/linearSVR.ts rename to src/svm/LinearSVR.ts diff --git a/src/tree/criterion.test.ts b/src/tree/Criterion.test.ts similarity index 100% rename from src/tree/criterion.test.ts rename to src/tree/Criterion.test.ts diff --git a/src/tree/criterion.ts b/src/tree/Criterion.ts similarity index 100% rename from src/tree/criterion.ts rename to src/tree/Criterion.ts diff --git a/src/tree/decisiontree.test.ts b/src/tree/DecisionTree.test.ts similarity index 100% rename from src/tree/decisiontree.test.ts rename to src/tree/DecisionTree.test.ts diff --git a/src/tree/decisiontree.ts b/src/tree/DecisionTree.ts similarity index 100% rename from src/tree/decisiontree.ts rename to src/tree/DecisionTree.ts diff --git a/src/tree/splitter.test.ts b/src/tree/Splitter.test.ts similarity index 100% rename from src/tree/splitter.test.ts rename to src/tree/Splitter.test.ts diff --git a/src/tree/splitter.ts b/src/tree/Splitter.ts similarity index 100% rename from src/tree/splitter.ts rename to src/tree/Splitter.ts