Ejemplo n.º 1
0
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

import random

import crosscat.utils.data_utils as du
from crosscat.CrossCatClient import get_CrossCatClient

ccc = get_CrossCatClient('local', seed=0)

gen_seed = 0
num_clusters = 4
num_cols = 8
num_rows = 16
num_splits = 1
max_mean = 10
max_std = 0.1
rng = random.Random(gen_seed)
get_next_seed = lambda: rng.randint(1, 2**31 - 1)
T, M_r, M_c = du.gen_factorial_data_objects(
    get_next_seed(), num_clusters,
    num_cols, num_rows, num_splits,
    max_mean=max_mean, max_std=max_std,
    )
Ejemplo n.º 2
0
 def __init__(self, crosscat_engine_type='local', **kwargs):
     self.backend = get_CrossCatClient(crosscat_engine_type, **kwargs)
     self.persistence_layer = PersistenceLayer()
Ejemplo n.º 3
0
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

import random

import crosscat.utils.data_utils as du
from crosscat.CrossCatClient import get_CrossCatClient

ccc = get_CrossCatClient('local', seed=0)

gen_seed = 0
num_clusters = 4
num_cols = 8
num_rows = 16
num_splits = 1
max_mean = 10
max_std = 0.1
rng = random.Random(gen_seed)
get_next_seed = lambda: rng.randint(1, 2**31 - 1)
T, M_r, M_c = du.gen_factorial_data_objects(
    get_next_seed(),
    num_clusters,
    num_cols,
    num_rows,