We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Our vector-in/vector-out syntax keeps things simple. But it doesn't really help real-world use-cases.
It'd be nice to have a good solution for the interaction of GLM.jl and DataFrames.
This example is cribbed from https://gurobi-machinelearning.readthedocs.io/en/stable/auto_examples/example2_student_admission.html
using JuMP import CSV import DataFrames import Downloads import GLM import Ipopt import MathOptAI function read_df(filename) url = "https://raw.githubusercontent.com/INFORMSJoC/2020.1023/master/data/" data = Downloads.download(url * filename) return CSV.read(data, DataFrames.DataFrame) end historical_df = read_df("college_student_enroll-s1-1.csv") model_glm = GLM.glm( GLM.@formula(enroll ~ 0 + merit + SAT + GPA), historical_df, GLM.Bernoulli(), ) application_df = read_df("college_applications6000.csv") n_students = size(application_df, 1) model = Model(Ipopt.Optimizer) application_df.merit = @variable(model, 0 <= x_merit[1:n_students] <= 2.5) y_enroll = MathOptAI.add_predictor(model, model_glm, application_df) @objective(model, Max, sum(y_enroll)) @constraint(model, sum(x_merit) <= 0.2 * n_students) optimize!(model) @assert is_solved_and_feasible(model) value.(x_merit)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Our vector-in/vector-out syntax keeps things simple. But it doesn't really help real-world use-cases.
It'd be nice to have a good solution for the interaction of GLM.jl and DataFrames.
This example is cribbed from https://gurobi-machinelearning.readthedocs.io/en/stable/auto_examples/example2_student_admission.html
The text was updated successfully, but these errors were encountered: