Created
January 5, 2019 01:13
-
-
Save Crepu/7f540a12a7cf1e1a84b9cdd6f8d7c7b0 to your computer and use it in GitHub Desktop.
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
| #vectores de caracteristicas | |
| datos=[[1,1,1], | |
| [1,1,1], | |
| [1,1,1], | |
| [1,1,0], | |
| [1,0,0], | |
| [1,0,0]] | |
| etiquetas=[1,1,1,-1,-1,-1] | |
| test=[[1,1,1], | |
| [1,0,0]] | |
| from sklearn.naive_bayes import MultinomialNB | |
| modelo=MultinomialNB() | |
| modelo.fit(datos,etiquetas) | |
| print(modelo.predict(test)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment