HOME/Articles/

matplotlib example smlSeg1 (snippet)

Article Outline

Python matplotlib example 'smlSeg1'

Modules used in program:

  • import tensorflow as tf
  • import seaborn as sns
  • import matplotlib.pyplot as plt
  • import pandas as pd
  • import numpy as np

python smlSeg1

Python matplotlib example: smlSeg1

# Package Imports being use to make things happen
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.model_selection import ShuffleSplit, KFold
from sklearn.model_selection import cross_val_score, cross_val_predict
from sklearn import metrics
import seaborn as sns
import tensorflow as tf

# Special methods/'magic' functions for the visualizations
sns.set()
%matplotlib inline