Example #1
0
def run_analysis(features_file, kpis_file, metadata_file):
    """
		Load kpis and features from file and pass them to expan to perform delta and subgroup analyses

		Args:
			features_file: features file path
			kpis_file: kpis file path
			metadata_file: metadata file path

		Returns:
			delta analysis results and subgroup analysis results as a tuple
	"""
    kpis = pd.read_csv(kpis_file)
    if features_file:
        features = pd.read_csv(features_file)
    else:
        features = 'default'
    print(features)
    metadata = parse_metadata(metadata_file)

    exp_data = ExperimentData(metrics=kpis,
                              metadata=metadata,
                              features=features)
    exp = Experiment(baseline_variant=metadata['baseline_variant'],
                     metrics_or_kpis=kpis,
                     metadata=metadata,
                     features=features)

    return (exp.delta(), exp.sga())
Example #2
0
def run_analysis(features_file, kpis_file, metadata_file):
    kpis = pd.read_csv(kpis_file)
    if features_file:
        features = pd.read_csv(features_file)
    else:
        features = 'default'
    print(features)
    metadata = parse_metadata(metadata_file)

    exp_data = ExperimentData(metrics=kpis,
                              metadata=metadata,
                              features=features)
    exp = Experiment(baseline_variant=metadata['baseline_variant'],
                     metrics_or_kpis=kpis,
                     metadata=metadata,
                     features=features)

    return (exp.delta(), exp.sga())