Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

gaussian

from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=142)
Naive_Bayes = GaussianNB()
Naive_Bayes.fit(X_train, y_train)
prediction_results = Naive_Bayes.predict(X_test)  
print(prediction_results)
Comment

PREVIOUS NEXT
Code Example
Python :: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997) 
Python :: add to list in python 
Python :: python pytest vs unittest 
Python :: comment all selected lines in python 
Python :: instance of object 
Python :: how to activate venv python 
Python :: python array append array 
Python :: pop element from list python 
Python :: python string and integer concatenation 
Python :: self object 
Python :: pass in python 
Python :: np.divide 
Python :: read yml file in python 
Python :: drop variable pandas 
Python :: sequence python 
Python :: interpreter in python 
Python :: object has no attribute python 
Python :: Unreadable Notebook: jpyter 
Python :: InsertionSort 
Python :: punto1 
Python :: Delete all small Latin letters a from the given string. 
Python :: printing a varible with a varible. python 
Python :: python sort list by length of sublist 
Python :: pyqt5 tab order 
Python :: daemon in os 
Python :: python timestamp human readable 
Python :: np array specified lengte same value 
Python :: mostFrequentDays python 
Python :: auto clipping path image using python 
Python :: dbscan clustering of latitudes and longitudes 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =