Files
python-VM/bayes-learning/lesson1-rewrite.py

34 lines
725 B
Python

import pandas as pd
import os
from sklearn.preprocessing import StandardScaler
from matplotlib.colors import ListedColormap
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
matplotlib.rcParams['backend'] = 'TkAgg'
class getData(object):
"""docstring for getData"""
def __init__(self, file):
super(getData, self).__init__()
self.file = file
class Bayes(getData):
"""docstring for Bayes"""
def __init__(self, file):
super(Bayes, self).__init__()
self.file = file
def get_path(self):
path = os.getcwd()
file_path = path + self.file
return file_path
bayes = Bayes(file='data/Social_Network_Ads.csv')
print(bayes.get_path())