Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

multinomial regression scikit learn

model1 = LogisticRegression(random_state=0, multi_class='multinomial', penalty='none', solver='newton-cg').fit(X_train, y_train)
preds = model1.predict(X_test)

#print the tunable parameters (They were not tuned in this example, everything kept as default)
params = model1.get_params()
print(params)

{'C': 1.0, 'class_weight': None, 'dual': False, 'fit_intercept': True, 'intercept_scaling': 1, 'l1_ratio': None, 'max_iter': 100, 'multi_class': 'multinomial', 'n_jobs': None, 'penalty': 'none', 'random_state': 0, 'solver': 'newton-cg', 'tol': 0.0001, 'verbose': 0, 'warm_start': False}
Comment

PREVIOUS NEXT
Code Example
Python :: randomforestregressor in sklearn 
Python :: python set grid thickness 
Python :: unshorten url python 
Python :: python printing to a file 
Python :: distplot with plotly 
Python :: python count multiple characters in string 
Python :: # convert dictionary into list of tuples 
Python :: python program to convert unit 
Python :: How to generate all the permutations of a set of integers, in Python? 
Python :: how to get date in numbers using python 
Python :: plt.legend( 
Python :: identify total number of iframes with Selenium 
Python :: python tuple to list 
Python :: stop program python 
Python :: convert decimal to hex python 
Python :: remove unnamed 0 column pandas 
Python :: dynamic array python numpy 
Python :: download image from url python 3 
Python :: delete values with condition in numpy 
Python :: exit in python 
Python :: python recurrent timer 
Python :: python regex tester 
Python :: sort dict by value python 3 
Python :: remove string punctuation python 3 
Python :: python library to make qr codes 
Python :: python basic flask app 
Python :: onehotencoder pyspark 
Python :: label point matplotlib 
Python :: pyhon random number 
Python :: python printing variables 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =