Giter Club home page Giter Club logo

chengjun / mybook Goto Github PK

View Code? Open in Web Editor NEW
82.0 4.0 23.0 550.6 MB

Lectures on Computational Communication

Home Page: https://chengjun.github.io/mybook/

License: GNU General Public License v3.0

Jupyter Notebook 82.75% HTML 16.37% CSS 0.01% JavaScript 0.02% Python 0.21% Rich Text Format 0.61% TeX 0.03% Shell 0.01% Common Lisp 0.01% Makefile 0.01% Batchfile 0.01% R 0.01% Perl 0.01%
computational-communication computational-social-science jupyter-notebook python

mybook's Introduction

🌱 Know thyself and kindle the fire in your heart!

mybook's People

Contributors

chengjun avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mybook's Issues

Non-consecutive header level

Discussed in #25

Originally posted by chengjun October 27, 2021

  • /home/runner/work/mybook/mybook/03-UK-MPS-Scandal.ipynb:70002: WARNING: Non-consecutive header level increase; 0 to 2 [myst.header]
  • /home/runner/work/mybook/mybook/03-UK-MPS-Scandal.ipynb:120002: WARNING: Non-consecutive header level increase; 0 to 2 [myst.header]
  • /home/runner/work/mybook/mybook/03-UK-MPS-Scandal.ipynb:220002: WARNING: Non-consecutive header level increase; 0 to 2 [myst.header]
  • /home/runner/work/mybook/mybook/03-umbrella-of-love.ipynb:400002: WARNING: Non-consecutive header level increase; 0 to 2 [myst.header]

gini coefficient

def gini(list_of_values):
    sorted_list = sorted(list_of_values)
    height, area = 0, 0
    for value in sorted_list:
        height += value
        area += height - value / 2.
    fair_area = height * len(list_of_values) / 2.
    return (fair_area - area) / fair_area

VIF: variance_inflation_factor

from statsmodels.stats.outliers_influence import variance_inflation_factor
variables = data[['type_num', 'male', 'age', 'job1', 'job2', 'edu', 'income', 'all_freq_log', 
               'freq1_log', 'freq2_log', 'freq3_log', 'freq6_log', 'freq7_log', 'freq13_log', 'freq19_log']]
vif = pd.DataFrame()
vif['VIF'] = [variance_inflation_factor(variables.values,i) for i in range(variables.shape[1])]
vif['features'] = variables.columns
vif

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.