Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a KNN model and KNN model trainer #437

Merged
merged 5 commits into from
Jan 6, 2024

Conversation

r59q
Copy link
Collaborator

@r59q r59q commented Jan 5, 2024

Adds a K-Nearest Neighbour ML model and a trainer for the model. See KNNMLModel.ts and KNNModelTrainer.ts.

 const trainModelButtonClicked = () => {
    const k = 10;
    model.train(new KNNModelTrainer(k)).then(() => {
        // Model finished training
    });
  };
<button on:click={trainModelButtonClicked}>
  train KNN model!
</button>

Theres no UI to select it yet. However one can try it out by going to the playground and use the 'train KNN model' button to train one, then return to the model tab to see how well it works. Tip: Turn off the synthesizer before.

This prepares the next task #431

@r59q r59q linked an issue Jan 5, 2024 that may be closed by this pull request
@r59q r59q requested a review from Karlo-Emilo January 5, 2024 20:30
@Karlo-Emilo Karlo-Emilo merged commit 16ed3ae into main Jan 6, 2024
4 checks passed
@Karlo-Emilo Karlo-Emilo deleted the 430-make-a-knnmodel-and-a-knnmodeltrainer branch January 6, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make a KNNModel and a KNNModelTrainer
2 participants