本文整理汇总了Python中trustedanalytics.get_frame函数的典型用法代码示例。如果您正苦于以下问题:Python get_frame函数的具体用法?Python get_frame怎么用?Python get_frame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_frame函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: return_page_rank
def return_page_rank(json_result):
from trustedanalytics import get_frame
vertex_json = json_result["vertex_dictionary_output"]
edge_json = json_result["edge_dictionary_output"]
vertex_dictionary = dict([(k,get_frame(v["uri"])) for k,v in vertex_json.items()])
edge_dictionary = dict([(k,get_frame(v["uri"])) for k,v in edge_json.items()])
return {'vertex_dictionary': vertex_dictionary, 'edge_dictionary': edge_dictionary}
开发者ID:acx2015,项目名称:atk,代码行数:7,代码来源:results.py
示例2: __init__
def __init__(self, json_result):
from trustedanalytics import get_frame
self.num_features = json_result['num_features']
self.num_classes = json_result['num_classes']
self.covariance_matrix = None
if pandas_available:
self.summary_table = pd.DataFrame(data=json_result['coefficients'].values(),
columns=['coefficients'],
index=json_result['coefficients'].keys())
self.summary_table['degrees_freedom'] = pd.Series(data=json_result['degrees_freedom'].values(),
index=json_result['degrees_freedom'].keys())
if json_result.get('covariance_matrix', None) is not None:
self.summary_table['standard_errors'] = pd.Series(data=json_result['standard_errors'].values(),
index=json_result['standard_errors'].keys())
self.summary_table['wald_statistic'] = pd.Series(data=json_result['wald_statistic'].values(),
index=json_result['wald_statistic'].keys())
self.summary_table['p_value'] = pd.Series(data=json_result['p_value'].values(),
index=json_result['p_value'].keys())
self.covariance_matrix = get_frame(json_result['covariance_matrix']['uri'])
else:
self.summary_table = {
'coefficients': json_result['coefficients'],
'degrees_freedom': json_result['degrees_freedom']
}
if json_result.get('covariance_matrix', None) is not None:
self.summary_table['standard_errors'] = json_result['standard_errors']
self.summary_table['wald_statistic'] = json_result['wald_statistic']
self.summary_table['p_value'] = json_result['p_value']
self.summary_table['covariance_matrix'] = get_frame(json_result['covariance_matrix']['uri'])
开发者ID:rainiraj,项目名称:atk,代码行数:32,代码来源:logisticregression.py
示例3: return_clustering_coefficient
def return_clustering_coefficient(json_result):
from trustedanalytics import get_frame
from trustedanalytics.core.clusteringcoefficient import ClusteringCoefficient
if json_result.has_key('frame'):
frame = get_frame(json_result['frame']['uri'])
else:
frame = None
return ClusteringCoefficient(json_result['global_clustering_coefficient'], frame)
开发者ID:acx2015,项目名称:atk,代码行数:8,代码来源:results.py
示例4: return_giraph_lda_train
def return_giraph_lda_train(json_result):
from trustedanalytics import get_frame
doc_frame = get_frame(json_result['topics_given_doc']['uri'])
word_frame= get_frame(json_result['word_given_topics']['uri'])
topic_frame= get_frame(json_result['topics_given_word']['uri'])
return { 'topics_given_doc': doc_frame, 'word_given_topics': word_frame, 'topics_given_word': topic_frame, 'report': json_result['report'] }
开发者ID:acx2015,项目名称:atk,代码行数:6,代码来源:results.py
示例5: return_loopy_belief_propagation
def return_loopy_belief_propagation(json_result):
from trustedanalytics import get_frame
vertex_json = json_result['frame_dictionary_output']
vertex_dictionary = dict([(k,get_frame(v["uri"])) for k,v in vertex_json.items()])
return {'vertex_dictionary': vertex_dictionary, 'time': json_result['time']}
开发者ID:acx2015,项目名称:atk,代码行数:5,代码来源:results.py
示例6: return_connected_components
def return_connected_components(json_result):
from trustedanalytics import get_frame
dictionary = json_result["frame_dictionary_output"]
return dict([(k,get_frame(v["uri"])) for k,v in dictionary.items()])
开发者ID:acx2015,项目名称:atk,代码行数:4,代码来源:results.py
示例7: return_collaborative_filtering
def return_collaborative_filtering(json_result):
from trustedanalytics import get_frame
user_frame = get_frame(json_result['user_frame']['uri'])
item_frame= get_frame(json_result['item_frame']['uri'])
return { 'user_frame': user_frame, 'item_frame': item_frame, 'report': json_result['report'] }
开发者ID:acx2015,项目名称:atk,代码行数:5,代码来源:results.py
示例8: return_label_propagation
def return_label_propagation(json_result):
from trustedanalytics import get_frame
frame = get_frame(json_result['output_frame']['uri'])
return { 'frame': frame, 'report': json_result['report'] }
开发者ID:acx2015,项目名称:atk,代码行数:4,代码来源:results.py
示例9: return_principal_components_predict
def return_principal_components_predict(json_result):
from trustedanalytics import get_frame
train_output = {'output_frame': get_frame(json_result['output_frame']['uri']) }
if json_result.get('t_squared_index', None) is not None:
train_output['t_squared_index'] = json_result['t_squared_index']
return train_output
开发者ID:grehx,项目名称:atk,代码行数:6,代码来源:results.py
示例10: _get_frame
def _get_frame(uri_dict):
from trustedanalytics import get_frame
return get_frame(uri_dict['uri'])
开发者ID:AllanY,项目名称:atk,代码行数:3,代码来源:jsonschema.py
示例11: return_power_iteration_clustering_predict
def return_power_iteration_clustering_predict(json_result):
from trustedanalytics import get_frame
predicted_frame = get_frame(json_result['frame']['uri'])
number_of_clusters = json_result['k']
cluster_size = json_result['cluster_size']
return {'predicted_frame': predicted_frame , 'number_of_clusters': number_of_clusters, 'cluster_size': cluster_size}
开发者ID:KartikKannapur,项目名称:atk,代码行数:6,代码来源:results.py
注:本文中的trustedanalytics.get_frame函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论