34e7e918bd4fc09f643e8bb448e875a9bcb7e841,experiment.py,,,#,4

Before Change


from linearmodels.tests.panel._utility import generate_data

data = generate_data(0.20, "pandas")
for model in [BetweenOLS, PanelOLS, FirstDifferenceOLS, PooledOLS]:
    formula = "y ~ 1 + x0 + x1 + x2 + x3 + x4"
    if model is FirstDifferenceOLS:
        formula = "y ~ x0 + x1 + x2 + x3 + x4"

    joined = data.x
    joined["y"] = data.y
    mod = model.from_formula(formula, joined)
    res = mod.fit()
    print(res)

After Change


data = generate_data(0.00, "pandas")

import numpy as np
y = np.arange(12.0)[:,None]
import pandas as pd
entities = pd.Categorical(pd.Series(["a"]*6+["b"]*6))
dummies = pd.get_dummies(entities)
w = np.random.chisquare(5, (12,1)) / 5
w = w/w.mean()
root_w = np.sqrt(w)
wd = root_w  * dummies.values
wy = root_w  * y
b = np.linalg.pinv(wd) @ wy
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: bashtage/linearmodels
Commit Name: 34e7e918bd4fc09f643e8bb448e875a9bcb7e841
Time: 2017-03-29
Author: kevin.k.sheppard@gmail.com
File Name: experiment.py
Class Name:
Method Name:


Project Name: jhfjhfj1/autokeras
Commit Name: c99295e1903952b3b806c4fd641e28f852b17c36
Time: 2018-04-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/utils.py
Class Name: ModelTrainer
Method Name: train_model