Created
October 17, 2018 04:36
-
-
Save JasonShin/4bbd17dba030221e82ceca7f9e4c211b to your computer and use it in GitHub Desktop.
Training script for Kalimdor Titanic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const trainData = preprocess(titanicTrain); | |
| const testData = preprocess(titanicTest); | |
| const cls = new RandomForestClassifier({ | |
| nEstimator: 100, | |
| }); | |
| cls.fit({ X: trainData.X, y: trainData.y }); | |
| const yPred = cls.predict(testData.X); | |
| const yTrue = preprocessYTrue(titanicYtrue); | |
| const accResult = accuracyScore({ | |
| y_true: yTrue, | |
| y_pred: yPred, | |
| }); | |
| console.log('final accuracy', accResult); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment