code _for 2W#2
Open
shoaibmahmod7 wants to merge 8 commits into
Open
Conversation
commit b673e82 Author: Maged Eltorkoman <newmaged@gmail.com> Date: Fri Feb 25 11:10:39 2022 +0200 Feat: save and load for alpha and conditions commit 8d61187 Author: Maged Eltorkoman <newmaged@gmail.com> Date: Fri Feb 25 09:04:23 2022 +0200 Bug: Make logger hidden in ci_matrix commit 8433efc Author: Maged Eltorkoman <newmaged@gmail.com> Date: Wed Feb 23 21:39:43 2022 +0200 Tried SCIP solver in splitting benchmark_splitting commit 65f66df Merge: 900f087 2cbb1de Author: Maged Turkoman <64289883+MagedMohamedTurk@users.noreply.github.com> Date: Tue Feb 15 10:29:54 2022 +0200 Merge pull request #1 from MagedMohamedTurk/test-binder-env Update environment.yml commit 2cbb1de Author: Maged Turkoman <64289883+MagedMohamedTurk@users.noreply.github.com> Date: Tue Feb 15 10:20:46 2022 +0200 added plotting packages commit 493b835 Author: Maged Turkoman <64289883+MagedMohamedTurk@users.noreply.github.com> Date: Tue Feb 15 10:09:21 2022 +0200 Update environment.yml commit 900f087 Author: Maged Turkoman <64289883+MagedMohamedTurk@users.noreply.github.com> Date: Tue Feb 15 10:03:53 2022 +0200 Docs: update readme with mybinder link
Self=(B-A) @ inv(U)
| index=_index, columns=_columns)) | ||
| if self.U is not None: | ||
| _index = (f'Plane {n+1}' for n in range(self.U.shape[0])) | ||
| _columns = (f'Plane {n+1}' for n in range(self.U.shape[1]) |
Owner
There was a problem hiding this comment.
Missing closing parenthesis
| self.U = U | ||
| if not keep_trial: | ||
| self.value = (self.B - self.A) / self.U | ||
| self.value = (self.B - self.A) @ np.linalg.inv(self.U) |
Owner
There was a problem hiding this comment.
Great work @shoaibmahmod7
Inverse matrix will only work on square matrices. I think to do your implementation of multiple trial weights on more than one plane, we need to make the square matrix to be the default.
So the original trial vector can be a square zero matrix with the diagonal to be the values of the trials at each plane.
U = [1, 2, 3] --> U =[[1, 0, 0], [0, 2, 0], [0, 0, 3]]
This will not break the structure of the package and still we can apply your idea.
I think this is doable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
`import logging
import warnings
import numpy as np
import hsbalance.tools as tools
import pandas as pd
import pickle
_logger = logging.getLogger(name)
_logger.propagate = False
_logger.setLevel(logging.DEBUG)
_console_handle = logging.StreamHandler()
_console_handle.setLevel(logging.INFO)
_logger.addHandler(_console_handle)
pd.set_option('display.max_columns', 1000) # Set maximum number of columns to 1000
class Alpha():
class Condition():
`