<Kaggle>
-
4/26<Kaggle> 2022. 4. 29. 14:26
#4/26 kmeans = KMeans(n_clusters=15, random_state=2, n_init = 10).fit(loc_df) loc_df['label'] = kmeans.labels_ # 0,1,2...14 for label in loc_df['label'].unique(): plt.plot(loc_df['longitude'][loc_df['label'] == label], loc_df['latitude'][loc_df['label'] == label], '.', alpha = 0.3, markersize = 0.3) df['pickup_cluster'] = kmeans.predict(df[['pickup_longitude','pickup_latitude']]) df['pickup_hour..
-
-
-
3/28<Kaggle>/[TensorFlow Speech Recognition] 2022. 3. 28. 21:19
- tf.constant() - tf.Variable() - tf.placeholder() # tf.constant() : 변하지 않는 상수 생성 # tf.Variable() : 값이 바뀔 수도 있는 변수 생성 import tensorflow as tf sess = tf.Session() x1 = tf.constant([10], dtype=tf.float32, name='test1') x2 = tf.Variable([8], dtype=tf.float32, name='test2') init = tf.global_variables_initializer() sess.run(init) # 초기화 먼저 진행 print(sess.run(x1)) # 값 부여 ## tf.placeholder + feed_dict : ..