Coder Social home page Coder Social logo

recommend11's Introduction

仅用于学习日记 不可用于任何商业用途

#目的:利用GBDT对客户流失进行预测 #1、整理数据 #利用字典的形式,将数据中的的非数字转为数字,如为空转为0 #2、分割数据 #利用sklearn中的train_test_split(data,test_size,random_state) #3、定义模型和训练 #model=sklearn.ensemble.GradientBoostingClassifier(learning_rate,n_estimators,max_dapth) #model.fit(train_x,train_y) #4、评估模型 #model.predict(test_x)预测y #预测出的y为概率 所以需要二分类 y>0.5 则为1 反之为0 #sklearn.metrics.mean_squared_error(y_predict,y_test)计算mse #sklearn.metrics.accuracy_score(y_predict,y_test) 计算正确率

recommend11's People

Contributors

jelena0521 avatar jacqueline0521 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.