Skip to content

When I run “sc = Synth(data,……n_optim=100)”, I get the error "ValueError: 'x0' must only have one dimension." #27

Description

@PG408

run code below , get the error "ValueError: 'x0' must only have one dimension."

# Fit synthetic control
sc = Synth(data, "gdp", "country", "year", 1990, "West Germany", n_optim=100)

maybe optimize.py should delete "size=1"?

else:
    #Dirichlet distribution returns a valid pmf over n_covariates states
    v_0 = self.original_data.rng.dirichlet(np.ones(data.n_covariates), size=1)
    if pen == "auto":
        #if pen =="auto", we have an additional parameter to optimize over, so we append it
        v_0 = np.append(v_0, self.original_data.rng.lognormal(1.5, 1, size=1)) #Still experimenting with what distribution is appropriate
            

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions