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
| // Copyright (c) 2014 Hartmut Kaiser | |
| // | |
| // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
| // This is the fourth in a series of examples demonstrating the development of | |
| // a fully distributed solver for a simple 1D heat distribution problem. | |
| // | |
| // This example builds on example three. It futurizes the code from that | |
| // example. Compared to example two this code runs much more efficiently. It |
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
| // Copyright (c) 2018 Shahrzad Shirzad | |
| // | |
| // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
| #include <phylanx/phylanx.hpp> | |
| #include <hpx/hpx_init.hpp> | |
| #include <iostream> |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Mon Jun 18 17:45:27 2018 | |
| @author: shahrzad | |
| """ | |
| from rdkit import Chem | |
| from rdkit.Chem import MACCSkeys |
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
| from scipy.spatial import Voronoi, voronoi_plot_2d | |
| import numpy as np | |
| import pandas as pd | |
| import matplotlib | |
| import sys,os,argparse | |
| from biopandas.mol2 import PandasMol2 | |
| import matplotlib.pyplot as plt | |
| import glob | |
| import cv2 | |
| from rdkit import Chem |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Fri Jul 6 14:25:57 2018 | |
| @author: shahrzad | |
| """ | |
| import numpy as np | |
| import time | |
| import math |
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
| import pandas as pd | |
| import numpy as np | |
| import time | |
| import argparse | |
| import sys | |
| if not len(sys.argv) == 7 : | |
| print("This program requires the following 6 arguments seperated by a space ") | |
| print("row_stop col_stop num_factors iterations regularization alpha") | |
| exit(-57) |
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
| from phylanx import Phylanx | |
| import numpy as np | |
| @Phylanx | |
| def ALS(ratings, regularization, num_factors, iterations, alpha, enable_output): | |
| num_users = np.shape(ratings)[0] | |
| num_items = np.shape(ratings)[1] | |
| conf = alpha * ratings | |
| conf_u = np.zeros((num_items,1)) |
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
| #Python implementation of the ALS algorithm | |
| import numpy as np | |
| def ALS(ratings, regularization, num_factors, iterations, alpha, enable_output): | |
| num_users = np.shape(ratings)[0] | |
| num_items = np.shape(ratings)[1] | |
| conf = alpha * ratings | |
| conf_u = np.zeros((num_items,1)) | |
| conf_i = np.zeros((num_items,1)) |
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
| define(als, ratings, regularization, num_factors, iterations, alpha, enable_output, | |
| block( | |
| define(num_users, shape(ratings, 0)), | |
| define(num_items, shape(ratings, 1)), | |
| define(conf, alpha * ratings), | |
| define(conf_u, constant(0.0, make_list(num_items))), | |
| define(conf_i, constant(0.0,make_list(num_users))), | |
| define(c_u, constant(0.0, make_list(num_items, num_items))), |
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
| import pandas as pd | |
| import numpy as np | |
| import time | |
| import argparse | |
| import sys | |
| if not len(sys.argv) == 7 : | |
| print("This program requires the following 6 arguments seperated by a space ") | |
| print("row_stop col_stop num_factors iterations regularization alpha") | |
| exit(-57) |
OlderNewer