HOME/Articles/

matplotlib example import for ml (snippet)

Article Outline

Python matplotlib example 'import for ml'

Modules used in program:

  • import warnings
  • import matplotlib.pyplot as plt
  • import pandas as pd
  • import numpy as np

python import for ml

Python matplotlib example: import for ml

# Basic
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
from matplotlib.cm import rainbow
%matplotlib inline
import warnings
warnings.filterwarnings('ignore')

# Other libraries
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

# Machine Learning
from sklearn.neighbors import KNeighborsClassifier
from sklearn.svm import SVC
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier