-
Notifications
You must be signed in to change notification settings - Fork 19
Code of Conduct
Mohit Rathore edited this page May 1, 2018
·
8 revisions
By committing to this repository, you promise to abide by the below mentioned strict set of rules
Coding Style
- Since the name of our library is long. It is recommended to call the desired functions at import. Eg.
from fromscratchtoml.models import svm
- Use of direct imports will lead to death penalty.-
from x import *
- We are going to use our custom indentation methods. As shown below -
expected_projection = ch.Tensor([5.2845, 2.8847, 3.8985, 2.4527, 4.2714,
-3.5514, -3.0234, -4.8531, -2.8000, -5.4149])
- Similar code statements should be separated by a newline.
P = cvxopt.matrix(gram_matrix_xy.numpy().astype(np.double))
q = cvxopt.matrix(-ch.ones(self.n).numpy().astype(np.double))
G1 = cvxopt.spmatrix(-1.0, range(self.n), range(self.n))
G2 = cvxopt.spmatrix(1, range(self.n), range(self.n))
G = cvxopt.matrix([[G1, G2]])
- Line limit is set to 80.
- Possession or consumption of
print
statements is strictly prohibited in the repository premises. - Use loggers wherever necessary with correct level of logging only
- In docstrings functions which don't have a named return variable should be
_
-
Returns
-------
_ : pts x N-D torch.Tensor
The multivariate distribution generated from mean and covariance matrix.
Documentation
- While implementing a
feature request
make sure to report your findings and citations at the wiki page like this. - Only - informative links to some intuitive blogs or YouTube videos are welcomed.
- Posting Wikipedia links will lead to death penalty.
- Every ML implementation should have a notebook associated explaining each block of code pushed. Including the relevant equations and logic. Check this awesome notebook.
- For using mathematical formulas in markdown, check this.
Commit messages
- Commit messages should not include the name of file and commits should not be too often.
- Break the feature into sub-features and commit per sub-feature.
- Refrain from using the tempting command -
git add .