import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.externals import joblib
iris = joblib.load('later.pkl')
data = pd.DataFrame(iris,index = range(0,150),columns=['a','b','c','d','e'])
X = data.loc[:,'a':'d']
y = data['e']
class A():
count = 0
def __init__(self):
A.count += 1
@classmethod #参数指向当前类
def kid(cls):
print('A has',cls.count,'little objects')
@staticmethod#静态方法 不需要参数 仅仅组织代码
def static_method():
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
不断否定自己,但要坚持最初的意愿——不论战术上如何变化,千万不要忘记战略目标。 |