Giter Club home page Giter Club logo

bocop-reader's Introduction

πŸ‘‹ Presentation

Hello! My name is Johnny Godoy. I'm a Mathematical Engineer with an M.Sc. in Data Science from University of Chile, currently working as an AI researcher at Replai. I'm a co-founder and the current content coordinator of the Association for Ethics in Data and Artificial Intelligence AEDIA.

πŸ’– Interests

I may not be an expert on all of these fields (yet!), however, I find them fascinating and enjoy reading about them:

Academic

  • Interpretable and Explainable Machine Learning
  • Stochastic methods for Optimization
  • Video Game Development
  • Software Engineering
  • Numerical Analysis

Causes

  • Ethical Data Science and Artificial Intelligence
  • Child Development and Pedagogy
  • Online Privacy and Security
  • Sustainability

Fun

  • Playing videogames
  • Freestyle wrestling 🀼
  • Cows πŸ„

πŸ›  Tech Stack

πŸ’Ύ Databases

MariaDB MongoDB

πŸ‘¨β€πŸ’» Languages

Expert: Python
Intermediate: Kotlin
Basic: C Java Julia R

πŸ€– Data Science and Machine Learning Frameworks

Matplotlib NumPy Pandas Plotly PyTorch scikit-learn SciPy

❔ Other

LaTeX Ubuntu

bocop-reader's People

Contributors

johnny-godoy avatar

Stargazers

 avatar

Watchers

 avatar

bocop-reader's Issues

ValueError: Length of values (400) does not match length of index (401)

Tengo este error al intentar cargar la solucion al problema jackson_basic de BOCOP en la clase BOCOPSolution. Parece ser que el numero datos en la discretizacion del tiempo es diferente a los valores de alguna de las soluciones.


ValueError Traceback (most recent call last)
Input In [87], in <cell line: 1>()
----> 1 a_tf_0_7_tf_5 = BOCOPSolution("sol/1")

File ~\anaconda3\envs\nn\lib\site-packages\bocop_solution.py:58, in BOCOPSolution.init(self, working_directory_filename)
56 controls = [file for file in files if f"stage_{file}" in files]
57 # Creating bunch objects for each variable type
---> 58 self.adjoint_states = _AdjointStates(self, states)
59 self.states = _States(self, states)
60 self.controls = _Controls(self, controls)

File ~\anaconda3\envs\nn\lib\site-packages\internals_bunches.py:12, in _AdjointStates.init(self, solution, variable_list)
11 def init(self, solution: BOCOPSolution, variable_list: list[str]):
---> 12 super().init(solution, [f"{variable}_adjoint_state" for variable in variable_list])

File ~\anaconda3\envs\nn\lib\site-packages\internals_variable_bunch.py:31, in _VariableBunch.init(self, solution, variable_list)
23 def init(self, solution: BOCOPSolution, variable_list: list[str]):
24 """
25 Parameters
26 ----------
(...)
29 variable_list: list[str]
30 A list with each variable named."""
---> 31 self.variables = {name: _Variable(solution, name) for name in variable_list}
32 self.working_directory_filename = solution.working_directory_filename
33 self.dataframe = pd.DataFrame({name: variable.series
34 for name, variable in self.variables.items()})

File ~\anaconda3\envs\nn\lib\site-packages\internals_variable_bunch.py:31, in (.0)
23 def init(self, solution: BOCOPSolution, variable_list: list[str]):
24 """
25 Parameters
26 ----------
(...)
29 variable_list: list[str]
30 A list with each variable named."""
---> 31 self.variables = {name: _Variable(solution, name) for name in variable_list}
32 self.working_directory_filename = solution.working_directory_filename
33 self.dataframe = pd.DataFrame({name: variable.series
34 for name, variable in self.variables.items()})

File ~\anaconda3\envs\nn\lib\site-packages\internals_variable.py:46, in _Variable.init(self, solution, name)
44 times = solution.stage_times if len(solution.stage_times) == len(self.values) else solution.discretization_times
45 self.discretization_times = times
---> 46 self.series = pd.Series(self.values, index=self.discretization_times, name=name)
47 # Creating the interpolator object
48 self.cubic_interpolator = scipy.interpolate.InterpolatedUnivariateSpline(self.discretization_times, self.values)

File ~\anaconda3\envs\nn\lib\site-packages\pandas\core\series.py:442, in Series.init(self, data, index, dtype, name, copy, fastpath)
440 index = default_index(len(data))
441 elif is_list_like(data):
--> 442 com.require_length_match(data, index)
444 # create/copy the manager
445 if isinstance(data, (SingleBlockManager, SingleArrayManager)):

File ~\anaconda3\envs\nn\lib\site-packages\pandas\core\common.py:557, in require_length_match(data, index)
553 """
554 Check the length of data matches the length of the index.
555 """
556 if len(data) != len(index):
--> 557 raise ValueError(
558 "Length of values "
559 f"({len(data)}) "
560 "does not match length of index "
561 f"({len(index)})"
562 )

ValueError: Length of values (400) does not match length of index (401)

Version 1.0.0 release

Finally we have a release. I intend to update this project a bit with certain performance and QOL improvements, but I won't touch the main branch anymore until these are stable.

When I can prioritize this project again, I'll add the TODO's as issues.

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.