imports Flashcards

1
Q

sm

A

import statsmodels.api as sm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

scikit learn linear regression

A

from sklearn.linear_model import LinearRegression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

format numeric axis for plots

A

from matplotlib.ticker import PercentFormatter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

sklearn feature selection

A

from sklearn.feature_selection import f_regression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

sklearn scaler. code and what does it do?

A
from sklearn.preprocessing import StandardScaler
# (subtract mean) / std
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

sklearn split training and test

A

from sklearn.model_selection import train_test_split

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

check for multicollinearity

A

from statsmodels.stats.outliers_influence import variance_inflation_factor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

fix for logistic regression from statsmodels

A

from scipy import stats

stats.chisqprob = lambda chisq, df: stats.chi2.sf(chisq, df)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

sklearn kmeans

A

from sklearn.cluster import KMeans

How well did you know this?
1
Not at all
2
3
4
5
Perfectly