ran view_model.ipynb
put constraint on weights into one function